diff --git a/.github/workflows/gasreport.yml b/.github/workflows/gasreport.yml new file mode 100644 index 0000000000..cd530fa6f9 --- /dev/null +++ b/.github/workflows/gasreport.yml @@ -0,0 +1,34 @@ +# .github/workflows/gasreport.yml +name: Gas report + +on: + pull_request: + paths: + - packages/store/** + - packages/world/** + +jobs: + gas-report: + runs-on: ubuntu-22.04 + name: Generate gas report + steps: + - uses: actions/setup-node@v3 + with: + node-version: 16 + + - name: git-checkout + uses: actions/checkout@v3 + + - name: Install Foundry + uses: foundry-rs/foundry-toolchain@v1 + with: + version: nightly + + - name: Install dependencies + run: yarn install --network-concurrency 1 + + - name: Install local CLI + run: cd packages/cli && yarn build && npm link && cd ../.. + + - name: Verify that gas report is up to date + run: yarn workspace @latticexyz/store run gasreport && yarn workspace @latticexyz/world run gasreport && if [ -n "$(git status --porcelain)" ]; then exit 0; fi diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d028940412..d3c753bc96 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -5,6 +5,7 @@ on: push: branches: - main + - v2 pull_request: merge_group: diff --git a/.vscode/settings.json b/.vscode/settings.json index b58c7696ed..d20b7a0111 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -9,6 +9,7 @@ "ds-test/=node_modules/ds-test/src/", "solecs/=node_modules/@latticexyz/solecs/src/", "royalty-registry/=node_modules/@manifoldxzy/royalty-registry/contracts/", - "std-contracts/=node_modules/@latticexyz/std-contracts/src/" + "std-contracts/=node_modules/@latticexyz/std-contracts/src/", + "@latticexyz/=node_modules/@latticexyz/" ] } diff --git a/package.json b/package.json index 9cf96ad050..c1b866a46b 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,10 @@ "workspaces": { "packages": [ "packages/utils", + "packages/schema-type", "packages/solecs", + "packages/store", + "packages/world", "packages/cli", "packages/recs", "packages/react", @@ -44,7 +47,7 @@ "retypeapp": "^2.4.0", "rimraf": "^3.0.2", "run-pty": "^3.0.0", - "typescript": ">=3.0.0" + "typescript": "^4.9.5" }, "config": { "commitizen": { diff --git a/packages/cli/modules.d.ts b/packages/cli/modules.d.ts index 6b48a40e34..e8779c3d73 100644 --- a/packages/cli/modules.d.ts +++ b/packages/cli/modules.d.ts @@ -1,2 +1,2 @@ -declare module "netlify"; -declare module "inquirer-prompt-suggest"; +declare module "prettier-plugin-solidity"; +declare module "long"; diff --git a/packages/cli/package.json b/packages/cli/package.json index 4c79c0d2f1..8b411e16ba 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -2,10 +2,12 @@ "name": "@latticexyz/cli", "version": "1.39.0", "description": "Command line interface for mud", - "main": "src/index.ts", + "main": "dist/index.js", + "types": "dist/index.d.ts", + "type": "module", "license": "MIT", "bin": { - "mud": "./dist/index.js" + "mud": "./dist/mud.js" }, "repository": { "type": "git", @@ -14,64 +16,54 @@ }, "scripts": { "prepare": "yarn build && chmod u+x git-install.sh", - "build": "rimraf dist && esbuild ./src/index.ts ./src/commands/* --bundle --platform=node --outdir=dist --external:fsevents && chmod u+x dist/index.js", + "lint": "eslint . --ext .ts", + "dev": "tsup --watch", + "build": "tsup", "link": "yarn link", - "test": "tsc && echo 'todo: add tests'", + "test": "vitest typecheck --run && echo 'todo: add tests'", "git:install": "bash git-install.sh", "release": "npm publish || echo 'version already published'" }, "devDependencies": { - "@types/clear": "^0.1.2", "@types/ejs": "^3.1.1", - "@types/figlet": "^1.5.4", "@types/glob": "^7.2.0", - "@types/inquirer": "^8.2.1", "@types/node": "^17.0.34", "@types/openurl": "^1.0.0", "@types/yargs": "^17.0.10", "esbuild": "^0.15.16", - "nodemon": "^2.0.16", - "pkg": "^5.7.0", - "rimraf": "^3.0.2", - "ts-node": "^10.7.0", - "typescript": "^4.6.4" + "tsup": "^6.6.3", + "vitest": "^0.29.1" }, "dependencies": { "@improbable-eng/grpc-web": "^0.15.0", "@improbable-eng/grpc-web-node-http-transport": "^0.15.0", + "@latticexyz/schema-type": "^1.34.0", "@latticexyz/services": "^1.39.0", "@latticexyz/solecs": "^1.39.0", "@latticexyz/std-contracts": "^1.39.0", - "@latticexyz/utils": "^1.39.0", "@typechain/ethers-v5": "^10.1.1", "chalk": "^5.0.1", "chokidar": "^3.5.3", - "clear": "^0.1.0", - "commander": "^9.2.0", "ds-test": "https://github.com/dapphub/ds-test.git#c9ce3f25bde29fc5eb9901842bf02850dfd2d084", "ejs": "^3.1.8", - "esm": "^3.2.25", "ethers": "^5.7.2", "execa": "^6.1.0", - "figlet": "^1.5.2", + "find-up": "^6.3.0", "forge-std": "https://github.com/foundry-rs/forge-std.git#b4f121555729b3afb3c5ffccb62ff4b6e2818fd3", "glob": "^8.0.3", - "inquirer": "^8.2.4", - "inquirer-prompt-suggest": "^0.1.0", - "listr2": "^4.0.5", - "netlify": "^11.0.1", "nice-grpc-web": "^2.0.1", - "node-fetch": "^3.2.6", "openurl": "^1.1.1", "path": "^0.12.7", + "prettier": "^2.8.4", + "prettier-plugin-solidity": "^1.1.2", "solmate": "https://github.com/Rari-Capital/solmate.git#9cf1428245074e39090dceacb0c28b1f684f584c", "table": "^6.8.1", + "ts-node": "^10.9.1", "typechain": "^8.1.1", - "uuid": "^8.3.2", - "yargs": "^17.5.1" - }, - "pkg": { - "scripts": "build/**/*.js" + "typescript": "^4.9.5", + "yargs": "^17.7.1", + "zod": "^3.20.6", + "zod-validation-error": "^0.3.2" }, "gitHead": "218f56893d268b0c5157a3e4c603b859e287a343" } diff --git a/packages/cli/src/commands/bulkupload.ts b/packages/cli/src/commands/bulkupload.ts index 1bbca6d4ee..ac840b4d54 100644 --- a/packages/cli/src/commands/bulkupload.ts +++ b/packages/cli/src/commands/bulkupload.ts @@ -1,6 +1,8 @@ -import { Arguments, CommandBuilder } from "yargs"; +import { execa } from "execa"; +import path from "path"; +import type { CommandModule } from "yargs"; -const importExeca = eval('import("execa")') as Promise; +const contractsDirectory = new URL("../src/contracts", import.meta.url).pathname; type Options = { statePath: string; @@ -8,37 +10,41 @@ type Options = { rpc: string; }; -export const command = "bulkupload"; -export const desc = "Uploads the provided ECS state to the provided World"; - -export const builder: CommandBuilder = (yargs) => - yargs.options({ - statePath: { type: "string", demandOption: true, desc: "Path to the ECS state to upload" }, - worldAddress: { type: "string", demandOption: true, desc: "Contract address of the World to upload to" }, - rpc: { type: "string", demandOption: true, desc: "JSON RPC endpoint" }, - }); - -export const handler = async (argv: Arguments): Promise => { - const { execa } = await importExeca; - const { statePath, worldAddress, rpc } = argv; - console.log("Uploading state at ", statePath, "to", worldAddress, "on", rpc); - const url = __dirname + "/../../src/contracts/BulkUpload.sol"; - console.log("Using BulkUpload script from", url); - - try { - await execa("forge", [ - "script", - "--sig", - '"run(string, address)"', - "--rpc-url", - rpc, - `${url}:BulkUpload`, - statePath, - worldAddress, - ]); - } catch (e) { - console.error(e); - } - - process.exit(0); +const commandModule: CommandModule = { + command: "bulkupload", + + describe: "Uploads the provided ECS state to the provided World", + + builder(yargs) { + return yargs.options({ + statePath: { type: "string", demandOption: true, desc: "Path to the ECS state to upload" }, + worldAddress: { type: "string", demandOption: true, desc: "Contract address of the World to upload to" }, + rpc: { type: "string", demandOption: true, desc: "JSON RPC endpoint" }, + }); + }, + + async handler({ statePath, worldAddress, rpc }) { + console.log("Uploading state at ", statePath, "to", worldAddress, "on", rpc); + const url = path.join(contractsDirectory, "BulkUpload.sol"); + console.log("Using BulkUpload script from", url); + + try { + await execa("forge", [ + "script", + "--sig", + '"run(string, address)"', + "--rpc-url", + rpc, + `${url}:BulkUpload`, + statePath, + worldAddress, + ]); + } catch (e) { + console.error(e); + } + + process.exit(0); + }, }; + +export default commandModule; diff --git a/packages/cli/src/commands/call-system.ts b/packages/cli/src/commands/call-system.ts index a0739d19b8..3fecdbb5ec 100644 --- a/packages/cli/src/commands/call-system.ts +++ b/packages/cli/src/commands/call-system.ts @@ -1,8 +1,8 @@ -import { defaultAbiCoder as abi } from "ethers/lib/utils"; +import { defaultAbiCoder as abi } from "ethers/lib/utils.js"; import path from "path"; -import { Arguments, CommandBuilder } from "yargs"; -import { execLog } from "../utils"; -import { getTestDirectory } from "../utils/forgeConfig"; +import type { CommandModule } from "yargs"; +import { execLog } from "../utils/index.js"; +import { getTestDirectory } from "../utils/forgeConfig.js"; type Options = { rpc?: string; @@ -10,57 +10,61 @@ type Options = { world: string; systemId?: string; systemAddress?: string; - argTypes?: any[]; - args?: any[]; + argTypes?: string[]; + args?: (string | number)[]; calldata?: string; broadcast?: boolean; callerPrivateKey?: string; debug?: boolean; }; -export const command = "call-system"; -export const desc = "Execute a mud system"; +const commandModule: CommandModule = { + command: "call-system", -export const builder: CommandBuilder = (yargs) => - yargs.options({ - rpc: { type: "string", description: "json rpc endpoint, defaults to http://localhost:8545" }, - caller: { type: "string", description: "caller address" }, - world: { type: "string", required: true, description: "world contract address" }, - systemId: { type: "string", description: "system id preimage (eg mud.system.Move)" }, - systemAddress: { type: "string", description: "system address (alternative to system id)" }, - argTypes: { type: "array", description: "system argument types for abi encoding" }, - args: { type: "array", description: "system arguments" }, - calldata: { type: "string", description: "abi encoded system arguments (instead of args/argTypes)" }, - broadcast: { type: "boolean", description: "send txs to the chain" }, - callerPrivateKey: { - type: "string", - description: "must be set if broadcast is set, must correspond to caller address", - }, - debug: { type: "boolean", description: "open debugger" }, - }); + describe: "Execute a mud system", -export const handler = async (argv: Arguments): Promise => { - const { rpc, caller, world, systemId, argTypes, args, calldata, broadcast, callerPrivateKey, debug } = argv; - const encodedArgs = calldata ?? (argTypes && args && abi.encode(argTypes, args)) ?? ""; - const testDir = await getTestDirectory(); + builder(yargs) { + return yargs.options({ + rpc: { type: "string", description: "json rpc endpoint, defaults to http://localhost:8545" }, + caller: { type: "string", description: "caller address" }, + world: { type: "string", required: true, description: "world contract address" }, + systemId: { type: "string", description: "system id preimage (eg mud.system.Move)" }, + systemAddress: { type: "string", description: "system address (alternative to system id)" }, + argTypes: { type: "array", string: true, description: "system argument types for abi encoding" }, + args: { type: "array", description: "system arguments" }, + calldata: { type: "string", description: "abi encoded system arguments (instead of args/argTypes)" }, + broadcast: { type: "boolean", description: "send txs to the chain" }, + callerPrivateKey: { + type: "string", + description: "must be set if broadcast is set, must correspond to caller address", + }, + debug: { type: "boolean", description: "open debugger" }, + }); + }, - await execLog("forge", [ - "script", - "--fork-url", - rpc ?? "http://localhost:8545", // default anvil rpc - "--sig", - "debug(address,address,string,bytes,bool)", - path.join(testDir, "utils/Debug.sol"), // the cli expects the Debug.sol file at this path - caller ?? "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266", // default anvil deployer - world, - systemId || "", - encodedArgs, - broadcast ? "true" : "false", - "-vvvvv", - broadcast ? "--broadcast" : "", - callerPrivateKey ? `--private-key ${callerPrivateKey}` : "", - debug ? "--debug" : "", - ]); + async handler({ rpc, caller, world, systemId, argTypes, args, calldata, broadcast, callerPrivateKey, debug }) { + const encodedArgs = calldata ?? (argTypes && args && abi.encode(argTypes, args)) ?? ""; + const testDir = await getTestDirectory(); + await execLog("forge", [ + "script", + "--fork-url", + rpc ?? "http://localhost:8545", // default anvil rpc + "--sig", + "debug(address,address,string,bytes,bool)", + path.join(testDir, "utils/Debug.sol"), // the cli expects the Debug.sol file at this path + caller ?? "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266", // default anvil deployer + world, + systemId || "", + encodedArgs, + broadcast ? "true" : "false", + "-vvvvv", + broadcast ? "--broadcast" : "", + callerPrivateKey ? `--private-key ${callerPrivateKey}` : "", + debug ? "--debug" : "", + ]); - process.exit(0); + process.exit(0); + }, }; + +export default commandModule; diff --git a/packages/cli/src/commands/codegen-libdeploy.ts b/packages/cli/src/commands/codegen-libdeploy.ts index 333947e54a..94a112434d 100644 --- a/packages/cli/src/commands/codegen-libdeploy.ts +++ b/packages/cli/src/commands/codegen-libdeploy.ts @@ -1,5 +1,5 @@ -import type { Arguments, CommandBuilder } from "yargs"; -import { generateLibDeploy } from "../utils"; +import type { CommandModule } from "yargs"; +import { generateLibDeploy } from "../utils/index.js"; type Options = { config: string; @@ -7,18 +7,23 @@ type Options = { systems?: string; }; -export const command = "codegen-libdeploy"; -export const desc = "Generate LibDeploy.sol from given deploy config"; +const commandModule: CommandModule = { + command: "codegen-libdeploy", -export const builder: CommandBuilder = (yargs) => - yargs.options({ - config: { type: "string", default: "./deploy.json", desc: "Component and system deployment configuration" }, - out: { type: "string", default: ".", desc: "Output directory for LibDeploy.sol" }, - systems: { type: "string", desc: "Only generate deploy code for the given systems" }, - }); + describe: "Generate LibDeploy.sol from given deploy config", -export const handler = async (args: Arguments): Promise => { - const { config, out, systems } = args; - await generateLibDeploy(config, out, systems); - process.exit(0); + builder(yargs) { + return yargs.options({ + config: { type: "string", default: "./deploy.json", desc: "Component and system deployment configuration" }, + out: { type: "string", default: ".", desc: "Output directory for LibDeploy.sol" }, + systems: { type: "string", desc: "Only generate deploy code for the given systems" }, + }); + }, + + async handler({ config, out, systems }) { + await generateLibDeploy(config, out, systems); + process.exit(0); + }, }; + +export default commandModule; diff --git a/packages/cli/src/commands/create.ts b/packages/cli/src/commands/create.ts deleted file mode 100644 index 310443f742..0000000000 --- a/packages/cli/src/commands/create.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { Arguments, CommandBuilder } from "yargs"; -import { execLog } from "../utils"; -import chalk from "chalk"; - -type Options = { - name: string; - template: string; -}; - -export const command = "create "; -export const desc = "Sets up a mud project into . Requires yarn."; - -export const deprecated = true; - -export const builder: CommandBuilder = (yargs) => - yargs - .options({ - template: { type: "string", desc: "Template to be used (available: [minimal, react])", default: "minimal" }, - }) - .positional("name", { type: "string", default: "mud-app" }); - -export const handler = async (argv: Arguments): Promise => { - const { name, template } = argv; - console.log(chalk.red.bold("⚠️ This command will be removed soon. Use `yarn create mud` instead.")); - - const result = await execLog("yarn", ["create", "mud", name, "--template", template]); - if (result.exitCode != 0) process.exit(result.exitCode); - - process.exit(0); -}; diff --git a/packages/cli/src/commands/deploy-contracts.ts b/packages/cli/src/commands/deploy-contracts.ts index 50e82b0c4d..744f56c462 100644 --- a/packages/cli/src/commands/deploy-contracts.ts +++ b/packages/cli/src/commands/deploy-contracts.ts @@ -1,8 +1,8 @@ -import type { Arguments, CommandBuilder } from "yargs"; -import { DeployOptions, generateAndDeploy, hsr } from "../utils"; +import type { CommandModule } from "yargs"; +import { DeployOptions, generateAndDeploy, hsr } from "../utils/index.js"; import openurl from "openurl"; import chalk from "chalk"; -import { getSrcDirectory } from "../utils/forgeConfig"; +import { getSrcDirectory } from "../utils/forgeConfig.js"; type Options = DeployOptions & { watch?: boolean; @@ -10,87 +10,111 @@ type Options = DeployOptions & { openUrl?: string; }; -export const command = "deploy-contracts"; -export const desc = "Deploy mud contracts"; +const commandModule: CommandModule = { + command: "deploy-contracts", -export const builder: CommandBuilder = (yargs) => - yargs.options({ - config: { type: "string", default: "./deploy.json", desc: "Component and system deployment configuration" }, - deployerPrivateKey: { type: "string", desc: "Deployer private key. If omitted, deployment is not broadcasted." }, - worldAddress: { type: "string", desc: "World address to deploy to. If omitted, a new World is deployed." }, - rpc: { type: "string", default: "http://localhost:8545", desc: "RPC URL of the network to deploy to." }, - systems: { type: "string", desc: "Only upgrade the given systems. Requires World address." }, - watch: { type: "boolean", desc: "Automatically redeploy changed systems" }, - dev: { type: "boolean", desc: "Automatically use funded dev private key for local development" }, - openUrl: { type: "string", desc: "Opens a browser at the provided url with the worldAddress url param prefilled" }, - gasPrice: { type: "number", desc: "Gas price to set for deploy transactions" }, - }); + describe: "Deploy mud contracts", -export const handler = async (args: Arguments): Promise => { - if (args.system != null && !args.worldAddress) { - console.error("Error: Upgrading systems requires a World address."); - process.exit(1); - } - - const deployerPrivateKey = - args.deployerPrivateKey ?? - (args.dev - ? "0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80" // Default anvil private key - : undefined); - - // Deploy world, components and systems - let genDeployResult: Awaited>; - try { - genDeployResult = await generateAndDeploy({ - ...args, - deployerPrivateKey, - clear: true, + builder(yargs) { + return yargs.options({ + config: { type: "string", default: "./deploy.json", desc: "Component and system deployment configuration" }, + deployerPrivateKey: { type: "string", desc: "Deployer private key. If omitted, deployment is not broadcasted." }, + worldAddress: { type: "string", desc: "World address to deploy to. If omitted, a new World is deployed." }, + rpc: { type: "string", default: "http://localhost:8545", desc: "RPC URL of the network to deploy to." }, + systems: { type: "string", desc: "Only upgrade the given systems. Requires World address." }, + reuseComponents: { type: "boolean", desc: "Skip deploying components and initialization." }, + watch: { type: "boolean", desc: "Automatically redeploy changed systems" }, + dev: { type: "boolean", desc: "Automatically use funded dev private key for local development" }, + openUrl: { + type: "string", + desc: "Opens a browser at the provided url with the worldAddress url param prefilled", + }, + gasPrice: { type: "number", desc: "Gas price to set for deploy transactions" }, }); - } catch (e: any) { - if (!e.stderr) { - // log error if it wasn't piped - console.log(e); + }, + + async handler({ + config, + deployerPrivateKey, + worldAddress, + rpc, + systems, + reuseComponents, + watch, + dev, + openUrl, + gasPrice, + }) { + if (systems != null && !worldAddress) { + console.error("Error: Upgrading systems requires a World address."); + process.exit(1); } - console.log(chalk.red("\n-----------\nError during generateAndDeploy (see above)")); - process.exit(); - } - const { deployedWorldAddress: worldAddress, initialBlockNumber } = genDeployResult; - console.log("World deployed at", worldAddress, "at block", initialBlockNumber); - if (worldAddress && args.openUrl) { - const url = new URL(args.openUrl); - url.searchParams.set("worldAddress", worldAddress); - console.log(""); - console.log(chalk.cyan("Opening client URL to", url.toString())); - console.log(""); - openurl.open(url.toString()); - } + deployerPrivateKey = + deployerPrivateKey ?? + (dev + ? "0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80" // Default anvil private key + : undefined); - // Set up watcher for system files to redeploy on change - if (args.watch) { - const { config, rpc, gasPrice } = args; - const srcDir = await getSrcDirectory(); + // Deploy world, components and systems + let genDeployResult: Awaited>; + try { + genDeployResult = await generateAndDeploy({ + config, + deployerPrivateKey, + worldAddress, + rpc, + systems, + reuseComponents, + clear: true, + gasPrice, + }); + } catch (e: any) { + if (!e.stderr) { + // log error if it wasn't piped + console.log(e); + } + console.log(chalk.red("\n-----------\nError during generateAndDeploy (see above)")); + process.exit(); + } + const { deployedWorldAddress, initialBlockNumber } = genDeployResult; + console.log("World deployed at", worldAddress, "at block", initialBlockNumber); - hsr(srcDir, async (systems: string[]) => { - try { - return await generateAndDeploy({ - config, - deployerPrivateKey, - worldAddress, - rpc, - systems, - gasPrice, - reuseComponents: true, - }); - } catch (e: any) { - if (!e.stderr) { - // log error if it wasn't piped - console.log(e); + if (deployedWorldAddress && openUrl) { + const url = new URL(openUrl); + url.searchParams.set("worldAddress", deployedWorldAddress); + console.log(""); + console.log(chalk.cyan("Opening client URL to", url.toString())); + console.log(""); + openurl.open(url.toString()); + } + + // Set up watcher for system files to redeploy on change + if (watch) { + const srcDir = await getSrcDirectory(); + hsr(srcDir, async (systems: string[]) => { + try { + return await generateAndDeploy({ + config, + deployerPrivateKey, + worldAddress, + rpc, + systems, + gasPrice, + reuseComponents: true, + }); + } catch (e: any) { + if (!e.stderr) { + // log error if it wasn't piped + console.log(e); + } + console.log(chalk.red("\n-----------\nError during generateAndDeploy in HSR (see above)")); } - console.log(chalk.red("\n-----------\nError during generateAndDeploy in HSR (see above)")); - } - }); - } else { - process.exit(0); - } + }); + } else { + process.exit(0); + } + }, }; + +export default commandModule; diff --git a/packages/cli/src/commands/deploy.ts b/packages/cli/src/commands/deploy.ts deleted file mode 100644 index 9d3924a729..0000000000 --- a/packages/cli/src/commands/deploy.ts +++ /dev/null @@ -1,438 +0,0 @@ -/* eslint-disable @typescript-eslint/no-non-null-assertion */ -// eslint-disable-next-line @typescript-eslint/no-var-requires -import { ethers } from "ethers"; -import inquirer from "inquirer"; -import { v4 } from "uuid"; -import { Listr, Logger } from "listr2"; -import { exit } from "process"; -import fs from "fs"; -import openurl from "openurl"; -import ips from "inquirer-prompt-suggest"; -import { Arguments, CommandBuilder } from "yargs"; -import { generateAndDeploy } from "../utils"; - -inquirer.registerPrompt("suggest", ips); - -// @dev Note: this deployment command is deprecated and will be removed in a future version. Use `mud deploy-contracts` instead. - -// Workaround to prevent tsc to transpile dynamic imports with require, which causes an error upstream -// https://github.com/microsoft/TypeScript/issues/43329#issuecomment-922544562 -const importNetlify = eval('import("netlify")') as Promise; -const importChalk = eval('import("chalk")') as Promise; -const importExeca = eval('import("execa")') as Promise; -const importFetch = eval('import("node-fetch")') as Promise; - -interface Options { - i?: boolean; - chainSpec?: string; - chainId?: number; - rpc?: string; - wsRpc?: string; - world?: string; - reuseComponents?: boolean; - deployerPrivateKey?: string; - deployClient?: boolean; - clientUrl?: string; - netlifySlug?: string; - netlifyPersonalToken?: string; - codespace?: boolean; - dry?: boolean; - dev?: boolean; -} - -export const command = "deploy"; -export const desc = "Deploys the local mud contracts and optionally the client"; - -export const builder: CommandBuilder = (yargs) => - yargs.options({ - i: { type: "boolean" }, - chainSpec: { type: "string" }, - chainId: { type: "number" }, - rpc: { type: "string" }, - wsRpc: { type: "string" }, - world: { type: "string" }, - reuseComponents: { type: "boolean" }, - deployerPrivateKey: { type: "string" }, - deployClient: { type: "boolean" }, - clientUrl: { type: "string" }, - netlifySlug: { type: "string" }, - netlifyPersonalToken: { type: "string" }, - codespace: { type: "boolean" }, - dry: { type: "boolean" }, - dev: { type: "boolean", default: true }, - }); - -export const handler = async (args: Arguments): Promise => { - const info = await getDeployInfo(args); - await deploy(info); -}; - -function isValidHttpUrl(s: string): boolean { - let url: URL | undefined; - - try { - url = new URL(s); - } catch (_) { - return false; - } - - return url.protocol === "http:" || url.protocol === "https:"; -} - -const getDeployInfo: (args: Arguments) => Promise = async (args) => { - const { default: chalk } = await importChalk; - console.log(); - console.log(chalk.bgWhite.black.bold(" == Mud Deployer == ")); - console.log(); - - let config: Options = {}; - try { - config = JSON.parse(fs.readFileSync("mud.config.json", "utf8")); - } catch (e) { - console.log("No mud.config.json found, using command line args"); - } - - const getNetlifyAccounts = async (token: string) => { - const { NetlifyAPI: netlify } = await importNetlify; - const netlifyAPI = new netlify(token); - console.log("Netlify api"); - const accounts = await netlifyAPI.listAccountsForUser(); - console.log("Accounts"); - return accounts.map((a: { slug: string }) => a.slug); - }; - - const defaultOptions: Options = { - chainSpec: "chainSpec.json", - chainId: 31337, - rpc: "http://localhost:8545", - wsRpc: "ws://localhost:8545", - reuseComponents: false, - deployClient: false, - clientUrl: "http://localhost:3000", - dev: true, - }; - - const { default: fetch } = await importFetch; - - // DISABLED UNTIL NEW REGISTRY IS READY - // Fetch deployed lattice chains - // const latticeChains = args.i - // ? ((await (await fetch("https://registry.lattice.xyz/api?update=true")).json()) as - // | { specUrl: string }[] - // | undefined) - // : []; - - // const chainSpecs = latticeChains?.map((e) => e.specUrl) || []; - // console.log("Available Lattice chains"); - // console.log(JSON.stringify(latticeChains, null, 2)); - - const answers: Options = - args.upgradeSystems && !args.world - ? await inquirer.prompt([ - { - type: "input", - name: "world", - message: "Provide the address of the World contract to upgrade the systems on.", - when: () => args.world == null && config.world == null, - validate: (i) => { - if (!i || (i[0] == "0" && i[1] == "x" && i.length === 42)) return true; - return "Invalid address"; - }, - }, - ]) - : args.i - ? await inquirer.prompt([ - { - type: "suggest", - name: "chainSpec", - message: "Provide a chainSpec.json location (local or remote)", - suggestions: ["https://spec.testnet-chain.linfra.xyz/chainSpec.json"], - when: () => args.chainSpec == null && config.chainSpec == null, - }, - { - type: "number", - name: "chainId", - default: defaultOptions.chainId, - message: "Provide a chainId for the deployment", - when: (answers) => answers.chainSpec == null && args.chainId == null && config.chainSpec == null, - }, - { - type: "input", - name: "wsRpc", - default: defaultOptions.wsRpc, - message: "Provide a WebSocket RPC endpoint for your deployment", - when: (answers) => answers.chainSpec == null && args.wsRpc == null && config.wsRpc == null, - }, - { - type: "input", - name: "rpc", - default: defaultOptions.rpc, - message: "Provide a JSON RPC endpoint for your deployment", - when: (answers) => answers.chainSpec == null && args.rpc == null && config.rpc == null, - validate: (i) => { - if (isValidHttpUrl(i)) return true; - return "Invalid URL"; - }, - }, - { - type: "input", - name: "world", - message: - "Provide the address of an existing World contract. (If none is given, a new World will be deployed.)", - when: () => args.world == null && config.world == null, - validate: (i) => { - if (!i || (i[0] == "0" && i[1] == "x" && i.length === 42)) return true; - return "Invalid address"; - }, - }, - { - type: "list", - name: "reuseComponents", - message: "Reuse existing components?", - choices: [ - { name: "Yes", value: true }, - { name: "No", value: false }, - ], - default: defaultOptions.reuseComponents, - when: (answers) => - !answers.upgradeSystems && - !args.upgradeSystems && - args.reuseComponents == null && - config.reuseComponents == null, - }, - { - type: "input", - name: "deployerPrivateKey", - message: "Enter private key of the deployer account:", - when: () => !args.deployerPrivateKey && !config.deployerPrivateKey, - validate: (i) => { - if (i[0] == "0" && i[1] == "x" && i.length === 66) return true; - return "Invalid private key"; - }, - }, - { - type: "list", - message: "Deploy the client?", - choices: [ - { name: "Yes", value: true }, - { name: "No", value: false }, - ], - default: defaultOptions.deployClient, - name: "deployClient", - when: () => args.deployClient == null && config.deployClient == null, - }, - { - type: "input", - name: "netlifyPersonalToken", - message: "Enter a netlify personal token for deploying the client:", - when: (answers) => answers.deployClient && !args.netlifyPersonalToken && !config.netlifyPersonalToken, - }, - { - type: "list", - message: "From which netlify account?", - choices: async (answers) => - await getNetlifyAccounts( - args.netlifyPersonalToken ?? config.netlifyPersonalToken ?? answers.netlifyPersonalToken! - ), - name: "netlifySlug", - when: (answers) => answers.deployClient && !args.netlifySlug && !config.netlifySlug, - }, - { - type: "input", - name: "clientUrl", - message: "Enter URL of an already deployed client:", - when: (answers) => !answers.deployClient && !args.clientUrl && !config.clientUrl, - default: "http://localhost:3000", - validate: (i) => { - if (isValidHttpUrl(i)) { - if (i[i.length - 1] === "/") { - return "No trailing slash"; - } - return true; - } else { - return "Not a valid URL"; - } - }, - }, - ]) - : ({} as Options); - - const chainSpecUrl = args.chainSpec ?? config.chainSpec ?? answers.chainSpec; - const chainSpec = !chainSpecUrl - ? null - : isValidHttpUrl(chainSpecUrl) - ? await (await fetch(chainSpecUrl)).json() - : JSON.parse(fs.readFileSync(chainSpecUrl, "utf8")); - - // Priority of config source: command line args >> chainSpec >> local config >> interactive answers >> defaults - // -> Command line args can override every other config, interactive questions are only asked if no other config given for this option - - return { - chainSpec: args.chainSpec ?? config.chainSpec ?? answers.chainSpec ?? defaultOptions.chainSpec, - chainId: args.chainId ?? chainSpec?.chainId ?? config.chainId ?? answers.chainId ?? defaultOptions.chainId, - rpc: args.rpc ?? chainSpec?.rpc ?? config.rpc ?? answers.rpc ?? defaultOptions.rpc, - wsRpc: args.wsRpc ?? chainSpec?.wsRpc ?? config.wsRpc ?? answers.wsRpc ?? defaultOptions.wsRpc, - world: args.world ?? chainSpec?.world ?? config.world ?? answers.world, - reuseComponents: - args.reuseComponents ?? config.reuseComponents ?? answers.reuseComponents ?? defaultOptions.reuseComponents, - deployerPrivateKey: args.deployerPrivateKey ?? config.deployerPrivateKey ?? answers.deployerPrivateKey, - deployClient: args.deployClient ?? config.deployClient ?? answers.deployClient ?? defaultOptions.deployClient, - clientUrl: args.clientUrl ?? config.clientUrl ?? answers.clientUrl ?? defaultOptions.clientUrl, - netlifySlug: args.netlifySlug ?? config.netlifySlug ?? answers.netlifySlug, - netlifyPersonalToken: args.netlifyPersonalToken ?? config.netlifyPersonalToken ?? answers.netlifyPersonalToken, - codespace: args.codespace, - dry: args.dry, - dev: args.dev, - }; -}; - -export const deploy = async (options: Options) => { - const { default: chalk } = await importChalk; - const { execa } = await importExeca; - console.log(); - console.log(chalk.yellow(`>> Deploying contracts <<`)); - - console.log("Options"); - console.log(options); - - const wallet = new ethers.Wallet(options.deployerPrivateKey!); - console.log(chalk.red(`>> Deployer address: ${chalk.bgYellow.black.bold(" " + wallet.address + " ")} <<`)); - console.log(); - - const logger = new Logger({ useIcons: true }); - - const { NetlifyAPI: netlify } = await importNetlify; - - const netlifyAPI = options.deployClient && new netlify(options.netlifyPersonalToken); - const id = v4().substring(0, 6); - - let launcherUrl; - let worldAddress; - - try { - const tasks = new Listr([ - { - title: "Deploying", - task: () => { - return new Listr( - [ - { - title: "Contracts", - task: async (ctx, task) => { - const result = await generateAndDeploy({ - config: "./deploy.json", - rpc: options.rpc!, - worldAddress: options.world, - deployerPrivateKey: wallet.privateKey, - reuseComponents: options.reuseComponents, - }); - - ctx.worldAddress = worldAddress = result.deployedWorldAddress; - ctx.initialBlockNumber = result.initialBlockNumber; - - task.output = chalk.yellow(`World deployed at: ${chalk.bgYellow.black(ctx.worldAddress)}`); - }, - options: { bottomBar: 3 }, - }, - { - title: "Client", - task: () => { - return new Listr( - [ - { - title: "Building", - task: async (_, task) => { - const time = Date.now(); - task.output = "Building local client..."; - const child = execa("yarn", ["workspace", "client", "build"]); - await child; - const duration = Date.now() - time; - task.output = "Client built in " + Math.round(duration / 1000) + "s"; - }, - skip: () => !options.deployClient, - options: { bottomBar: 3 }, - }, - { - title: "Creating", - task: async (ctx, task) => { - const site = await netlifyAPI.createSite({ - body: { - name: `mud-deployment-${wallet.address.substring(2, 8)}-${id}`, - account_slug: options.netlifySlug, - ssl: true, - force_ssl: true, - }, - }); - ctx.siteId = site.id; - ctx.clientUrl = site.ssl_url; - task.output = "Netlify site created with id: " + chalk.bgYellow.black(site.id); - }, - skip: () => !options.deployClient, - options: { bottomBar: 1 }, - }, - { - title: "Deploying", - task: async (ctx, task) => { - const child = execa( - "yarn", - ["workspace", "client", "run", "netlify", "deploy", "--prod", "--dir", "dist"], - { - env: { - NETLIFY_AUTH_TOKEN: options.netlifyPersonalToken, - NETLIFY_SITE_ID: ctx.siteId, - }, - } - ); - child.stdout?.pipe(task.stdout()); - await child; - task.output = chalk.yellow("Netlify site deployed!"); - }, - skip: () => !options.deployClient, - options: { bottomBar: 3 }, - }, - ], - { concurrent: false } - ); - }, - }, - { - title: "Open Launcher", - task: async (ctx) => { - function getCodespaceUrl(port: number, protocol = "https") { - return `${protocol}://${process.env["CODESPACE_NAME"]}-${port}.app.online.visualstudio.com`; - } - - let clientUrl = options.deployClient ? ctx.clientUrl : options.clientUrl; - - if (options.codespace) { - clientUrl = getCodespaceUrl(3000); - options.rpc = getCodespaceUrl(8545); - } - - launcherUrl = `${clientUrl}?chainId=${options.chainId}&worldAddress=${ctx.worldAddress}&rpc=${ - options.rpc - }&wsRpc=${options.wsRpc}&initialBlockNumber=${ - ctx.initialBlockNumber - }&snapshot=&stream=&relay=&faucet=${options.dev ? "&dev=true" : ""}`; - - openurl.open(launcherUrl); - }, - options: { bottomBar: 3 }, - }, - ], - { concurrent: false } - ); - }, - }, - ]); - await tasks.run(); - console.log(chalk.bgGreen.black.bold(" Congratulations! Deployment successful")); - console.log(); - console.log(chalk.green(`World address ${worldAddress}`)); - console.log(chalk.green(`Open launcher at ${launcherUrl}`)); - console.log(); - } catch (e) { - logger.fail((e as Error).message); - } - exit(0); -}; diff --git a/packages/cli/src/commands/devnode.ts b/packages/cli/src/commands/devnode.ts index 3c8e6316e3..2ee4051e6c 100644 --- a/packages/cli/src/commands/devnode.ts +++ b/packages/cli/src/commands/devnode.ts @@ -1,31 +1,37 @@ import { rmSync } from "fs"; import { homedir } from "os"; import path from "path"; -import type { Arguments, CommandBuilder } from "yargs"; -import { execLog } from "../utils"; +import type { CommandModule } from "yargs"; +import { execLog } from "../utils/index.js"; type Options = { blocktime: number; }; -export const command = "devnode"; -export const desc = "Start a local Ethereum node for development"; +const commandModule: CommandModule = { + command: "devnode", -export const builder: CommandBuilder = (yargs) => - yargs.options({ - blocktime: { type: "number", default: 1, decs: "Interval in which new blocks are produced" }, - }); + describe: "Start a local Ethereum node for development", -export const handler = async (argv: Arguments): Promise => { - const { blocktime } = argv; - console.log("Clearing devnode history"); - const userHomeDir = homedir(); - rmSync(path.join(userHomeDir, ".foundry", "anvil", "tmp"), { recursive: true, force: true }); - const { child } = await execLog("anvil", ["-b", String(blocktime), "--block-base-fee-per-gas", "0"]); + builder(yargs) { + return yargs.options({ + blocktime: { type: "number", default: 1, decs: "Interval in which new blocks are produced" }, + }); + }, - process.on("SIGINT", () => { - console.log("\ngracefully shutting down from SIGINT (Crtl-C)"); - child.kill(); - process.exit(); - }); + async handler({ blocktime }) { + console.log("Clearing devnode history"); + const userHomeDir = homedir(); + rmSync(path.join(userHomeDir, ".foundry", "anvil", "tmp"), { recursive: true, force: true }); + const child = execLog("anvil", ["-b", String(blocktime), "--block-base-fee-per-gas", "0"]); + + process.on("SIGINT", () => { + console.log("\ngracefully shutting down from SIGINT (Crtl-C)"); + child.kill(); + process.exit(); + }); + await child; + }, }; + +export default commandModule; diff --git a/packages/cli/src/commands/diamond-abi.ts b/packages/cli/src/commands/diamond-abi.ts deleted file mode 100644 index 0501489fe7..0000000000 --- a/packages/cli/src/commands/diamond-abi.ts +++ /dev/null @@ -1,58 +0,0 @@ -import fs from "fs"; -import glob from "glob"; -import type { Arguments, CommandBuilder } from "yargs"; -import { deferred } from "../utils"; - -type Options = { - include: (string | number)[] | undefined; - exclude: (string | number)[] | undefined; - out: string | undefined; -}; - -export const command = "diamond-abi"; -export const desc = "Merges the abis of different facets of a diamond to a single diamond abi"; - -export const builder: CommandBuilder = (yargs) => - yargs.options({ - include: { type: "array" }, - exclude: { type: "array" }, - out: { type: "string" }, - }); - -export const handler = async (argv: Arguments): Promise => { - const { include: _include, exclude: _exclude, out: _out } = argv; - const wd = process.cwd(); - console.log("Current working directory:", wd); - - const include = (_include as string[]) || [`${wd}/abi/*Facet.json`]; - const exclude = - (_exclude as string[]) || - ["DiamondCutFacet", "DiamondLoupeFacet", "OwnershipFacet"].map((file) => `./abi/${file}.json`); - const out = _out || `${wd}/abi/CombinedFacets.json`; - - // eslint-disable-next-line @typescript-eslint/no-explicit-any - const abi: any[] = []; - - for (const path of include) { - const [resolve, , promise] = deferred(); - glob(path, {}, (_, facets) => { - // Merge all abis matching the path glob - const pathAbi = facets - .filter((facet) => !exclude.includes(facet)) - .map((facet) => require(facet)) - .map((abis) => abis.abi) - .flat(1); - - abi.push(...pathAbi); - resolve(); - }); - - // Make the callback syncronous - await promise; - } - - fs.writeFileSync(out, JSON.stringify({ abi })); - - console.log(`Created diamond abi at ${out}`); - process.exit(0); -}; diff --git a/packages/cli/src/commands/faucet.ts b/packages/cli/src/commands/faucet.ts index fc59a015c1..9eb6f90e66 100644 --- a/packages/cli/src/commands/faucet.ts +++ b/packages/cli/src/commands/faucet.ts @@ -1,5 +1,5 @@ -import type { Arguments, CommandBuilder } from "yargs"; -import { FaucetServiceDefinition } from "@latticexyz/services/protobuf/ts/faucet/faucet"; +import type { CommandModule } from "yargs"; +import { FaucetServiceDefinition } from "@latticexyz/services/protobuf/ts/faucet/faucet.js"; import { createChannel, createClient } from "nice-grpc-web"; import chalk from "chalk"; import { NodeHttpTransport } from "@improbable-eng/grpc-web-node-http-transport"; @@ -10,47 +10,51 @@ type Options = { address: string; }; -export const command = "faucet"; -export const desc = "Interact with a MUD faucet"; - /** * Create a FaucetServiceClient * @param url FaucetService URL * @returns FaucetServiceClient */ -export function createFaucetService(url: string) { +function createFaucetService(url: string) { return createClient(FaucetServiceDefinition, createChannel(url, NodeHttpTransport())); } -export const builder: CommandBuilder = (yargs) => - yargs.options({ - dripDev: { - type: "boolean", - desc: "Request a drip from the dev endpoint (requires faucet to have dev mode enabled)", - default: true, - }, - faucetUrl: { - type: "string", - desc: "URL of the MUD faucet", - default: "https://faucet.testnet-mud-services.linfra.xyz", - }, - address: { - type: "string", - desc: "Ethereum address to fund", - required: true, - }, - }); - -export const handler = async (argv: Arguments): Promise => { - const { dripDev, faucetUrl, address } = argv; - - const faucet = createFaucetService(faucetUrl); - - if (dripDev) { - console.log(chalk.yellow("Dripping to", address)); - await faucet.dripDev({ address }); - console.log(chalk.yellow("Success")); - } - - process.exit(0); +const commandModule: CommandModule = { + command: "faucet", + + describe: "Interact with a MUD faucet", + + builder(yargs) { + return yargs.options({ + dripDev: { + type: "boolean", + desc: "Request a drip from the dev endpoint (requires faucet to have dev mode enabled)", + default: true, + }, + faucetUrl: { + type: "string", + desc: "URL of the MUD faucet", + default: "https://faucet.testnet-mud-services.linfra.xyz", + }, + address: { + type: "string", + desc: "Ethereum address to fund", + required: true, + }, + }); + }, + + async handler({ dripDev, faucetUrl, address }) { + const faucet = createFaucetService(faucetUrl); + + if (dripDev) { + console.log(chalk.yellow("Dripping to", address)); + await faucet.dripDev({ address }); + console.log(chalk.yellow("Success")); + } + + process.exit(0); + }, }; + +export default commandModule; diff --git a/packages/cli/src/commands/gas-report.ts b/packages/cli/src/commands/gas-report.ts index f66c23a4e1..2062e5a197 100644 --- a/packages/cli/src/commands/gas-report.ts +++ b/packages/cli/src/commands/gas-report.ts @@ -1,4 +1,4 @@ -import type { Arguments, CommandBuilder } from "yargs"; +import type { CommandModule } from "yargs"; import { readFileSync, writeFileSync, rmSync } from "fs"; import { execa } from "execa"; import chalk from "chalk"; @@ -39,64 +39,68 @@ type GasReportEntry = { type GasReport = GasReportEntry[]; -export const command = "gas-report"; -export const desc = "Create a gas report"; +const commandModule: CommandModule = { + command: "gas-report", -export const builder: CommandBuilder = (yargs) => - yargs.options({ - path: { type: "array", default: ["Gas.t.sol"], desc: "File containing the gas tests" }, - save: { type: "string", desc: "Save the gas report to a file" }, - compare: { type: "string", desc: "Compare to an existing gas report" }, - }); + describe: "Create a gas report", -export const handler = async (args: Arguments): Promise => { - const { path, save } = args; - let { compare } = args; - let gasReport: GasReport = []; + builder(yargs) { + return yargs.options({ + path: { type: "array", string: true, default: ["Gas.t.sol"], desc: "File containing the gas tests" }, + save: { type: "string", desc: "Save the gas report to a file" }, + compare: { type: "string", desc: "Compare to an existing gas report" }, + }); + }, - // Iterate through all files provided in the path - for (const file of path) { - gasReport = gasReport.concat(await runGasReport(file)); - } + async handler({ path, save, compare }) { + let gasReport: GasReport = []; + + // Iterate through all files provided in the path + for (const file of path) { + gasReport = gasReport.concat(await runGasReport(file)); + } - // If this gas report should be compared to an existing one, load the existing one - const compareGasReport: GasReport = []; - if (compare) { - try { - const compareFileContents = readFileSync(compare, "utf8"); - // Create a regex to extract the name, function call and gas used - const compareGasReportRegex = new RegExp(/\((.*)\) \| (.*) \[(.*)\]: (.*)/g); - // Loop through the matches and add the resuls to the compareGasReport - let compareGasReportMatch; - while ((compareGasReportMatch = compareGasReportRegex.exec(compareFileContents)) !== null) { - const source = compareGasReportMatch[1]; - const name = compareGasReportMatch[2]; - const functionCall = compareGasReportMatch[3]; - const gasUsed = compareGasReportMatch[4]; - - compareGasReport.push({ source, name, functionCall, gasUsed: parseInt(gasUsed) }); + // If this gas report should be compared to an existing one, load the existing one + const compareGasReport: GasReport = []; + if (compare) { + try { + const compareFileContents = readFileSync(compare, "utf8"); + // Create a regex to extract the name, function call and gas used + const compareGasReportRegex = new RegExp(/\((.*)\) \| (.*) \[(.*)\]: (.*)/g); + // Loop through the matches and add the resuls to the compareGasReport + let compareGasReportMatch; + while ((compareGasReportMatch = compareGasReportRegex.exec(compareFileContents)) !== null) { + const source = compareGasReportMatch[1]; + const name = compareGasReportMatch[2]; + const functionCall = compareGasReportMatch[3]; + const gasUsed = compareGasReportMatch[4]; + + compareGasReport.push({ source, name, functionCall, gasUsed: parseInt(gasUsed) }); + } + } catch { + console.log(chalk.red(`Gas report to compare not found: ${compare}`)); + compare = undefined; } - } catch { - console.log(chalk.red(`Gas report to compare not found: ${compare}`)); - compare = undefined; } - } - // Merge the previous gas report with the new one - gasReport = gasReport.map((entry) => { - const prevEntry = compareGasReport.find((e) => e.name === entry.name && e.functionCall === entry.functionCall); - return { ...entry, prevGasUsed: prevEntry?.gasUsed }; - }); + // Merge the previous gas report with the new one + gasReport = gasReport.map((entry) => { + const prevEntry = compareGasReport.find((e) => e.name === entry.name && e.functionCall === entry.functionCall); + return { ...entry, prevGasUsed: prevEntry?.gasUsed }; + }); - // Print gas report - printGasReport(gasReport, compare); + // Print gas report + printGasReport(gasReport, compare); - // Save gas report to file if requested - if (save) saveGasReport(gasReport, save); + // Save gas report to file if requested + if (save) saveGasReport(gasReport, save); - process.exit(0); + process.exit(0); + }, }; +export default commandModule; + async function runGasReport(path: string): Promise { if (!path.endsWith(".t.sol")) { console.log("Skipping gas report for", chalk.bold(path), "(not a test file)"); @@ -125,7 +129,6 @@ async function runGasReport(path: string): Promise { // Apply the regex and loop through the matches, // and create a new file with the gasreport comments replaced by the gas report let match; - let i = 0; while ((match = regex.exec(fileContents)) !== null) { const name = match[1]; const functionCall = match[2].trim(); @@ -138,8 +141,6 @@ ${functionCall} _gasreport = _gasreport - gasleft(); console.log("GAS REPORT: ${name} [${functionCall.replaceAll('"', '\\"')}]:", _gasreport);` ); - - i++; } // Remove all occurrences of `pure` with `view` diff --git a/packages/cli/src/commands/hello.ts b/packages/cli/src/commands/hello.ts index 7099cded1e..1849744769 100644 --- a/packages/cli/src/commands/hello.ts +++ b/packages/cli/src/commands/hello.ts @@ -1,23 +1,28 @@ -import type { Arguments, CommandBuilder } from "yargs"; +import type { CommandModule } from "yargs"; type Options = { name: string; upper: boolean | undefined; }; -export const command = "hello "; -export const desc = "Greet with Hello"; +const commandModule: CommandModule = { + command: "hello ", -export const builder: CommandBuilder = (yargs) => - yargs - .options({ - upper: { type: "boolean" }, - }) - .positional("name", { type: "string", demandOption: true }); + describe: "Greet with Hello", -export const handler = (argv: Arguments): void => { - const { name } = argv; - const greeting = `Gm, ${name}!`; - console.log(greeting); - process.exit(0); + builder(yargs) { + return yargs + .options({ + upper: { type: "boolean" }, + }) + .positional("name", { type: "string", demandOption: true }); + }, + + handler({ name }) { + const greeting = `Gm, ${name}!`; + console.log(greeting); + process.exit(0); + }, }; + +export default commandModule; diff --git a/packages/cli/src/commands/index.ts b/packages/cli/src/commands/index.ts new file mode 100644 index 0000000000..a51047280f --- /dev/null +++ b/packages/cli/src/commands/index.ts @@ -0,0 +1,32 @@ +import { CommandModule } from "yargs"; + +import bulkupload from "./bulkupload.js"; +import callSystem from "./call-system.js"; +import codegenLibdeploy from "./codegen-libdeploy.js"; +import deployContracts from "./deploy-contracts.js"; +import devnode from "./devnode.js"; +import faucet from "./faucet.js"; +import gasReport from "./gas-report.js"; +import hello from "./hello.js"; +import systemTypes from "./system-types.js"; +import tablegen from "./tablegen.js"; +import test from "./test.js"; +import trace from "./trace.js"; +import types from "./types.js"; + +// eslint-disable-next-line @typescript-eslint/no-explicit-any -- Each command has different options +export const commands: CommandModule[] = [ + bulkupload, + callSystem, + codegenLibdeploy, + deployContracts, + devnode, + faucet, + gasReport, + hello, + systemTypes, + tablegen, + test, + trace, + types, +]; diff --git a/packages/cli/src/commands/sync-art.ts b/packages/cli/src/commands/sync-art.ts deleted file mode 100644 index c1aa1cffe9..0000000000 --- a/packages/cli/src/commands/sync-art.ts +++ /dev/null @@ -1,47 +0,0 @@ -import { Arguments, CommandBuilder } from "yargs"; -import { exec } from "../utils"; - -type Options = { - repo: string; - commitHash?: string; -}; - -export const command = "sync-art "; -export const desc = "Syncs art from a MUD-compatible art repo, found in "; - -export const builder: CommandBuilder = (yargs) => - yargs.positional("repo", { type: "string", demandOption: true }).options({ - commitHash: { type: "string" }, - }); - -export const handler = async (argv: Arguments): Promise => { - const { repo, commitHash } = argv; - console.log("Syncing art repo from", repo); - const clean = await exec(`git diff --quiet --exit-code`); - if (clean !== 0) { - console.log("Directory is not clean! Please git add and commit"); - process.exit(0); - } - - console.log("Cloning..."); - await exec(`git clone ${repo} _artmudtemp`); - if (commitHash) { - await exec(`cd _artmudtemp && git reset --hard ${commitHash} && cd -`); - } - - console.log("Moving atlases..."); - await exec(`cp -r _artmudtemp/atlases src/public`); - - console.log("Moving tilesets..."); - await exec(`cp -r _artmudtemp/tilesets src/layers/Renderer/assets`); - - console.log("Moving tileset types..."); - await exec(`cp -r _artmudtemp/types/ src/layers/Renderer/Phaser/tilesets/`); - - console.log("Cleaning up..."); - await exec(`rm -rf _artmudtemp`); - - console.log("Committing..."); - await exec(`git add src/public && git add src/layers/Renderer && git commit -m "feat(art): adding art from ${repo}"`); - process.exit(0); -}; diff --git a/packages/cli/src/commands/system-types.ts b/packages/cli/src/commands/system-types.ts index e97a850a67..96e9e055f5 100644 --- a/packages/cli/src/commands/system-types.ts +++ b/packages/cli/src/commands/system-types.ts @@ -1,24 +1,29 @@ -import type { Arguments, CommandBuilder } from "yargs"; -import { generateSystemTypes } from "../utils"; -import { systemsDir } from "../utils/constants"; +import type { CommandModule } from "yargs"; +import { generateSystemTypes } from "../utils/index.js"; +import { systemsDir } from "../utils/constants.js"; type Options = { outputDir: string; }; -export const command = "system-types"; -export const desc = `Generates system type file. Note: assumes contracts of all systems in /${systemsDir} folder, ABIs of all systems in ./abi and typechain generated types in ./types/ethers-contracts`; +const commandModule: CommandModule = { + command: "system-types", -export const builder: CommandBuilder = (yargs) => - yargs.options({ - outputDir: { - type: "string", - description: "generated types directory, defaults to ./types", - default: "./types", - }, - }); + describe: `Generates system type file. Note: assumes contracts of all systems in /${systemsDir} folder, ABIs of all systems in ./abi and typechain generated types in ./types/ethers-contracts`, -export const handler = async (args: Arguments): Promise => { - const { outputDir } = args; - await generateSystemTypes(outputDir); + builder(yargs) { + return yargs.options({ + outputDir: { + type: "string", + description: "generated types directory, defaults to ./types", + default: "./types", + }, + }); + }, + + async handler({ outputDir }) { + await generateSystemTypes(outputDir); + }, }; + +export default commandModule; diff --git a/packages/cli/src/commands/tablegen.ts b/packages/cli/src/commands/tablegen.ts new file mode 100644 index 0000000000..78876458a9 --- /dev/null +++ b/packages/cli/src/commands/tablegen.ts @@ -0,0 +1,46 @@ +import type { CommandModule } from "yargs"; +import { mkdirSync, writeFileSync } from "fs"; +import path from "path"; +import { loadStoreConfig } from "../config/loadStoreConfig.js"; +import { renderTablesFromConfig } from "../render-table/index.js"; +import { getSrcDirectory } from "../utils/forgeConfig.js"; +import { formatSolidity } from "../utils/format.js"; + +type Options = { + configPath?: string; +}; + +const commandModule: CommandModule = { + command: "tablegen", + + describe: "Autogenerate MUD Store table libraries based on the config file", + + builder(yargs) { + return yargs.options({ + configPath: { type: "string", desc: "Path to the config file" }, + }); + }, + + async handler({ configPath }) { + const srcDir = await getSrcDirectory(); + + const config = await loadStoreConfig(configPath); + const renderedTables = renderTablesFromConfig(config); + + for (const { output, tableName } of renderedTables) { + const formattedOutput = await formatSolidity(output); + + const tablePath = config.tables[tableName].route; + const outputDirectory = path.join(srcDir, tablePath); + mkdirSync(outputDirectory, { recursive: true }); + + const outputPath = path.join(outputDirectory, `${tableName}.sol`); + writeFileSync(outputPath, formattedOutput); + console.log(`Generated schema: ${outputPath}`); + } + + process.exit(0); + }, +}; + +export default commandModule; diff --git a/packages/cli/src/commands/test.ts b/packages/cli/src/commands/test.ts index 5fa5224e38..6a1a387da9 100644 --- a/packages/cli/src/commands/test.ts +++ b/packages/cli/src/commands/test.ts @@ -1,6 +1,6 @@ -import type { Arguments, CommandBuilder } from "yargs"; -import { execLog, generateLibDeploy, resetLibDeploy } from "../utils"; -import { getTestDirectory } from "../utils/forgeConfig"; +import type { CommandModule } from "yargs"; +import { execLog, generateLibDeploy, resetLibDeploy } from "../utils/index.js"; +import { getTestDirectory } from "../utils/forgeConfig.js"; type Options = { forgeOpts?: string; @@ -8,38 +8,43 @@ type Options = { v: number; }; -export const command = "test"; -export const desc = "Run contract tests"; - -export const builder: CommandBuilder = (yargs) => - yargs.options({ - forgeOpts: { type: "string", desc: "Options passed to `forge test` command" }, - config: { type: "string", default: "./deploy.json", desc: "Component and system deployment configuration" }, - v: { type: "number", default: 2, desc: "Verbosity for forge test" }, - }); - -export const handler = async (argv: Arguments): Promise => { - const { forgeOpts, config, v } = argv; - const testDir = await getTestDirectory(); - - // Generate LibDeploy.sol - console.log("Generate LibDeploy.sol"); - await generateLibDeploy(config, testDir); - - // Call forge test - const { child } = await execLog("forge", [ - "test", - ...(v ? ["-" + [...new Array(v)].map(() => "v").join("")] : []), - ...(forgeOpts?.split(" ") || []), - ]); - - // Reset LibDeploy.sol - console.log("Reset LibDeploy.sol"); - await resetLibDeploy(testDir); - - process.on("SIGINT", () => { - console.log("\ngracefully shutting down from SIGINT (Crtl-C)"); - child.kill(); - process.exit(); - }); +const commandModule: CommandModule = { + command: "test", + + describe: "Run contract tests", + + builder(yargs) { + return yargs.options({ + forgeOpts: { type: "string", desc: "Options passed to `forge test` command" }, + config: { type: "string", default: "./deploy.json", desc: "Component and system deployment configuration" }, + v: { type: "number", default: 2, desc: "Verbosity for forge test" }, + }); + }, + + async handler({ forgeOpts, config, v }) { + const testDir = await getTestDirectory(); + + // Generate LibDeploy.sol + console.log("Generate LibDeploy.sol"); + await generateLibDeploy(config, testDir); + + // Call forge test + const child = execLog("forge", [ + "test", + ...(v ? ["-" + [...new Array(v)].map(() => "v").join("")] : []), + ...(forgeOpts?.split(" ") || []), + ]); + + // Reset LibDeploy.sol + console.log("Reset LibDeploy.sol"); + await resetLibDeploy(testDir); + + process.on("SIGINT", () => { + console.log("\ngracefully shutting down from SIGINT (Crtl-C)"); + child.kill(); + process.exit(); + }); + }, }; + +export default commandModule; diff --git a/packages/cli/src/commands/trace.ts b/packages/cli/src/commands/trace.ts index bed33a6c4e..1cea44509b 100644 --- a/packages/cli/src/commands/trace.ts +++ b/packages/cli/src/commands/trace.ts @@ -1,12 +1,12 @@ -import { Arguments, CommandBuilder } from "yargs"; -import { execLog, extractIdFromFile, keccak256 } from "../utils"; +import type { CommandModule } from "yargs"; +import { execLog, extractIdFromFile, keccak256 } from "../utils/index.js"; import { readFileSync } from "fs"; import { Contract } from "ethers"; import { JsonRpcProvider } from "@ethersproject/providers"; -import { abi as WorldAbi } from "@latticexyz/solecs/abi/World.json"; -import { getSrcDirectory } from "../utils/forgeConfig"; +import WorldAbi from "@latticexyz/solecs/abi/World.json" assert { type: "json" }; +import { getSrcDirectory } from "../utils/forgeConfig.js"; import path from "path"; -import { componentsDir, systemsDir } from "../utils/constants"; +import { componentsDir, systemsDir } from "../utils/constants.js"; type Options = { config?: string; @@ -16,61 +16,66 @@ type Options = { debug?: boolean; }; -export const command = "trace"; -export const desc = "Display the trace of a transaction"; +const commandModule: CommandModule = { + command: "trace", -export const builder: CommandBuilder = (yargs) => - yargs.options({ - config: { type: "string", description: "path to mud deploy config (deploy.json)" }, - world: { type: "string", required: true, description: "world contract address" }, - tx: { type: "string", required: true, description: "tx hash to replay" }, - rpc: { type: "string", description: "json rpc endpoint, defaults to http://localhost:8545" }, - debug: { type: "boolean", description: "open debugger" }, - }); + describe: "Display the trace of a transaction", -export const handler = async (argv: Arguments): Promise => { - const { config, world, rpc, tx, debug } = argv; - const wd = process.cwd(); - const deployData = config && JSON.parse(readFileSync(config, { encoding: "utf8" })); - const labels = []; + builder(yargs) { + return yargs.options({ + config: { type: "string", description: "path to mud deploy config (deploy.json)" }, + world: { type: "string", required: true, description: "world contract address" }, + tx: { type: "string", required: true, description: "tx hash to replay" }, + rpc: { type: "string", description: "json rpc endpoint, defaults to http://localhost:8545" }, + debug: { type: "boolean", description: "open debugger" }, + }); + }, - const rpcUrl = rpc || "http://localhost:8545"; - const provider = new JsonRpcProvider(rpcUrl); - const World = new Contract(world, WorldAbi, provider); + async handler({ config, world, rpc, tx, debug }) { + const wd = process.cwd(); + const deployData = config && JSON.parse(readFileSync(config, { encoding: "utf8" })); + const labels = []; - if (deployData) { - const srcDir = await getSrcDirectory(); + const rpcUrl = rpc || "http://localhost:8545"; + const provider = new JsonRpcProvider(rpcUrl); + const World = new Contract(world, WorldAbi.abi, provider); - // Create component labels - const componentPromises = deployData.components.map(async (component: string) => { - const filePath = path.join(wd, srcDir, componentsDir, `${component}.sol`); - const id = extractIdFromFile(filePath); - if (!id) return; - const address = await World.getComponent(keccak256(id)); - return [component, address]; - }); - // Create system labels - const systemPromises = deployData.systems.map(async (system: { name: string }) => { - const filePath = path.join(wd, srcDir, systemsDir, `${system.name}.sol`); - const id = extractIdFromFile(filePath); - if (!id) return; - const address = await World.getSystemAddress(keccak256(id)); - return [system.name, address]; - }); + if (deployData) { + const srcDir = await getSrcDirectory(); - const components = await Promise.all(componentPromises); - const systems = await Promise.all(systemPromises); + // Create component labels + const componentPromises = deployData.components.map(async (component: string) => { + const filePath = path.join(wd, srcDir, componentsDir, `${component}.sol`); + const id = extractIdFromFile(filePath); + if (!id) return; + const address = await World.getComponent(keccak256(id)); + return [component, address]; + }); + // Create system labels + const systemPromises = deployData.systems.map(async (system: { name: string }) => { + const filePath = path.join(wd, srcDir, systemsDir, `${system.name}.sol`); + const id = extractIdFromFile(filePath); + if (!id) return; + const address = await World.getSystemAddress(keccak256(id)); + return [system.name, address]; + }); - labels.push(...components, ...systems); - } - await execLog("cast", [ - "run", - ...labels.map((label) => ["--label", `${label[1]}:${label[0]}`]).flat(), - ...(debug ? ["--debug"] : []), - `--rpc-url`, - `${rpcUrl}`, - `${tx}`, - ]); + const components = await Promise.all(componentPromises); + const systems = await Promise.all(systemPromises); - process.exit(0); + labels.push(...components, ...systems); + } + await execLog("cast", [ + "run", + ...labels.map((label) => ["--label", `${label[1]}:${label[0]}`]).flat(), + ...(debug ? ["--debug"] : []), + `--rpc-url`, + `${rpcUrl}`, + `${tx}`, + ]); + + process.exit(0); + }, }; + +export default commandModule; diff --git a/packages/cli/src/commands/types.ts b/packages/cli/src/commands/types.ts index 2a025b599d..4286ab0981 100644 --- a/packages/cli/src/commands/types.ts +++ b/packages/cli/src/commands/types.ts @@ -1,29 +1,33 @@ -import path from "path"; -import { Arguments, CommandBuilder } from "yargs"; -import { filterAbi, forgeBuild, generateAbiTypes, generateSystemTypes, generateTypes } from "../utils"; +import type { CommandModule } from "yargs"; +import { generateTypes } from "../utils/index.js"; type Options = { abiDir?: string; outputDir: string; }; -export const command = "types"; -export const desc = "Generates typescript types for contracts and systems."; +const commandModule: CommandModule = { + command: "types", -export const builder: CommandBuilder = (yargs) => - yargs.options({ - abiDir: { - type: "string", - description: "Input directory of existing ABI to use to generate types. If not provided, contracts are built.", - }, - outputDir: { - type: "string", - description: "Output directory for generated types. Defaults to ./types", - default: "./types", - }, - }); + describe: "Generates typescript types for contracts and systems.", -export const handler = async (args: Arguments): Promise => { - const { abiDir, outputDir } = args; - await generateTypes(abiDir, outputDir, { clear: true }); + builder(yargs) { + return yargs.options({ + abiDir: { + type: "string", + description: "Input directory of existing ABI to use to generate types. If not provided, contracts are built.", + }, + outputDir: { + type: "string", + description: "Output directory for generated types. Defaults to ./types", + default: "./types", + }, + }); + }, + + async handler({ abiDir, outputDir }) { + await generateTypes(abiDir, outputDir, { clear: true }); + }, }; + +export default commandModule; diff --git a/packages/cli/src/config/commonSchemas.ts b/packages/cli/src/config/commonSchemas.ts new file mode 100644 index 0000000000..c58c16dacf --- /dev/null +++ b/packages/cli/src/config/commonSchemas.ts @@ -0,0 +1,20 @@ +import { z } from "zod"; +import { + validateBaseRoute, + validateCapitalizedName, + validateRoute, + validateSingleLevelRoute, + validateUncapitalizedName, +} from "./validation.js"; + +/** Capitalized names of objects, like tables and systems */ +export const ObjectName = z.string().superRefine(validateCapitalizedName); +/** Uncapitalized names of values, like keys and columns */ +export const ValueName = z.string().superRefine(validateUncapitalizedName); + +/** Ordinary routes */ +export const OrdinaryRoute = z.string().superRefine(validateRoute); +/** Routes with exactly 1 non-empty level */ +export const SingleLevelRoute = z.string().superRefine(validateSingleLevelRoute); +/** Base routes (can be an empty string) */ +export const BaseRoute = z.string().superRefine(validateBaseRoute); diff --git a/packages/cli/src/config/loadConfig.ts b/packages/cli/src/config/loadConfig.ts new file mode 100644 index 0000000000..0115168fc0 --- /dev/null +++ b/packages/cli/src/config/loadConfig.ts @@ -0,0 +1,39 @@ +import { findUp } from "find-up"; +import path from "path"; +import { NotESMConfigError, NotInsideProjectError } from "../utils/errors.js"; + +// In order of preference files are checked +const configFiles = ["mud.config.ts", "mud.config.mts"]; + +export async function loadConfig(configPath?: string): Promise { + configPath = await resolveConfigPath(configPath); + try { + return (await import(configPath)).default; + } catch (error) { + if (error instanceof SyntaxError && error.message === "Cannot use import statement outside a module") { + throw new NotESMConfigError(); + } else { + throw error; + } + } +} + +async function resolveConfigPath(configPath: string | undefined) { + if (configPath === undefined) { + configPath = await getUserConfigPath(); + } else { + if (!path.isAbsolute(configPath)) { + configPath = path.join(process.cwd(), configPath); + configPath = path.normalize(configPath); + } + } + return configPath; +} + +async function getUserConfigPath() { + const tsConfigPath = await findUp(configFiles); + if (tsConfigPath === undefined) { + throw new NotInsideProjectError(); + } + return tsConfigPath; +} diff --git a/packages/cli/src/config/loadStoreConfig.test-d.ts b/packages/cli/src/config/loadStoreConfig.test-d.ts new file mode 100644 index 0000000000..5fc65d80c7 --- /dev/null +++ b/packages/cli/src/config/loadStoreConfig.test-d.ts @@ -0,0 +1,11 @@ +import { describe, expectTypeOf } from "vitest"; +import { z } from "zod"; +import { StoreConfig, StoreUserConfig } from "./loadStoreConfig.js"; + +describe("loadStoreConfig", () => { + // Typecheck manual interfaces against zod + expectTypeOf().toEqualTypeOf>(); + // type equality isn't deep for optionals + expectTypeOf().toEqualTypeOf["tables"][string]>(); + // TODO If more nested schemas are added, provide separate tests for them +}); diff --git a/packages/cli/src/config/loadStoreConfig.ts b/packages/cli/src/config/loadStoreConfig.ts new file mode 100644 index 0000000000..b52b86a0e6 --- /dev/null +++ b/packages/cli/src/config/loadStoreConfig.ts @@ -0,0 +1,100 @@ +import { SchemaType, getStaticByteLength } from "@latticexyz/schema-type"; +import { z, ZodError } from "zod"; +import { fromZodErrorCustom } from "../utils/errors.js"; +import { BaseRoute, ObjectName, OrdinaryRoute, ValueName } from "./commonSchemas.js"; +import { loadConfig } from "./loadConfig.js"; + +const TableName = ObjectName; +const KeyName = ValueName; +const ColumnName = ValueName; + +const PrimaryKey = z + .nativeEnum(SchemaType) + .refine((arg) => getStaticByteLength(arg) > 0, "Primary key must not use dynamic SchemaType"); +const PrimaryKeys = z.record(KeyName, PrimaryKey).default({ key: SchemaType.BYTES32 }); + +const Schema = z + .record(ColumnName, z.nativeEnum(SchemaType)) + .refine((arg) => Object.keys(arg).length > 0, "Table schema may not be empty"); + +const FullTable = z + .object({ + route: OrdinaryRoute.default("/tables"), + tableIdArgument: z.boolean().default(false), + storeArgument: z.boolean().default(false), + primaryKeys: PrimaryKeys, + schema: Schema, + dataStruct: z.boolean().optional(), + }) + .transform((arg) => { + // default dataStruct value depends on schema's length + if (Object.keys(arg.schema).length === 1) { + arg.dataStruct ??= false; + } else { + arg.dataStruct ??= true; + } + return arg as Omit & Required>; + }); + +const DefaultSingleValueTable = z.nativeEnum(SchemaType).transform((schemaType) => { + return FullTable.parse({ + schema: { + value: schemaType, + }, + }); +}); + +export const StoreConfig = z.object({ + baseRoute: BaseRoute.default(""), + storeImportPath: z.string().default("@latticexyz/store/src/"), + tables: z.record(TableName, z.union([DefaultSingleValueTable, FullTable])), +}); + +// zod doesn't preserve doc comments +export interface StoreUserConfig { + /** The base route prefix for table ids. Default is "" (empty string) */ + baseRoute?: string; + /** Path for store package imports. Default is "@latticexyz/store/src/" */ + storeImportPath?: string; + /** + * Configuration for each table. + * + * The key is the table name (capitalized). + * + * The value: + * - SchemaType for a single-value table (aka ECS component). + * - FullTableConfig object for multi-value tables (or for customizable options). + */ + tables: Record; +} + +interface FullTableConfig { + /** Output path for the file, and relevant for the table id. The table id will be keccak256(concat(baseRoute,route,tableName)). Default is "tables/" */ + route?: string; + /** Make methods accept `tableId` argument instead of it being a hardcoded constant. Default is false */ + tableIdArgument?: boolean; + /** Include methods that accept a manual `IStore` argument. Default is false. */ + storeArgument?: boolean; + /** Include a data struct and methods for it. Default is false for 1-column tables; true for multi-column tables. */ + dataStruct?: boolean; + /** Table's primary key names mapped to their types. Default is `{ key: SchemaType.BYTES32 }` */ + primaryKeys?: Record; + /** Table's column names mapped to their types. Table name's 1st letter should be lowercase. */ + schema: Record; +} + +export type StoreConfig = z.output; + +export async function loadStoreConfig(configPath?: string) { + const config = await loadConfig(configPath); + + try { + return StoreConfig.parse(config); + } catch (error) { + if (error instanceof ZodError) { + throw fromZodErrorCustom(error, "StoreConfig Validation Error"); + } else { + throw error; + } + } +} diff --git a/packages/cli/src/config/validation.ts b/packages/cli/src/config/validation.ts new file mode 100644 index 0000000000..d161738027 --- /dev/null +++ b/packages/cli/src/config/validation.ts @@ -0,0 +1,92 @@ +import { ZodIssueCode, RefinementCtx } from "zod"; + +export function validateName(name: string, ctx: RefinementCtx) { + if (!/^\w+$/.test(name)) { + ctx.addIssue({ + code: ZodIssueCode.custom, + message: `Name must contain only alphanumeric & underscore characters`, + }); + } +} + +export function validateCapitalizedName(name: string, ctx: RefinementCtx) { + validateName(name, ctx); + + if (!/^[A-Z]/.test(name)) { + ctx.addIssue({ + code: ZodIssueCode.custom, + message: `Name must start with a capital letter`, + }); + } +} + +export function validateUncapitalizedName(name: string, ctx: RefinementCtx) { + validateName(name, ctx); + + if (!/^[a-z]/.test(name)) { + ctx.addIssue({ + code: ZodIssueCode.custom, + message: `Name must start with a lowercase letter`, + }); + } +} + +function _factoryForValidateRoute(requireNonEmpty: boolean, requireSingleLevel: boolean) { + return (route: string, ctx: RefinementCtx) => { + if (route === "") { + if (requireNonEmpty) { + ctx.addIssue({ + code: ZodIssueCode.custom, + message: `Route must not be empty`, + }); + } + // we can skip further validation for empty routes + return; + } + + if (route[0] !== "/") { + ctx.addIssue({ + code: ZodIssueCode.custom, + message: `Route must start with "/"`, + }); + } + + if (route[route.length - 1] === "/") { + ctx.addIssue({ + code: ZodIssueCode.custom, + message: `Route must not end with "/"`, + }); + } + + const parts = route.split("/"); + if (requireSingleLevel && parts.length > 2) { + ctx.addIssue({ + code: ZodIssueCode.custom, + message: `Route must only have one level (e.g. "/foo")`, + }); + } + + // start at 1 to skip the first empty part + for (let i = 1; i < parts.length; i++) { + if (parts[i] === "") { + ctx.addIssue({ + code: ZodIssueCode.custom, + message: `Route must not contain empty route fragments (e.g. "//")`, + }); + } + + if (!/^\w+$/.test(parts[i])) { + ctx.addIssue({ + code: ZodIssueCode.custom, + message: `Route must contain only alphanumeric & underscore characters`, + }); + } + } + }; +} + +export const validateRoute = _factoryForValidateRoute(true, false); + +export const validateBaseRoute = _factoryForValidateRoute(false, false); + +export const validateSingleLevelRoute = _factoryForValidateRoute(true, true); diff --git a/packages/cli/src/index.ts b/packages/cli/src/index.ts old mode 100644 new mode 100755 index 2185bfc993..44894b2ddd --- a/packages/cli/src/index.ts +++ b/packages/cli/src/index.ts @@ -1,16 +1 @@ -#!/usr/bin/env node -/* eslint-disable @typescript-eslint/no-var-requires */ - -// Using require to avoid "YError: loading a directory of commands is not supported yet for ESM" error -const yargs = require("yargs"); -const { hideBin } = require("yargs/helpers"); - -global.self = (1, eval)("this"); // https://stackoverflow.com/questions/9107240/1-evalthis-vs-evalthis-in-javascript - -yargs(hideBin(process.argv)) - // Use the commands directory to scaffold. - .commandDir("commands") - // Enable strict mode. - .strict() - // Useful aliases. - .alias({ h: "help" }).argv; +export type { StoreUserConfig, StoreConfig } from "./config/loadStoreConfig.js"; diff --git a/packages/cli/src/mud.ts b/packages/cli/src/mud.ts new file mode 100755 index 0000000000..b14604734f --- /dev/null +++ b/packages/cli/src/mud.ts @@ -0,0 +1,25 @@ +#!/usr/bin/env -S TS_NODE_COMPILER_OPTIONS={\"module\":\"esnext\"} node --loader=ts-node/esm --no-warnings + +import yargs from "yargs"; +import { hideBin } from "yargs/helpers"; +import { commands } from "./commands/index.js"; +import { logError } from "./utils/errors.js"; + +yargs(hideBin(process.argv)) + // Explicit name to display in help (by default it's the entry file, which may not be "mud" for e.g. ts-node) + .scriptName("mud") + // Use the commands directory to scaffold + // eslint-disable-next-line @typescript-eslint/no-explicit-any -- command array overload isn't typed, see https://github.com/yargs/yargs/blob/main/docs/advanced.md#esm-hierarchy + .command(commands as any) + // Enable strict mode. + .strict() + // Custom error handler + .fail((msg, err) => { + console.log(""); + logError(err); + console.log(""); + + process.exit(1); + }) + // Useful aliases. + .alias({ h: "help" }).argv; diff --git a/packages/cli/src/render-table/common.ts b/packages/cli/src/render-table/common.ts new file mode 100644 index 0000000000..6c2733d8ed --- /dev/null +++ b/packages/cli/src/render-table/common.ts @@ -0,0 +1,67 @@ +import { RenderTableOptions } from "./types.js"; + +/** + * Renders a list of lines + */ +export function renderList(list: T[], renderItem: (item: T, index: number) => string) { + return internalRenderList("", list, renderItem); +} + +/** + * Renders a comma-separated list of arguments for solidity functions, ignoring empty and undefined ones + */ +export function renderArguments(args: (string | undefined)[]) { + const filteredArgs = args.filter((arg) => arg !== undefined && arg !== "") as string[]; + return internalRenderList(",", filteredArgs, (arg) => arg); +} + +export function renderCommonData({ staticRouteData, primaryKeys }: RenderTableOptions) { + // static route means static tableId as well, and no tableId arguments + const _tableId = staticRouteData ? "" : "_tableId"; + const _typedTableId = staticRouteData ? "" : "uint256 _tableId"; + + const _keyArgs = renderArguments(primaryKeys.map(({ name }) => name)); + const _typedKeyArgs = renderArguments(primaryKeys.map(({ name, typeWithLocation }) => `${typeWithLocation} ${name}`)); + + const _primaryKeysDefinition = ` + bytes32[] memory _primaryKeys = new bytes32[](${primaryKeys.length}); + ${renderList( + primaryKeys, + ({ name, typeId, staticByteLength }, index) => ` + _primaryKeys[${index}] = ${renderValueTypeToBytes32(name, typeId, staticByteLength)}; + ` + )} + `; + + return { + _tableId, + _typedTableId, + _keyArgs, + _typedKeyArgs, + _primaryKeysDefinition, + }; +} + +function renderValueTypeToBytes32(innerText: string, typeId: string, staticByteLength: number) { + const bits = staticByteLength * 8; + + if (typeId.match(/^uint\d{1,3}$/)) { + return `bytes32(uint256(${innerText}))`; + } else if (typeId.match(/^int\d{1,3}$/)) { + return `bytes32(uint256(uint${bits}(${innerText})))`; + } else if (typeId.match(/^bytes\d{1,2}$/)) { + return `bytes32(${innerText})`; + } else if (typeId === "address") { + return `bytes32(bytes20(${innerText}))`; + } else if (typeId === "bool") { + return `_boolToBytes32(${innerText})`; + } else { + throw new Error(`Unknown value type id ${typeId}`); + } +} + +function internalRenderList(lineTerminator: string, list: T[], renderItem: (item: T, index: number) => string) { + return list + .map((item, index) => renderItem(item, index) + (index === list.length - 1 ? "" : lineTerminator)) + .join("\n"); +} diff --git a/packages/cli/src/render-table/field.ts b/packages/cli/src/render-table/field.ts new file mode 100644 index 0000000000..f104451b30 --- /dev/null +++ b/packages/cli/src/render-table/field.ts @@ -0,0 +1,132 @@ +import { renderArguments, renderCommonData } from "./common.js"; +import { RenderTableField, RenderTableOptions } from "./types.js"; + +export function renderFieldMethods(options: RenderTableOptions) { + const { _typedTableId, _typedKeyArgs, _primaryKeysDefinition } = renderCommonData(options); + + let result = ""; + for (const [index, field] of options.fields.entries()) { + const _typedFieldName = `${field.typeWithLocation} ${field.name}`; + + result += ` + /** Get ${field.name} */ + function get${field.methodNameSuffix}(${renderArguments([ + _typedTableId, + _typedKeyArgs, + ])}) internal view returns (${_typedFieldName}) { + ${_primaryKeysDefinition} + bytes memory _blob = StoreSwitch.getField(_tableId, _primaryKeys, ${index}); + return ${renderDecodeFieldSingle(field)}; + } + `; + + if (options.storeArgument) { + result += ` + /** Get ${field.name} from the specified store */ + function get${field.methodNameSuffix}(${renderArguments([ + _typedTableId, + `IStore _store`, + _typedKeyArgs, + ])}) internal view returns (${_typedFieldName}) { + ${_primaryKeysDefinition} + bytes memory _blob = _store.getField(_tableId, _primaryKeys, ${index}); + return ${renderDecodeFieldSingle(field)}; + } + `; + } + + result += ` + /** Set ${field.name} */ + function set${field.methodNameSuffix}(${renderArguments([ + _typedTableId, + _typedKeyArgs, + _typedFieldName, + ])}) internal { + ${_primaryKeysDefinition} + StoreSwitch.setField(_tableId, _primaryKeys, ${index}, ${renderEncodeField(field)}); + } + `; + + // TODO: this is super inefficient right now, need to add support for pushing to arrays to the store core library to avoid reading/writing the entire array + // (see https://github.com/latticexyz/mud/issues/438) + if (field.isDynamic) { + const portionData = fieldPortionData(field); + + result += ` + /** Push ${portionData.title} to ${field.name} */ + function push${field.methodNameSuffix}(${renderArguments([ + _typedTableId, + _typedKeyArgs, + `${portionData.typeWithLocation} ${portionData.name}`, + ])}) internal { + ${_primaryKeysDefinition} + bytes memory _blob = StoreSwitch.getField(_tableId, _primaryKeys, ${index}); + bytes memory _newBlob = abi.encodePacked(_blob, ${portionData.encodeFunc}(${portionData.name})); + StoreSwitch.setField(_tableId, _primaryKeys, ${index}, _newBlob); + } + `; + } + } + return result; +} + +export function renderEncodeField(field: RenderTableField) { + let func; + if (field.arrayElement) { + func = "EncodeArray.encode"; + } else if (field.isDynamic) { + func = "bytes"; + } else { + func = "abi.encodePacked"; + } + return `${func}(${field.name})`; +} + +export function renderDecodeValueType(typeId: string, staticByteLength: number, offset: number) { + const innerSlice = `Bytes.slice${staticByteLength}(_blob, ${offset})`; + const bits = staticByteLength * 8; + + if (typeId.match(/^uint\d{1,3}$/) || typeId === "address") { + return `${typeId}(${innerSlice})`; + } else if (typeId.match(/^int\d{1,3}$/)) { + return `${typeId}(uint${bits}(${innerSlice}))`; + } else if (typeId.match(/^bytes\d{1,2}$/)) { + return innerSlice; + } else if (typeId === "bool") { + return `_toBool(uint8(${innerSlice}))`; + } else { + throw new Error(`Unknown value type id ${typeId}`); + } +} + +/** bytes/string are dynamic, but aren't really arrays */ +function fieldPortionData(field: RenderTableField) { + if (field.arrayElement) { + return { + typeWithLocation: field.arrayElement.typeWithLocation, + name: "_element", + encodeFunc: "abi.encodePacked", + title: "an element", + }; + } else { + return { + typeWithLocation: `${field.typeId} memory`, + name: "_slice", + encodeFunc: "bytes", + title: "a slice", + }; + } +} + +function renderDecodeFieldSingle(field: RenderTableField) { + const { typeId, isDynamic, arrayElement } = field; + if (arrayElement) { + // arrays + return `SliceLib.getSubslice(_blob, 0, _blob.length).decodeArray_${arrayElement.typeId}()`; + } else if (isDynamic) { + // bytes/string + return `${typeId}(_blob)`; + } else { + return renderDecodeValueType(typeId, field.staticByteLength, 0); + } +} diff --git a/packages/cli/src/render-table/index.ts b/packages/cli/src/render-table/index.ts new file mode 100644 index 0000000000..065fbe9989 --- /dev/null +++ b/packages/cli/src/render-table/index.ts @@ -0,0 +1,99 @@ +import { renderTable } from "./renderTable.js"; +import { SchemaType, SchemaTypeArrayToElement, SchemaTypeId, getStaticByteLength } from "@latticexyz/schema-type"; +import { StoreConfig } from "../config/loadStoreConfig.js"; +import { + RenderTableDynamicField, + RenderTableField, + RenderTablePrimaryKey, + RenderTableStaticField, + RenderTableType, +} from "./types.js"; + +export function renderTablesFromConfig(config: StoreConfig) { + const storeImportPath = config.storeImportPath; + + const renderedTables = []; + for (const tableName of Object.keys(config.tables)) { + const tableData = config.tables[tableName]; + + // struct adds methods to get/set all values at once + const withStruct = tableData.dataStruct; + // operate on all fields at once; for only 1 field keep them only if struct is also kept + const withRecordMethods = withStruct || Object.keys(tableData.schema).length > 1; + // field methods can be simply get/set if there's only 1 field and no record methods + const noFieldMethodSuffix = !withRecordMethods && Object.keys(tableData.schema).length === 1; + + const primaryKeys = Object.keys(tableData.primaryKeys).map((name) => { + const type = tableData.primaryKeys[name]; + const typeInfo = getSchemaTypeInfo(type); + if (typeInfo.isDynamic) throw new Error("Parsing error: found dynamic primary key"); + + const primaryKey: RenderTablePrimaryKey = { + ...typeInfo, + name, + isDynamic: false, + }; + return primaryKey; + }); + + const fields = Object.keys(tableData.schema).map((name) => { + const type = tableData.schema[name]; + const elementType = SchemaTypeArrayToElement[type]; + const field: RenderTableField = { + ...getSchemaTypeInfo(type), + arrayElement: elementType ? getSchemaTypeInfo(elementType) : undefined, + name, + methodNameSuffix: noFieldMethodSuffix ? "" : `${name[0].toUpperCase()}${name.slice(1)}`, + }; + return field; + }); + + const staticFields = fields.filter(({ isDynamic }) => !isDynamic) as RenderTableStaticField[]; + const dynamicFields = fields.filter(({ isDynamic }) => isDynamic) as RenderTableDynamicField[]; + + // With tableIdArgument: tableId is a dynamic argument for each method + // Without tableIdArgument: tableId is a file-level constant generated from `staticRouteData` + const staticRouteData = (() => { + if (tableData.tableIdArgument) { + return; + } else { + return { + tableIdName: tableName + "TableId", + baseRoute: config.baseRoute + tableData.route, + subRoute: `/${tableName}`, + }; + } + })(); + + renderedTables.push({ + tableName, + tableData, + output: renderTable({ + libraryName: tableName, + structName: withStruct ? tableName + "Data" : undefined, + staticRouteData, + storeImportPath, + primaryKeys, + fields, + staticFields, + dynamicFields, + withRecordMethods, + storeArgument: tableData.storeArgument, + }), + }); + } + return renderedTables; +} + +function getSchemaTypeInfo(schemaType: SchemaType): RenderTableType { + const staticByteLength = getStaticByteLength(schemaType); + const isDynamic = staticByteLength === 0; + const typeId = SchemaTypeId[schemaType]; + return { + typeId, + typeWithLocation: isDynamic ? typeId + " memory" : typeId, + enumName: SchemaType[schemaType], + staticByteLength, + isDynamic, + }; +} diff --git a/packages/cli/src/render-table/record.ts b/packages/cli/src/render-table/record.ts new file mode 100644 index 0000000000..5dc47c8104 --- /dev/null +++ b/packages/cli/src/render-table/record.ts @@ -0,0 +1,176 @@ +import { renderList, renderArguments, renderCommonData } from "./common.js"; +import { renderDecodeValueType, renderEncodeField } from "./field.js"; +import { RenderTableDynamicField, RenderTableOptions, RenderTableStaticField } from "./types.js"; + +export function renderRecordMethods(options: RenderTableOptions) { + const { staticFields, dynamicFields, structName, storeArgument } = options; + const { _tableId, _typedTableId, _keyArgs, _typedKeyArgs, _primaryKeysDefinition } = renderCommonData(options); + + let result = ` + /** Get the full data */ + function get(${renderArguments([_typedTableId, _typedKeyArgs])}) internal view returns (${renderDecodedRecord( + options + )}) { + ${_primaryKeysDefinition} + bytes memory _blob = StoreSwitch.getRecord(_tableId, _primaryKeys, getSchema()); + return decode(_blob); + } + `; + + if (storeArgument) { + result += ` + /** Get the full data from the specified store */ + function get(${renderArguments([ + _typedTableId, + `IStore _store`, + _typedKeyArgs, + ])}) internal view returns (${renderDecodedRecord(options)}) { + ${_primaryKeysDefinition} + bytes memory _blob = _store.getRecord(_tableId, _primaryKeys); + return decode(_blob); + } + `; + } + + result += ` + /** Set the full data using individual values */ + function set(${renderArguments([ + _typedTableId, + _typedKeyArgs, + renderArguments(options.fields.map(({ name, typeWithLocation }) => `${typeWithLocation} ${name}`)), + ])}) internal { + ${renderEncodedLengths(dynamicFields)} + bytes memory _data = abi.encodePacked(${renderArguments([ + renderArguments(staticFields.map(({ name }) => name)), + // TODO try gas optimization (preallocate for all, encodePacked statics, and direct encode dynamics) + // (see https://github.com/latticexyz/mud/issues/444) + ...(dynamicFields.length === 0 + ? [] + : ["_encodedLengths.unwrap()", renderArguments(dynamicFields.map((field) => renderEncodeField(field)))]), + ])}); + + ${_primaryKeysDefinition} + + StoreSwitch.setRecord(_tableId, _primaryKeys, _data); + } + `; + + if (structName !== undefined) { + result += ` + /** Set the full data using the data struct */ + function set(${renderArguments([_typedTableId, _typedKeyArgs, `${structName} memory _table`])}) internal { + set(${renderArguments([ + _tableId, + _keyArgs, + renderArguments(options.fields.map(({ name }) => `_table.${name}`)), + ])}); + } + `; + } + + result += renderDecodeFunction(options); + + return result; +} + +// Renders the `decode` function that parses a bytes blob into the table data +function renderDecodeFunction({ structName, fields, staticFields, dynamicFields }: RenderTableOptions) { + // either set struct properties, or just variables + const renderedDecodedRecord = structName + ? `${structName} memory _table` + : renderArguments(fields.map(({ name, typeWithLocation }) => `${typeWithLocation} ${name}`)); + const fieldNamePrefix = structName ? "_table." : ""; + + // Static field offsets + const staticOffsets = staticFields.map(() => 0); + let _acc = 0; + for (const [index, field] of staticFields.entries()) { + staticOffsets[index] = _acc; + _acc += field.staticByteLength; + } + + if (dynamicFields.length > 0) { + const totalStaticLength = staticFields.reduce((acc, { staticByteLength }) => acc + staticByteLength, 0); + // decode static (optionally) and dynamic data + return ` + /** Decode the tightly packed blob using this table's schema */ + function decode(bytes memory _blob) internal view returns (${renderedDecodedRecord}) { + // ${totalStaticLength} is the total byte length of static data + PackedCounter _encodedLengths = PackedCounter.wrap(Bytes.slice32(_blob, ${totalStaticLength})); + + ${renderList( + staticFields, + (field, index) => ` + ${fieldNamePrefix}${field.name} = ${renderDecodeStaticFieldPartial(field, staticOffsets[index])}; + ` + )} + uint256 _start; + uint256 _end = ${totalStaticLength + 32}; + ${renderList( + dynamicFields, + (field, index) => ` + _start = _end; + _end += _encodedLengths.atIndex(${index}); + ${fieldNamePrefix}${field.name} = ${renderDecodeDynamicFieldPartial(field)}; + ` + )} + } + `; + } else { + // decode only static data + return ` + /** Decode the tightly packed blob using this table's schema */ + function decode(bytes memory _blob) internal pure returns (${renderedDecodedRecord}) { + ${renderList( + staticFields, + (field, index) => ` + ${fieldNamePrefix}${field.name} = ${renderDecodeStaticFieldPartial(field, staticOffsets[index])}; + ` + )} + } + `; + } +} + +// contents of `returns (...)` for record getter/decoder +function renderDecodedRecord({ structName, fields }: RenderTableOptions) { + if (structName) { + return `${structName} memory _table`; + } else { + return renderArguments(fields.map(({ name, typeWithLocation }) => `${typeWithLocation} ${name}`)); + } +} + +function renderDecodeDynamicFieldPartial(field: RenderTableDynamicField) { + const { typeId, arrayElement } = field; + if (arrayElement) { + // arrays + return `SliceLib.getSubslice(_blob, _start, _end).decodeArray_${arrayElement.typeId}()`; + } else { + // bytes/string + return `${typeId}(SliceLib.getSubslice(_blob, _start, _end).toBytes())`; + } +} + +function renderDecodeStaticFieldPartial(field: RenderTableStaticField, start: number) { + const { typeId, staticByteLength } = field; + return renderDecodeValueType(typeId, staticByteLength, start); +} + +function renderEncodedLengths(dynamicFields: RenderTableDynamicField[]) { + if (dynamicFields.length > 0) { + return ` + uint16[] memory _counters = new uint16[](${dynamicFields.length}); + ${renderList(dynamicFields, ({ name, arrayElement }, index) => { + if (arrayElement) { + return `_counters[${index}] = uint16(${name}.length * ${arrayElement.staticByteLength});`; + } else { + return `_counters[${index}] = uint16(bytes(${name}).length);`; + } + })} + PackedCounter _encodedLengths = PackedCounterLib.pack(_counters); + `; + } else { + return ""; + } +} diff --git a/packages/cli/src/render-table/renderTable.ts b/packages/cli/src/render-table/renderTable.ts new file mode 100644 index 0000000000..ab5ea2a6f2 --- /dev/null +++ b/packages/cli/src/render-table/renderTable.ts @@ -0,0 +1,108 @@ +import { renderArguments, renderCommonData, renderList } from "./common.js"; +import { renderFieldMethods } from "./field.js"; +import { renderRecordMethods } from "./record.js"; +import { RenderTableOptions } from "./types.js"; + +export function renderTable(options: RenderTableOptions) { + const { libraryName, structName, staticRouteData, storeImportPath, fields, withRecordMethods } = options; + + const { _typedTableId, _typedKeyArgs, _primaryKeysDefinition } = renderCommonData(options); + + return `// SPDX-License-Identifier: MIT +pragma solidity >=0.8.0; + +/* Autogenerated file. Do not edit manually. */ + +import { IStore } from "${storeImportPath}IStore.sol"; +import { StoreSwitch } from "${storeImportPath}StoreSwitch.sol"; +import { StoreCore } from "${storeImportPath}StoreCore.sol"; +import { SchemaType } from "${storeImportPath}Types.sol"; +import { Bytes } from "${storeImportPath}Bytes.sol"; +import { SliceLib } from "${storeImportPath}Slice.sol"; +import { EncodeArray } from "${storeImportPath}tightcoder/EncodeArray.sol"; +import { Schema, SchemaLib } from "${storeImportPath}Schema.sol"; +import { PackedCounter, PackedCounterLib } from "${storeImportPath}PackedCounter.sol"; + +${ + !staticRouteData + ? "" + : ` + uint256 constant _tableId = uint256(keccak256("${staticRouteData.baseRoute + staticRouteData.subRoute}")); + uint256 constant ${staticRouteData.tableIdName} = _tableId; +` +} + +${ + !structName + ? "" + : ` + struct ${structName} { + ${renderList(fields, ({ name, typeId }) => `${typeId} ${name};`)} + } +` +} + +library ${libraryName} { + /** Get the table's schema */ + function getSchema() internal pure returns (Schema) { + SchemaType[] memory _schema = new SchemaType[](${fields.length}); + ${renderList(fields, ({ enumName }, index) => `_schema[${index}] = SchemaType.${enumName};`)} + + return SchemaLib.encode(_schema); + } + + /** Register the table's schema */ + function registerSchema(${_typedTableId}) internal { + StoreSwitch.registerSchema(_tableId, getSchema()); + } + +${ + !options.storeArgument + ? "" + : ` + /** Register the table's schema for the specified store */ + function registerSchema(${renderArguments([_typedTableId, "IStore _store"])}) internal { + _store.registerSchema(_tableId, getSchema()); + } +` +} + +${renderFieldMethods(options)} + +${withRecordMethods ? renderRecordMethods(options) : ""} + + /* Delete all data for given keys */ + function deleteRecord(${renderArguments([_typedTableId, _typedKeyArgs])}) internal { + ${_primaryKeysDefinition} + StoreSwitch.deleteRecord(_tableId, _primaryKeys); + } +} + +${ + // nothing can be cast to bool, so an assembly helper is required + !fields.some(({ typeId }) => typeId === "bool") + ? "" + : ` + function _toBool(uint8 value) pure returns (bool result) { + assembly { + result := value + } + } +` +} + +${ + // nothing can be cast from bool, so an assembly helper is required + !options.primaryKeys.some(({ typeId }) => typeId === "bool") + ? "" + : ` + function _boolToBytes32(bool value) pure returns (bytes32 result) { + assembly { + result := value + } + } +` +} + +`; +} diff --git a/packages/cli/src/render-table/types.ts b/packages/cli/src/render-table/types.ts new file mode 100644 index 0000000000..e054581aea --- /dev/null +++ b/packages/cli/src/render-table/types.ts @@ -0,0 +1,51 @@ +export interface RenderTableOptions { + /** Name of the library to render. */ + libraryName: string; + /** Name of the struct to render. If undefined, struct and its methods aren't rendered. */ + structName?: string; + /** Data used to statically registed the table. If undefined, all methods receive `_tableId` as an argument. */ + staticRouteData?: StaticRouteData; + storeImportPath: string; + primaryKeys: RenderTablePrimaryKey[]; + fields: RenderTableField[]; + staticFields: RenderTableStaticField[]; + dynamicFields: RenderTableDynamicField[]; + /** Whether to render get/set methods for the whole record */ + withRecordMethods: boolean; + /** Whether to render additional methods that accept a manual `IStore` argument */ + storeArgument: boolean; +} + +export interface StaticRouteData { + /** Name of the table id constant to render. */ + tableIdName: string; + baseRoute: string; + subRoute: string; +} + +export interface RenderTableType { + typeId: string; + typeWithLocation: string; + enumName: string; + staticByteLength: number; + isDynamic: boolean; +} + +export interface RenderTablePrimaryKey extends RenderTableType { + name: string; + isDynamic: false; +} + +export interface RenderTableStaticField extends RenderTableField { + isDynamic: false; +} + +export interface RenderTableDynamicField extends RenderTableField { + isDynamic: true; +} + +export interface RenderTableField extends RenderTableType { + arrayElement: RenderTableType | undefined; + name: string; + methodNameSuffix: string; +} diff --git a/packages/cli/src/utils/build.ts b/packages/cli/src/utils/build.ts index f6712b47dd..d3a214f8d8 100644 --- a/packages/cli/src/utils/build.ts +++ b/packages/cli/src/utils/build.ts @@ -1,7 +1,7 @@ import { execa } from "execa"; import { copyFileSync, mkdirSync, readdirSync, rmSync } from "fs"; import path from "path"; -import { getOutDirectory } from "./forgeConfig"; +import { getOutDirectory } from "./forgeConfig.js"; export async function forgeBuild(options?: { clear?: boolean }) { if (options?.clear) { diff --git a/packages/cli/src/utils/codegen.ts b/packages/cli/src/utils/codegen.ts index 403cd78bc9..0f88da4fc2 100644 --- a/packages/cli/src/utils/codegen.ts +++ b/packages/cli/src/utils/codegen.ts @@ -2,9 +2,9 @@ import { readFile, writeFile } from "fs/promises"; import ejs from "ejs"; import path from "path"; -const contractsDir = path.join(__dirname, "../../src/contracts"); +const contractsDirectory = new URL("../src/contracts", import.meta.url).pathname; -const stubLibDeploy = readFile(path.join(contractsDir, "LibDeployStub.sol")); +const stubLibDeploy = readFile(path.join(contractsDirectory, "LibDeployStub.sol")); /** * Generate LibDeploy.sol from deploy.json @@ -30,7 +30,7 @@ export async function generateLibDeploy(configPath: string, out: string, systems // Generate LibDeploy console.log("Generating deployment script"); - const LibDeploy = await ejs.renderFile(path.join(contractsDir, "LibDeploy.ejs"), config, { async: true }); + const LibDeploy = await ejs.renderFile(path.join(contractsDirectory, "LibDeploy.ejs"), config, { async: true }); const libDeployPath = path.join(out, "LibDeploy.sol"); await writeFile(libDeployPath, LibDeploy); diff --git a/packages/cli/src/utils/deferred.ts b/packages/cli/src/utils/deferred.ts deleted file mode 100644 index 37dd2afabe..0000000000 --- a/packages/cli/src/utils/deferred.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * A convenient way to create a promise with resolve and reject functions. - * @returns Tuple with resolve function, reject function and promise. - */ -export function deferred(): [(t: T) => void, (t: Error) => void, Promise] { - let resolve: ((t: T) => void) | null = null; - let reject: ((t: Error) => void) | null = null; - const promise = new Promise((r, rj) => { - resolve = (t: T) => r(t); - reject = (e: Error) => rj(e); - }); - // eslint-disable-next-line @typescript-eslint/no-explicit-any - return [resolve as any, reject as any, promise]; -} diff --git a/packages/cli/src/utils/deploy.ts b/packages/cli/src/utils/deploy.ts index 880a021797..3a57528c89 100644 --- a/packages/cli/src/utils/deploy.ts +++ b/packages/cli/src/utils/deploy.ts @@ -1,11 +1,12 @@ import { constants, Wallet } from "ethers"; -import { generateLibDeploy, resetLibDeploy } from "./codegen"; -import { findLog } from "./findLog"; -import { generateTypes } from "./types"; +import { generateLibDeploy, resetLibDeploy } from "./codegen.js"; +import { findLog } from "./findLog.js"; +import { generateTypes } from "./typegen.js"; import { execa } from "execa"; import { StaticJsonRpcProvider } from "@ethersproject/providers"; +import path from "path"; -const contractsDir = __dirname + "/../../src/contracts"; +const contractsDirectory = new URL("../src/contracts", import.meta.url).pathname; /** * Deploy world, components and systems from deploy.json @@ -39,7 +40,7 @@ export async function deploy( "forge", [ "script", - contractsDir + "/Deploy.sol", + path.join(contractsDirectory, "/Deploy.sol"), "--target-contract", "Deploy", "-vvv", @@ -85,7 +86,7 @@ export async function generateAndDeploy(args: DeployOptions) { try { // Generate LibDeploy - libDeployPath = await generateLibDeploy(args.config, contractsDir, args.systems); + libDeployPath = await generateLibDeploy(args.config, contractsDirectory, args.systems); // Build and generate fresh types await generateTypes(undefined, "./types", { clear: args.clear }); @@ -103,7 +104,7 @@ export async function generateAndDeploy(args: DeployOptions) { } finally { // Remove generated LibDeploy console.log("Cleaning up deployment script"); - if (libDeployPath) await resetLibDeploy(contractsDir); + if (libDeployPath) await resetLibDeploy(contractsDirectory); } return { deployedWorldAddress, initialBlockNumber }; diff --git a/packages/cli/src/utils/errors.ts b/packages/cli/src/utils/errors.ts new file mode 100644 index 0000000000..53c03763f0 --- /dev/null +++ b/packages/cli/src/utils/errors.ts @@ -0,0 +1,50 @@ +import chalk from "chalk"; +import { ZodError } from "zod"; +import { fromZodError, ValidationError } from "zod-validation-error"; + +// Wrapper with preset styles, only requires a `prefix` +export function fromZodErrorCustom(error: ZodError, prefix: string) { + return fromZodError(error, { + prefix: chalk.red(prefix), + prefixSeparator: "\n- ", + issueSeparator: "\n- ", + }); +} + +export class NotInsideProjectError extends Error { + name = "NotInsideProjectError"; + message = "You are not inside a MUD project"; +} + +export class NotESMConfigError extends Error { + name = "NotESMConfigError"; + message = "MUD config must be an ES module"; +} + +export function logError(error: Error) { + if (error instanceof ValidationError) { + console.log(chalk.redBright(error.message)); + } else if (error instanceof ZodError) { + // TODO currently this error shouldn't happen, use `fromZodErrorCustom` + // (see https://github.com/latticexyz/mud/issues/438) + const validationError = fromZodError(error, { + prefixSeparator: "\n- ", + issueSeparator: "\n- ", + }); + console.log(chalk.redBright(validationError.message)); + } else if (error instanceof NotInsideProjectError) { + console.log(chalk.red(error.message)); + console.log(""); + // TODO add docs to the website and update the link to the specific page + // (see https://github.com/latticexyz/mud/issues/445) + console.log(chalk.blue(`To learn more about MUD's configuration, please go to https://mud.dev/packages/cli/`)); + } else if (error instanceof NotESMConfigError) { + console.log(chalk.red(error.message)); + console.log(""); + console.log( + chalk.blue(`Please name your config file \`mud.config.mts\`, or use \`type: "module"\` in package.json`) + ); + } else { + console.log(error); + } +} diff --git a/packages/cli/src/utils/exec.ts b/packages/cli/src/utils/exec.ts index 12374fb377..3086e2eee8 100644 --- a/packages/cli/src/utils/exec.ts +++ b/packages/cli/src/utils/exec.ts @@ -1,40 +1,18 @@ -import { ChildProcess, exec as nodeExec, spawn } from "child_process"; -import { deferred } from "./deferred"; -/** - * Await execution of bash scripts - * @param command Bash script to execute - * @returns Promise that resolves with exit code when script finished executing - */ -export async function exec(command: string): Promise { - const [resolve, , promise] = deferred(); - - const child = nodeExec(command, (error, stdout, stderr) => { - if (error || stderr) { - console.error(error); - console.error(stderr); - } - console.log(stdout); - }); - - child.on("exit", (code) => resolve(code ?? 0)); - - return promise; -} +import { execa } from "execa"; /** - * Await execution of bash scripts - * @param command Bash script to execute - * @param options Args to pass to the script - * @returns Promise that resolves with exit code when script finished executing + * Wrapper for execa that logs the full command. + * @param command - The program/script to execute. + * @param options - Arguments to pass to `command` on execution. + * @returns A [`child_process` instance](https://nodejs.org/api/child_process.html#child_process_class_childprocess), which is enhanced to also be a `Promise` for a result `Object` with `stdout` and `stderr` properties. */ -export async function execLog(command: string, options: string[]): Promise<{ exitCode: number; child: ChildProcess }> { +export function execLog(command: string, options: string[]) { console.log("Cmd:"); console.log([command, ...options].join(" ")); - const [resolve, , promise] = deferred<{ exitCode: number; child: ChildProcess }>(); - - const child = spawn(command, options, { stdio: [process.stdin, process.stdout, process.stderr] }); - child.on("exit", (code) => resolve({ exitCode: code ?? 0, child })); - - return promise; + // TODO piping outputs and doing custom logging would be better for readability + // (see https://github.com/latticexyz/mud/issues/446) + return execa(command, options, { + stdio: ["inherit", "inherit", "inherit"], + }); } diff --git a/packages/cli/src/utils/format.ts b/packages/cli/src/utils/format.ts new file mode 100644 index 0000000000..af18202faa --- /dev/null +++ b/packages/cli/src/utils/format.ts @@ -0,0 +1,33 @@ +import chalk from "chalk"; +import prettier from "prettier"; +import prettierPluginSolidity from "prettier-plugin-solidity"; + +export async function formatSolidity(content: string, prettierConfigPath?: string) { + let config; + if (prettierConfigPath) { + config = await prettier.resolveConfig(prettierConfigPath); + } + try { + return prettier.format(content, { + plugins: [prettierPluginSolidity], + parser: "solidity-parse", + + printWidth: 120, + semi: true, + tabWidth: 2, + useTabs: false, + bracketSpacing: true, + + ...config, + }); + } catch (error) { + let message; + if (error instanceof Error) { + message = error.message; + } else { + message = error; + } + console.log(chalk.yellow(`Error during output formatting: ${message}`)); + return content; + } +} diff --git a/packages/cli/src/utils/hsr.ts b/packages/cli/src/utils/hsr.ts index d9d23747c0..03c2d52041 100644 --- a/packages/cli/src/utils/hsr.ts +++ b/packages/cli/src/utils/hsr.ts @@ -39,7 +39,7 @@ export function hsr(root: string, replaceSystems: (systems: string[]) => Promise console.log("Watching system file changes..."); - chokidar.watch(root).on("all", async (event, path, stats) => { + chokidar.watch(root).on("all", async (event, path) => { console.log(`[${event}]: ${path}`); // Find changed file diff --git a/packages/cli/src/utils/ids.ts b/packages/cli/src/utils/ids.ts index 3f0ef5b816..fc1f221ac2 100644 --- a/packages/cli/src/utils/ids.ts +++ b/packages/cli/src/utils/ids.ts @@ -1,4 +1,4 @@ -import { keccak256 as keccak256Bytes, toUtf8Bytes } from "ethers/lib/utils"; +import { keccak256 as keccak256Bytes, toUtf8Bytes } from "ethers/lib/utils.js"; import { readFileSync } from "fs"; export const IDregex = new RegExp(/(?<=uint256 constant ID = uint256\(keccak256\(")(.*)(?="\))/); diff --git a/packages/cli/src/utils/index.ts b/packages/cli/src/utils/index.ts index bcf3a162a7..367c59f5b4 100644 --- a/packages/cli/src/utils/index.ts +++ b/packages/cli/src/utils/index.ts @@ -1,9 +1,8 @@ -export * from "./exec"; -export * from "./deferred"; -export * from "./ids"; -export * from "./codegen"; -export * from "./deploy"; -export * from "./hsr"; -export * from "./findLog"; -export * from "./types"; -export * from "./build"; +export * from "./exec.js"; +export * from "./ids.js"; +export * from "./codegen.js"; +export * from "./deploy.js"; +export * from "./hsr.js"; +export * from "./findLog.js"; +export * from "./typegen.js"; +export * from "./build.js"; diff --git a/packages/cli/src/utils/types.ts b/packages/cli/src/utils/typegen.ts similarity index 73% rename from packages/cli/src/utils/types.ts rename to packages/cli/src/utils/typegen.ts index 7217e2c203..1b2077f305 100644 --- a/packages/cli/src/utils/types.ts +++ b/packages/cli/src/utils/typegen.ts @@ -1,12 +1,11 @@ import { runTypeChain, glob as typechainGlob } from "typechain"; -import { deferred } from "./deferred"; import glob from "glob"; -import { extractIdFromFile } from "./ids"; +import { extractIdFromFile } from "./ids.js"; import { rmSync, writeFileSync } from "fs"; import path from "path"; -import { filterAbi, forgeBuild } from "./build"; -import { getOutDirectory, getSrcDirectory } from "./forgeConfig"; -import { systemsDir } from "./constants"; +import { filterAbi, forgeBuild } from "./build.js"; +import { getOutDirectory, getSrcDirectory } from "./forgeConfig.js"; +import { systemsDir } from "./constants.js"; export async function generateAbiTypes( inputDir: string, @@ -20,13 +19,13 @@ export async function generateAbiTypes( const cwd = options?.cwd ?? process.cwd(); - const allFiles = typechainGlob(cwd, [`${inputDir!}/**/+([a-zA-Z0-9_]).json`]); + const allFiles = typechainGlob(cwd, [`${inputDir}/**/+([a-zA-Z0-9_]).json`]); const result = await runTypeChain({ cwd, filesToProcess: allFiles, allFiles, - outDir: outputDir!, + outDir: outputDir, target: "ethers-v5", }); @@ -50,36 +49,30 @@ export async function generateSystemTypes(outputDir: string, options?: { clear?: const srcDir = await getSrcDirectory(); const systemsPath = path.join(srcDir, systemsDir, "*.sol"); - const [resolve, , promise] = deferred(); - glob(systemsPath, {}, (_, matches) => { - systems = matches.map((path) => { - const fragments = path.split("/"); - return fragments[fragments.length - 1].split(".sol")[0]; - }); - - ids = matches.map((path, index) => { - const id = extractIdFromFile(path); - if (!id) { - console.log("Path:", path); - console.log("ID:", id); - throw new Error( - "No ID found for" + - matches[index] + - ". Make sure your system source file includes a ID definition (uint256 constant ID = uint256(keccak256());)" - ); - } - return id; - }); - - abis = systems.map((system) => `../abi/${system}.json`); - - typePaths = systems.map((system) => `./ethers-contracts/${system}.ts`); - - resolve(); + const matches = glob.sync(systemsPath); + + systems = matches.map((path) => { + const fragments = path.split("/"); + return fragments[fragments.length - 1].split(".sol")[0]; + }); + + ids = matches.map((path, index) => { + const id = extractIdFromFile(path); + if (!id) { + console.log("Path:", path); + console.log("ID:", id); + throw new Error( + "No ID found for" + + matches[index] + + ". Make sure your system source file includes a ID definition (uint256 constant ID = uint256(keccak256());)" + ); + } + return id; }); - // Make the callback synchronous - await promise; + abis = systems.map((system) => `../abi/${system}.json`); + + typePaths = systems.map((system) => `./ethers-contracts/${system}.ts`); console.log("Matches", systems); console.log("Solidity", ids); diff --git a/packages/cli/tsconfig.json b/packages/cli/tsconfig.json index 5a15b828a1..5fb5b0f673 100644 --- a/packages/cli/tsconfig.json +++ b/packages/cli/tsconfig.json @@ -1,101 +1,17 @@ { "compilerOptions": { /* Visit https://aka.ms/tsconfig.json to read more about this file */ - - /* Projects */ - // "incremental": true, /* Enable incremental compilation */ - // "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */ - // "tsBuildInfoFile": "./", /* Specify the folder for .tsbuildinfo incremental compilation files. */ - // "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects */ - // "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */ - // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */ - - /* Language and Environment */ - "target": "es2021" /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */, - // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ - // "jsx": "preserve", /* Specify what JSX code is generated. */ - // "experimentalDecorators": true, /* Enable experimental support for TC39 stage 2 draft decorators. */ - // "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */ - // "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h' */ - // "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */ - // "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using `jsx: react-jsx*`.` */ - // "reactNamespace": "", /* Specify the object invoked for `createElement`. This only applies when targeting `react` JSX emit. */ - // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */ - // "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */ - - /* Modules */ - "module": "commonjs" /* Specify what module code is generated. */, - // "rootDir": "./", /* Specify the root folder within your source files. */ - // "moduleResolution": "node" /* Specify how TypeScript looks up a file from a given module specifier. */, - // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */ - // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */ - // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */ - // "typeRoots": [], /* Specify multiple folders that act like `./node_modules/@types`. */ - // "types": [], /* Specify type package names to be included without being referenced in a source file. */ - // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ - "resolveJsonModule": true /* Enable importing .json files */, - // "noResolve": true, /* Disallow `import`s, `require`s or ``s from expanding the number of files TypeScript should add to a project. */ - - /* JavaScript Support */ - // "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the `checkJS` option to get errors from these files. */ - // "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */ - // "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from `node_modules`. Only applicable with `allowJs`. */ - - /* Emit */ - // "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */ - // "declarationMap": true, /* Create sourcemaps for d.ts files. */ - // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */ - // "sourceMap": true, /* Create source map files for emitted JavaScript files. */ - // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If `declaration` is true, also designates a file that bundles all .d.ts output. */ - "outDir": "./dist" /* Specify an output folder for all emitted files. */, - // "removeComments": true, /* Disable emitting comments. */ - // "noEmit": true, /* Disable emitting files from a compilation. */ - "importHelpers": false /* Allow importing helper functions from tslib once per project, instead of including them per-file. */, - // "importsNotUsedAsValues": "remove", /* Specify emit/checking behavior for imports that are only used for types */ - // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */ - // "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */ - // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ - // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */ - // "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */ - // "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */ - // "newLine": "crlf", /* Set the newline character for emitting files. */ - // "stripInternal": true, /* Disable emitting declarations that have `@internal` in their JSDoc comments. */ - // "noEmitHelpers": true, /* Disable generating custom helper functions like `__extends` in compiled output. */ - // "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */ - // "preserveConstEnums": true, /* Disable erasing `const enum` declarations in generated code. */ - // "declarationDir": "./", /* Specify the output directory for generated declaration files. */ - // "preserveValueImports": true, /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */ - - /* Interop Constraints */ - // "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */ - // "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */ - "esModuleInterop": true /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables `allowSyntheticDefaultImports` for type compatibility. */, - // "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */ - "forceConsistentCasingInFileNames": true /* Ensure that casing is correct in imports. */, - - /* Type Checking */ - "strict": true /* Enable all strict type-checking options. */, - // "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied `any` type.. */ - // "strictNullChecks": true, /* When type checking, take into account `null` and `undefined`. */ - // "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */ - // "strictBindCallApply": true, /* Check that the arguments for `bind`, `call`, and `apply` methods match the original function. */ - // "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */ - // "noImplicitThis": true, /* Enable error reporting when `this` is given the type `any`. */ - // "useUnknownInCatchVariables": true, /* Type catch clause variables as 'unknown' instead of 'any'. */ - // "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */ - // "noUnusedLocals": true, /* Enable error reporting when a local variables aren't read. */ - // "noUnusedParameters": true, /* Raise an error when a function parameter isn't read */ - // "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */ - // "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */ - // "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */ - // "noUncheckedIndexedAccess": true, /* Include 'undefined' in index signature results */ - // "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */ - // "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type */ - // "allowUnusedLabels": true, /* Disable error reporting for unused labels. */ - // "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */ - - /* Completeness */ - // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */ - "skipLibCheck": true /* Skip type checking all .d.ts files. */ + "target": "es2021", + "module": "esnext", + "moduleResolution": "nodenext", + "resolveJsonModule": true, + "outDir": "./dist", + "importHelpers": false, + "isolatedModules": true, + "allowSyntheticDefaultImports": true, + "esModuleInterop": true, + "forceConsistentCasingInFileNames": true, + "strict": true, + "skipLibCheck": true } } diff --git a/packages/cli/tsup.config.js b/packages/cli/tsup.config.js new file mode 100644 index 0000000000..24a453b6f7 --- /dev/null +++ b/packages/cli/tsup.config.js @@ -0,0 +1,16 @@ +import { defineConfig } from "tsup"; + +export default defineConfig({ + entry: ["src/index.ts", "src/mud.ts"], + outDir: "dist", + platform: "node", + format: ["esm"], + sourcemap: false, + clean: true, + bundle: true, + dts: "src/index.ts", + // both inlined imports are hacks to make esm+esbuild work + // @latticexyz/services: esm imports directly from ts files don't work properly from transpiled js + // @latticexyz/solecs: esm requires import assertions for json, but esbuild doesn't support those (they just get stripped) + noExternal: ["@latticexyz/services", "@latticexyz/solecs", "@latticexyz/schema-type"], +}); \ No newline at end of file diff --git a/packages/create-mud/templates/minimal/packages/client/package.json b/packages/create-mud/templates/minimal/packages/client/package.json index 9499c6ea0f..fda2d0fc34 100644 --- a/packages/create-mud/templates/minimal/packages/client/package.json +++ b/packages/create-mud/templates/minimal/packages/client/package.json @@ -22,6 +22,7 @@ "@latticexyz/recs": "{{mud-version}}", "@latticexyz/services": "{{mud-version}}", "@latticexyz/std-client": "{{mud-version}}", + "@latticexyz/utils": "{{mud-version}}", "async-mutex": "^0.4.0", "ethers": "^5.7.2", "mobx": "^6.7.0", diff --git a/packages/create-mud/templates/react/packages/client/package.json b/packages/create-mud/templates/react/packages/client/package.json index 27bb86401a..2f58083bf3 100644 --- a/packages/create-mud/templates/react/packages/client/package.json +++ b/packages/create-mud/templates/react/packages/client/package.json @@ -28,6 +28,7 @@ "@latticexyz/recs": "{{mud-version}}", "@latticexyz/services": "{{mud-version}}", "@latticexyz/std-client": "{{mud-version}}", + "@latticexyz/utils": "{{mud-version}}", "async-mutex": "^0.4.0", "ethers": "^5.7.2", "mobx": "^6.7.0", diff --git a/packages/schema-type/.gitignore b/packages/schema-type/.gitignore new file mode 100644 index 0000000000..ce39ef13b1 --- /dev/null +++ b/packages/schema-type/.gitignore @@ -0,0 +1,11 @@ +cache +abi +out +dist +types/ethers-contracts +docs +_docs +DOCS.md +artifacts +yarn-error.log +API \ No newline at end of file diff --git a/packages/schema-type/.npmignore b/packages/schema-type/.npmignore new file mode 100644 index 0000000000..eb5910442f --- /dev/null +++ b/packages/schema-type/.npmignore @@ -0,0 +1,6 @@ +* + +!dist/** +!src/** +!package.json +!README.md \ No newline at end of file diff --git a/packages/schema-type/.nvmrc b/packages/schema-type/.nvmrc new file mode 100644 index 0000000000..8e2afd3427 --- /dev/null +++ b/packages/schema-type/.nvmrc @@ -0,0 +1 @@ +17 \ No newline at end of file diff --git a/packages/schema-type/.prettierrc b/packages/schema-type/.prettierrc new file mode 100644 index 0000000000..9a5a009900 --- /dev/null +++ b/packages/schema-type/.prettierrc @@ -0,0 +1,7 @@ +{ + "printWidth": 120, + "semi": true, + "tabWidth": 2, + "useTabs": false, + "bracketSpacing": true +} diff --git a/packages/schema-type/.solhint.json b/packages/schema-type/.solhint.json new file mode 100644 index 0000000000..4e2baa8be7 --- /dev/null +++ b/packages/schema-type/.solhint.json @@ -0,0 +1,8 @@ +{ + "extends": "solhint:recommended", + "rules": { + "compiler-version": ["error", ">=0.8.0"], + "avoid-low-level-calls": "off", + "func-visibility": ["warn", { "ignoreConstructors": true }] + } +} diff --git a/packages/schema-type/CHANGELOG.md b/packages/schema-type/CHANGELOG.md new file mode 100644 index 0000000000..e4d87c4d45 --- /dev/null +++ b/packages/schema-type/CHANGELOG.md @@ -0,0 +1,4 @@ +# Change Log + +All notable changes to this project will be documented in this file. +See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. diff --git a/packages/schema-type/CHANGELOG.yml b/packages/schema-type/CHANGELOG.yml new file mode 100644 index 0000000000..e3f6e391b4 --- /dev/null +++ b/packages/schema-type/CHANGELOG.yml @@ -0,0 +1 @@ +label: Changelog diff --git a/packages/schema-type/README.md b/packages/schema-type/README.md new file mode 100644 index 0000000000..7afc297658 --- /dev/null +++ b/packages/schema-type/README.md @@ -0,0 +1 @@ +# SchemaType diff --git a/packages/schema-type/foundry.toml b/packages/schema-type/foundry.toml new file mode 100644 index 0000000000..57e079ae35 --- /dev/null +++ b/packages/schema-type/foundry.toml @@ -0,0 +1,10 @@ +[profile.default] +ffi = false +fuzz_runs = 256 +optimizer = true +optimizer_runs = 3000 +verbosity = 1 +libs = ["../../node_modules"] +src = "src/solidity" +out = "out/solidity" +test = "test/solidity" diff --git a/packages/schema-type/git-install.sh b/packages/schema-type/git-install.sh new file mode 100755 index 0000000000..b86de4f8c9 --- /dev/null +++ b/packages/schema-type/git-install.sh @@ -0,0 +1,5 @@ +#! usr/bin/bash +giturl=https://github.com/$1.git +head=$(git ls-remote $giturl HEAD | head -n1 | awk '{print $1;}') +yarn add $giturl#$head +echo "Installed $giturl#$head" \ No newline at end of file diff --git a/packages/schema-type/index.yml b/packages/schema-type/index.yml new file mode 100644 index 0000000000..a1aa28c9f1 --- /dev/null +++ b/packages/schema-type/index.yml @@ -0,0 +1,2 @@ +label: schema-type +order: 60 diff --git a/packages/schema-type/package.json b/packages/schema-type/package.json new file mode 100644 index 0000000000..d9795526db --- /dev/null +++ b/packages/schema-type/package.json @@ -0,0 +1,32 @@ +{ + "name": "@latticexyz/schema-type", + "license": "MIT", + "version": "1.34.0", + "description": "SchemaType enum for various languages", + "main": "src/typescript/SchemaType.ts", + "source": "src/typescript/SchemaType.ts", + "type": "module", + "repository": { + "type": "git", + "url": "https://github.com/latticexyz/mud.git", + "directory": "packages/schema-type" + }, + "scripts": { + "prepare": "yarn build && chmod u+x git-install.sh", + "git:install": "bash git-install.sh", + "test": "yarn test:solidity && yarn test:typescript", + "test:solidity": "forge test", + "test:typescript": "tsc --noEmit", + "build": "yarn build:solidity && yarn build:typescript", + "build:solidity": "rimraf out && forge build", + "build:typescript": "tsc", + "link": "yarn link", + "release": "npm publish || echo 'version already published'" + }, + "devDependencies": { + "ds-test": "https://github.com/dapphub/ds-test.git#c9ce3f25bde29fc5eb9901842bf02850dfd2d084", + "forge-std": "https://github.com/foundry-rs/forge-std.git#b4f121555729b3afb3c5ffccb62ff4b6e2818fd3", + "rimraf": "^3.0.2" + }, + "gitHead": "218f56893d268b0c5157a3e4c603b859e287a343" +} diff --git a/packages/schema-type/remappings.txt b/packages/schema-type/remappings.txt new file mode 100644 index 0000000000..aeeced7eb6 --- /dev/null +++ b/packages/schema-type/remappings.txt @@ -0,0 +1,2 @@ +ds-test/=../../node_modules/ds-test/src/ +forge-std/=../../node_modules/forge-std/src/ diff --git a/packages/schema-type/src/solidity/SchemaType.sol b/packages/schema-type/src/solidity/SchemaType.sol new file mode 100644 index 0000000000..7067cdaec1 --- /dev/null +++ b/packages/schema-type/src/solidity/SchemaType.sol @@ -0,0 +1,237 @@ +// SPDX-License-Identifier: MIT +pragma solidity >=0.8.0; + +using { getStaticByteLength } for SchemaType global; + +// WARNING: All enum changes MUST be mirrored for the other languages! +// WARNING: SchemaType methods use hardcoded enum indexes, review them after any changes to the enum +// TODO add and implement BYTES_ARRAY, STRING_ARRAY if they are needed (see https://github.com/latticexyz/mud/issues/447) +enum SchemaType { + UINT8, + UINT16, + UINT24, + UINT32, + UINT40, + UINT48, + UINT56, + UINT64, + UINT72, + UINT80, + UINT88, + UINT96, + UINT104, + UINT112, + UINT120, + UINT128, + UINT136, + UINT144, + UINT152, + UINT160, + UINT168, + UINT176, + UINT184, + UINT192, + UINT200, + UINT208, + UINT216, + UINT224, + UINT232, + UINT240, + UINT248, + UINT256, + INT8, + INT16, + INT24, + INT32, + INT40, + INT48, + INT56, + INT64, + INT72, + INT80, + INT88, + INT96, + INT104, + INT112, + INT120, + INT128, + INT136, + INT144, + INT152, + INT160, + INT168, + INT176, + INT184, + INT192, + INT200, + INT208, + INT216, + INT224, + INT232, + INT240, + INT248, + INT256, + BYTES1, + BYTES2, + BYTES3, + BYTES4, + BYTES5, + BYTES6, + BYTES7, + BYTES8, + BYTES9, + BYTES10, + BYTES11, + BYTES12, + BYTES13, + BYTES14, + BYTES15, + BYTES16, + BYTES17, + BYTES18, + BYTES19, + BYTES20, + BYTES21, + BYTES22, + BYTES23, + BYTES24, + BYTES25, + BYTES26, + BYTES27, + BYTES28, + BYTES29, + BYTES30, + BYTES31, + BYTES32, + BOOL, + ADDRESS, + UINT8_ARRAY, + UINT16_ARRAY, + UINT24_ARRAY, + UINT32_ARRAY, + UINT40_ARRAY, + UINT48_ARRAY, + UINT56_ARRAY, + UINT64_ARRAY, + UINT72_ARRAY, + UINT80_ARRAY, + UINT88_ARRAY, + UINT96_ARRAY, + UINT104_ARRAY, + UINT112_ARRAY, + UINT120_ARRAY, + UINT128_ARRAY, + UINT136_ARRAY, + UINT144_ARRAY, + UINT152_ARRAY, + UINT160_ARRAY, + UINT168_ARRAY, + UINT176_ARRAY, + UINT184_ARRAY, + UINT192_ARRAY, + UINT200_ARRAY, + UINT208_ARRAY, + UINT216_ARRAY, + UINT224_ARRAY, + UINT232_ARRAY, + UINT240_ARRAY, + UINT248_ARRAY, + UINT256_ARRAY, + INT8_ARRAY, + INT16_ARRAY, + INT24_ARRAY, + INT32_ARRAY, + INT40_ARRAY, + INT48_ARRAY, + INT56_ARRAY, + INT64_ARRAY, + INT72_ARRAY, + INT80_ARRAY, + INT88_ARRAY, + INT96_ARRAY, + INT104_ARRAY, + INT112_ARRAY, + INT120_ARRAY, + INT128_ARRAY, + INT136_ARRAY, + INT144_ARRAY, + INT152_ARRAY, + INT160_ARRAY, + INT168_ARRAY, + INT176_ARRAY, + INT184_ARRAY, + INT192_ARRAY, + INT200_ARRAY, + INT208_ARRAY, + INT216_ARRAY, + INT224_ARRAY, + INT232_ARRAY, + INT240_ARRAY, + INT248_ARRAY, + INT256_ARRAY, + BYTES1_ARRAY, + BYTES2_ARRAY, + BYTES3_ARRAY, + BYTES4_ARRAY, + BYTES5_ARRAY, + BYTES6_ARRAY, + BYTES7_ARRAY, + BYTES8_ARRAY, + BYTES9_ARRAY, + BYTES10_ARRAY, + BYTES11_ARRAY, + BYTES12_ARRAY, + BYTES13_ARRAY, + BYTES14_ARRAY, + BYTES15_ARRAY, + BYTES16_ARRAY, + BYTES17_ARRAY, + BYTES18_ARRAY, + BYTES19_ARRAY, + BYTES20_ARRAY, + BYTES21_ARRAY, + BYTES22_ARRAY, + BYTES23_ARRAY, + BYTES24_ARRAY, + BYTES25_ARRAY, + BYTES26_ARRAY, + BYTES27_ARRAY, + BYTES28_ARRAY, + BYTES29_ARRAY, + BYTES30_ARRAY, + BYTES31_ARRAY, + BYTES32_ARRAY, + BOOL_ARRAY, + ADDRESS_ARRAY, + BYTES, + STRING +} + +/** + * Get the length of the data for the given schema type + * (Because Solidity doesn't support constant arrays, we need to use a function) + */ +function getStaticByteLength(SchemaType schemaType) pure returns (uint256) { + uint256 index = uint8(schemaType); + + if (index < 32) { + // uint8-256 + return index + 1; + } else if (index < 64) { + // int8-256, offset by 32 + return index + 1 - 32; + } else if (index < 96) { + // bytes1-32, offset by 64 + return index + 1 - 64; + } + + // Other static types + if (schemaType == SchemaType.BOOL) { + return 1; + } else if (schemaType == SchemaType.ADDRESS) { + return 20; + } + + // Return 0 for all dynamic types + return 0; +} diff --git a/packages/schema-type/src/typescript/SchemaType.ts b/packages/schema-type/src/typescript/SchemaType.ts new file mode 100644 index 0000000000..53a511c3fe --- /dev/null +++ b/packages/schema-type/src/typescript/SchemaType.ts @@ -0,0 +1,643 @@ +// WARNING: SchemaType enum MUST mirror the solidity version! +// WARNING: SchemaType methods use hardcoded enum indexes, review them after any changes to the enum +export enum SchemaType { + UINT8, + UINT16, + UINT24, + UINT32, + UINT40, + UINT48, + UINT56, + UINT64, + UINT72, + UINT80, + UINT88, + UINT96, + UINT104, + UINT112, + UINT120, + UINT128, + UINT136, + UINT144, + UINT152, + UINT160, + UINT168, + UINT176, + UINT184, + UINT192, + UINT200, + UINT208, + UINT216, + UINT224, + UINT232, + UINT240, + UINT248, + UINT256, + INT8, + INT16, + INT24, + INT32, + INT40, + INT48, + INT56, + INT64, + INT72, + INT80, + INT88, + INT96, + INT104, + INT112, + INT120, + INT128, + INT136, + INT144, + INT152, + INT160, + INT168, + INT176, + INT184, + INT192, + INT200, + INT208, + INT216, + INT224, + INT232, + INT240, + INT248, + INT256, + BYTES1, + BYTES2, + BYTES3, + BYTES4, + BYTES5, + BYTES6, + BYTES7, + BYTES8, + BYTES9, + BYTES10, + BYTES11, + BYTES12, + BYTES13, + BYTES14, + BYTES15, + BYTES16, + BYTES17, + BYTES18, + BYTES19, + BYTES20, + BYTES21, + BYTES22, + BYTES23, + BYTES24, + BYTES25, + BYTES26, + BYTES27, + BYTES28, + BYTES29, + BYTES30, + BYTES31, + BYTES32, + BOOL, + ADDRESS, + UINT8_ARRAY, + UINT16_ARRAY, + UINT24_ARRAY, + UINT32_ARRAY, + UINT40_ARRAY, + UINT48_ARRAY, + UINT56_ARRAY, + UINT64_ARRAY, + UINT72_ARRAY, + UINT80_ARRAY, + UINT88_ARRAY, + UINT96_ARRAY, + UINT104_ARRAY, + UINT112_ARRAY, + UINT120_ARRAY, + UINT128_ARRAY, + UINT136_ARRAY, + UINT144_ARRAY, + UINT152_ARRAY, + UINT160_ARRAY, + UINT168_ARRAY, + UINT176_ARRAY, + UINT184_ARRAY, + UINT192_ARRAY, + UINT200_ARRAY, + UINT208_ARRAY, + UINT216_ARRAY, + UINT224_ARRAY, + UINT232_ARRAY, + UINT240_ARRAY, + UINT248_ARRAY, + UINT256_ARRAY, + INT8_ARRAY, + INT16_ARRAY, + INT24_ARRAY, + INT32_ARRAY, + INT40_ARRAY, + INT48_ARRAY, + INT56_ARRAY, + INT64_ARRAY, + INT72_ARRAY, + INT80_ARRAY, + INT88_ARRAY, + INT96_ARRAY, + INT104_ARRAY, + INT112_ARRAY, + INT120_ARRAY, + INT128_ARRAY, + INT136_ARRAY, + INT144_ARRAY, + INT152_ARRAY, + INT160_ARRAY, + INT168_ARRAY, + INT176_ARRAY, + INT184_ARRAY, + INT192_ARRAY, + INT200_ARRAY, + INT208_ARRAY, + INT216_ARRAY, + INT224_ARRAY, + INT232_ARRAY, + INT240_ARRAY, + INT248_ARRAY, + INT256_ARRAY, + BYTES1_ARRAY, + BYTES2_ARRAY, + BYTES3_ARRAY, + BYTES4_ARRAY, + BYTES5_ARRAY, + BYTES6_ARRAY, + BYTES7_ARRAY, + BYTES8_ARRAY, + BYTES9_ARRAY, + BYTES10_ARRAY, + BYTES11_ARRAY, + BYTES12_ARRAY, + BYTES13_ARRAY, + BYTES14_ARRAY, + BYTES15_ARRAY, + BYTES16_ARRAY, + BYTES17_ARRAY, + BYTES18_ARRAY, + BYTES19_ARRAY, + BYTES20_ARRAY, + BYTES21_ARRAY, + BYTES22_ARRAY, + BYTES23_ARRAY, + BYTES24_ARRAY, + BYTES25_ARRAY, + BYTES26_ARRAY, + BYTES27_ARRAY, + BYTES28_ARRAY, + BYTES29_ARRAY, + BYTES30_ARRAY, + BYTES31_ARRAY, + BYTES32_ARRAY, + BOOL_ARRAY, + ADDRESS_ARRAY, + BYTES, + STRING, +} + +export function getStaticByteLength(schemaType: SchemaType) { + const val = schemaType.valueOf(); + if (val < 32) { + // uint8-256 + return val + 1; + } else if (val < 64) { + // int8-256, offset by 32 + return val + 1 - 32; + } else if (val < 96) { + // bytes1-32, offset by 64 + return val + 1 - 64; + } + + // Other static types + if (schemaType == SchemaType.BOOL) { + return 1; + } else if (schemaType == SchemaType.ADDRESS) { + return 20; + } + + // Return 0 for all dynamic types + return 0; +} + +export const SchemaTypeId: Record = { + [SchemaType.UINT8]: "uint8", + [SchemaType.UINT16]: "uint16", + [SchemaType.UINT24]: "uint24", + [SchemaType.UINT32]: "uint32", + [SchemaType.UINT40]: "uint40", + [SchemaType.UINT48]: "uint48", + [SchemaType.UINT56]: "uint56", + [SchemaType.UINT64]: "uint64", + [SchemaType.UINT72]: "uint72", + [SchemaType.UINT80]: "uint80", + [SchemaType.UINT88]: "uint88", + [SchemaType.UINT96]: "uint96", + [SchemaType.UINT104]: "uint104", + [SchemaType.UINT112]: "uint112", + [SchemaType.UINT120]: "uint120", + [SchemaType.UINT128]: "uint128", + [SchemaType.UINT136]: "uint136", + [SchemaType.UINT144]: "uint144", + [SchemaType.UINT152]: "uint152", + [SchemaType.UINT160]: "uint160", + [SchemaType.UINT168]: "uint168", + [SchemaType.UINT176]: "uint176", + [SchemaType.UINT184]: "uint184", + [SchemaType.UINT192]: "uint192", + [SchemaType.UINT200]: "uint200", + [SchemaType.UINT208]: "uint208", + [SchemaType.UINT216]: "uint216", + [SchemaType.UINT224]: "uint224", + [SchemaType.UINT232]: "uint232", + [SchemaType.UINT240]: "uint240", + [SchemaType.UINT248]: "uint248", + [SchemaType.UINT256]: "uint256", + + [SchemaType.INT8]: "int8", + [SchemaType.INT16]: "int16", + [SchemaType.INT24]: "int24", + [SchemaType.INT32]: "int32", + [SchemaType.INT40]: "int40", + [SchemaType.INT48]: "int48", + [SchemaType.INT56]: "int56", + [SchemaType.INT64]: "int64", + [SchemaType.INT72]: "int72", + [SchemaType.INT80]: "int80", + [SchemaType.INT88]: "int88", + [SchemaType.INT96]: "int96", + [SchemaType.INT104]: "int104", + [SchemaType.INT112]: "int112", + [SchemaType.INT120]: "int120", + [SchemaType.INT128]: "int128", + [SchemaType.INT136]: "int136", + [SchemaType.INT144]: "int144", + [SchemaType.INT152]: "int152", + [SchemaType.INT160]: "int160", + [SchemaType.INT168]: "int168", + [SchemaType.INT176]: "int176", + [SchemaType.INT184]: "int184", + [SchemaType.INT192]: "int192", + [SchemaType.INT200]: "int200", + [SchemaType.INT208]: "int208", + [SchemaType.INT216]: "int216", + [SchemaType.INT224]: "int224", + [SchemaType.INT232]: "int232", + [SchemaType.INT240]: "int240", + [SchemaType.INT248]: "int248", + [SchemaType.INT256]: "int256", + + [SchemaType.BYTES1]: "bytes1", + [SchemaType.BYTES2]: "bytes2", + [SchemaType.BYTES3]: "bytes3", + [SchemaType.BYTES4]: "bytes4", + [SchemaType.BYTES5]: "bytes5", + [SchemaType.BYTES6]: "bytes6", + [SchemaType.BYTES7]: "bytes7", + [SchemaType.BYTES8]: "bytes8", + [SchemaType.BYTES9]: "bytes9", + [SchemaType.BYTES10]: "bytes10", + [SchemaType.BYTES11]: "bytes11", + [SchemaType.BYTES12]: "bytes12", + [SchemaType.BYTES13]: "bytes13", + [SchemaType.BYTES14]: "bytes14", + [SchemaType.BYTES15]: "bytes15", + [SchemaType.BYTES16]: "bytes16", + [SchemaType.BYTES17]: "bytes17", + [SchemaType.BYTES18]: "bytes18", + [SchemaType.BYTES19]: "bytes19", + [SchemaType.BYTES20]: "bytes20", + [SchemaType.BYTES21]: "bytes21", + [SchemaType.BYTES22]: "bytes22", + [SchemaType.BYTES23]: "bytes23", + [SchemaType.BYTES24]: "bytes24", + [SchemaType.BYTES25]: "bytes25", + [SchemaType.BYTES26]: "bytes26", + [SchemaType.BYTES27]: "bytes27", + [SchemaType.BYTES28]: "bytes28", + [SchemaType.BYTES29]: "bytes29", + [SchemaType.BYTES30]: "bytes30", + [SchemaType.BYTES31]: "bytes31", + [SchemaType.BYTES32]: "bytes32", + + [SchemaType.BOOL]: "bool", + [SchemaType.ADDRESS]: "address", + + [SchemaType.UINT8_ARRAY]: "uint8[]", + [SchemaType.UINT16_ARRAY]: "uint16[]", + [SchemaType.UINT24_ARRAY]: "uint24[]", + [SchemaType.UINT32_ARRAY]: "uint32[]", + [SchemaType.UINT40_ARRAY]: "uint40[]", + [SchemaType.UINT48_ARRAY]: "uint48[]", + [SchemaType.UINT56_ARRAY]: "uint56[]", + [SchemaType.UINT64_ARRAY]: "uint64[]", + [SchemaType.UINT72_ARRAY]: "uint72[]", + [SchemaType.UINT80_ARRAY]: "uint80[]", + [SchemaType.UINT88_ARRAY]: "uint88[]", + [SchemaType.UINT96_ARRAY]: "uint96[]", + [SchemaType.UINT104_ARRAY]: "uint104[]", + [SchemaType.UINT112_ARRAY]: "uint112[]", + [SchemaType.UINT120_ARRAY]: "uint120[]", + [SchemaType.UINT128_ARRAY]: "uint128[]", + [SchemaType.UINT136_ARRAY]: "uint136[]", + [SchemaType.UINT144_ARRAY]: "uint144[]", + [SchemaType.UINT152_ARRAY]: "uint152[]", + [SchemaType.UINT160_ARRAY]: "uint160[]", + [SchemaType.UINT168_ARRAY]: "uint168[]", + [SchemaType.UINT176_ARRAY]: "uint176[]", + [SchemaType.UINT184_ARRAY]: "uint184[]", + [SchemaType.UINT192_ARRAY]: "uint192[]", + [SchemaType.UINT200_ARRAY]: "uint200[]", + [SchemaType.UINT208_ARRAY]: "uint208[]", + [SchemaType.UINT216_ARRAY]: "uint216[]", + [SchemaType.UINT224_ARRAY]: "uint224[]", + [SchemaType.UINT232_ARRAY]: "uint232[]", + [SchemaType.UINT240_ARRAY]: "uint240[]", + [SchemaType.UINT248_ARRAY]: "uint248[]", + [SchemaType.UINT256_ARRAY]: "uint256[]", + + [SchemaType.INT8_ARRAY]: "int8[]", + [SchemaType.INT16_ARRAY]: "int16[]", + [SchemaType.INT24_ARRAY]: "int24[]", + [SchemaType.INT32_ARRAY]: "int32[]", + [SchemaType.INT40_ARRAY]: "int40[]", + [SchemaType.INT48_ARRAY]: "int48[]", + [SchemaType.INT56_ARRAY]: "int56[]", + [SchemaType.INT64_ARRAY]: "int64[]", + [SchemaType.INT72_ARRAY]: "int72[]", + [SchemaType.INT80_ARRAY]: "int80[]", + [SchemaType.INT88_ARRAY]: "int88[]", + [SchemaType.INT96_ARRAY]: "int96[]", + [SchemaType.INT104_ARRAY]: "int104[]", + [SchemaType.INT112_ARRAY]: "int112[]", + [SchemaType.INT120_ARRAY]: "int120[]", + [SchemaType.INT128_ARRAY]: "int128[]", + [SchemaType.INT136_ARRAY]: "int136[]", + [SchemaType.INT144_ARRAY]: "int144[]", + [SchemaType.INT152_ARRAY]: "int152[]", + [SchemaType.INT160_ARRAY]: "int160[]", + [SchemaType.INT168_ARRAY]: "int168[]", + [SchemaType.INT176_ARRAY]: "int176[]", + [SchemaType.INT184_ARRAY]: "int184[]", + [SchemaType.INT192_ARRAY]: "int192[]", + [SchemaType.INT200_ARRAY]: "int200[]", + [SchemaType.INT208_ARRAY]: "int208[]", + [SchemaType.INT216_ARRAY]: "int216[]", + [SchemaType.INT224_ARRAY]: "int224[]", + [SchemaType.INT232_ARRAY]: "int232[]", + [SchemaType.INT240_ARRAY]: "int240[]", + [SchemaType.INT248_ARRAY]: "int248[]", + [SchemaType.INT256_ARRAY]: "int256[]", + + [SchemaType.BYTES1_ARRAY]: "bytes1[]", + [SchemaType.BYTES2_ARRAY]: "bytes2[]", + [SchemaType.BYTES3_ARRAY]: "bytes3[]", + [SchemaType.BYTES4_ARRAY]: "bytes4[]", + [SchemaType.BYTES5_ARRAY]: "bytes5[]", + [SchemaType.BYTES6_ARRAY]: "bytes6[]", + [SchemaType.BYTES7_ARRAY]: "bytes7[]", + [SchemaType.BYTES8_ARRAY]: "bytes8[]", + [SchemaType.BYTES9_ARRAY]: "bytes9[]", + [SchemaType.BYTES10_ARRAY]: "bytes10[]", + [SchemaType.BYTES11_ARRAY]: "bytes11[]", + [SchemaType.BYTES12_ARRAY]: "bytes12[]", + [SchemaType.BYTES13_ARRAY]: "bytes13[]", + [SchemaType.BYTES14_ARRAY]: "bytes14[]", + [SchemaType.BYTES15_ARRAY]: "bytes15[]", + [SchemaType.BYTES16_ARRAY]: "bytes16[]", + [SchemaType.BYTES17_ARRAY]: "bytes17[]", + [SchemaType.BYTES18_ARRAY]: "bytes18[]", + [SchemaType.BYTES19_ARRAY]: "bytes19[]", + [SchemaType.BYTES20_ARRAY]: "bytes20[]", + [SchemaType.BYTES21_ARRAY]: "bytes21[]", + [SchemaType.BYTES22_ARRAY]: "bytes22[]", + [SchemaType.BYTES23_ARRAY]: "bytes23[]", + [SchemaType.BYTES24_ARRAY]: "bytes24[]", + [SchemaType.BYTES25_ARRAY]: "bytes25[]", + [SchemaType.BYTES26_ARRAY]: "bytes26[]", + [SchemaType.BYTES27_ARRAY]: "bytes27[]", + [SchemaType.BYTES28_ARRAY]: "bytes28[]", + [SchemaType.BYTES29_ARRAY]: "bytes29[]", + [SchemaType.BYTES30_ARRAY]: "bytes30[]", + [SchemaType.BYTES31_ARRAY]: "bytes31[]", + [SchemaType.BYTES32_ARRAY]: "bytes32[]", + + [SchemaType.BOOL_ARRAY]: "bool[]", + [SchemaType.ADDRESS_ARRAY]: "address[]", + + [SchemaType.BYTES]: "bytes", + [SchemaType.STRING]: "string", +}; + +export type ArraySchemaType = + | SchemaType.UINT8_ARRAY + | SchemaType.UINT16_ARRAY + | SchemaType.UINT24_ARRAY + | SchemaType.UINT32_ARRAY + | SchemaType.UINT40_ARRAY + | SchemaType.UINT48_ARRAY + | SchemaType.UINT56_ARRAY + | SchemaType.UINT64_ARRAY + | SchemaType.UINT72_ARRAY + | SchemaType.UINT80_ARRAY + | SchemaType.UINT88_ARRAY + | SchemaType.UINT96_ARRAY + | SchemaType.UINT104_ARRAY + | SchemaType.UINT112_ARRAY + | SchemaType.UINT120_ARRAY + | SchemaType.UINT128_ARRAY + | SchemaType.UINT136_ARRAY + | SchemaType.UINT144_ARRAY + | SchemaType.UINT152_ARRAY + | SchemaType.UINT160_ARRAY + | SchemaType.UINT168_ARRAY + | SchemaType.UINT176_ARRAY + | SchemaType.UINT184_ARRAY + | SchemaType.UINT192_ARRAY + | SchemaType.UINT200_ARRAY + | SchemaType.UINT208_ARRAY + | SchemaType.UINT216_ARRAY + | SchemaType.UINT224_ARRAY + | SchemaType.UINT232_ARRAY + | SchemaType.UINT240_ARRAY + | SchemaType.UINT248_ARRAY + | SchemaType.UINT256_ARRAY + | SchemaType.INT8_ARRAY + | SchemaType.INT16_ARRAY + | SchemaType.INT24_ARRAY + | SchemaType.INT32_ARRAY + | SchemaType.INT40_ARRAY + | SchemaType.INT48_ARRAY + | SchemaType.INT56_ARRAY + | SchemaType.INT64_ARRAY + | SchemaType.INT72_ARRAY + | SchemaType.INT80_ARRAY + | SchemaType.INT88_ARRAY + | SchemaType.INT96_ARRAY + | SchemaType.INT104_ARRAY + | SchemaType.INT112_ARRAY + | SchemaType.INT120_ARRAY + | SchemaType.INT128_ARRAY + | SchemaType.INT136_ARRAY + | SchemaType.INT144_ARRAY + | SchemaType.INT152_ARRAY + | SchemaType.INT160_ARRAY + | SchemaType.INT168_ARRAY + | SchemaType.INT176_ARRAY + | SchemaType.INT184_ARRAY + | SchemaType.INT192_ARRAY + | SchemaType.INT200_ARRAY + | SchemaType.INT208_ARRAY + | SchemaType.INT216_ARRAY + | SchemaType.INT224_ARRAY + | SchemaType.INT232_ARRAY + | SchemaType.INT240_ARRAY + | SchemaType.INT248_ARRAY + | SchemaType.INT256_ARRAY + | SchemaType.BYTES1_ARRAY + | SchemaType.BYTES2_ARRAY + | SchemaType.BYTES3_ARRAY + | SchemaType.BYTES4_ARRAY + | SchemaType.BYTES5_ARRAY + | SchemaType.BYTES6_ARRAY + | SchemaType.BYTES7_ARRAY + | SchemaType.BYTES8_ARRAY + | SchemaType.BYTES9_ARRAY + | SchemaType.BYTES10_ARRAY + | SchemaType.BYTES11_ARRAY + | SchemaType.BYTES12_ARRAY + | SchemaType.BYTES13_ARRAY + | SchemaType.BYTES14_ARRAY + | SchemaType.BYTES15_ARRAY + | SchemaType.BYTES16_ARRAY + | SchemaType.BYTES17_ARRAY + | SchemaType.BYTES18_ARRAY + | SchemaType.BYTES19_ARRAY + | SchemaType.BYTES20_ARRAY + | SchemaType.BYTES21_ARRAY + | SchemaType.BYTES22_ARRAY + | SchemaType.BYTES23_ARRAY + | SchemaType.BYTES24_ARRAY + | SchemaType.BYTES25_ARRAY + | SchemaType.BYTES26_ARRAY + | SchemaType.BYTES27_ARRAY + | SchemaType.BYTES28_ARRAY + | SchemaType.BYTES29_ARRAY + | SchemaType.BYTES30_ARRAY + | SchemaType.BYTES31_ARRAY + | SchemaType.BYTES32_ARRAY + | SchemaType.BOOL_ARRAY + | SchemaType.ADDRESS_ARRAY; + +export const SchemaTypeArrayToElement = { + [SchemaType.UINT8_ARRAY]: SchemaType.UINT8, + [SchemaType.UINT16_ARRAY]: SchemaType.UINT16, + [SchemaType.UINT24_ARRAY]: SchemaType.UINT24, + [SchemaType.UINT32_ARRAY]: SchemaType.UINT32, + [SchemaType.UINT40_ARRAY]: SchemaType.UINT40, + [SchemaType.UINT48_ARRAY]: SchemaType.UINT48, + [SchemaType.UINT56_ARRAY]: SchemaType.UINT56, + [SchemaType.UINT64_ARRAY]: SchemaType.UINT64, + [SchemaType.UINT72_ARRAY]: SchemaType.UINT72, + [SchemaType.UINT80_ARRAY]: SchemaType.UINT80, + [SchemaType.UINT88_ARRAY]: SchemaType.UINT88, + [SchemaType.UINT96_ARRAY]: SchemaType.UINT96, + [SchemaType.UINT104_ARRAY]: SchemaType.UINT104, + [SchemaType.UINT112_ARRAY]: SchemaType.UINT112, + [SchemaType.UINT120_ARRAY]: SchemaType.UINT120, + [SchemaType.UINT128_ARRAY]: SchemaType.UINT128, + [SchemaType.UINT136_ARRAY]: SchemaType.UINT136, + [SchemaType.UINT144_ARRAY]: SchemaType.UINT144, + [SchemaType.UINT152_ARRAY]: SchemaType.UINT152, + [SchemaType.UINT160_ARRAY]: SchemaType.UINT160, + [SchemaType.UINT168_ARRAY]: SchemaType.UINT168, + [SchemaType.UINT176_ARRAY]: SchemaType.UINT176, + [SchemaType.UINT184_ARRAY]: SchemaType.UINT184, + [SchemaType.UINT192_ARRAY]: SchemaType.UINT192, + [SchemaType.UINT200_ARRAY]: SchemaType.UINT200, + [SchemaType.UINT208_ARRAY]: SchemaType.UINT208, + [SchemaType.UINT216_ARRAY]: SchemaType.UINT216, + [SchemaType.UINT224_ARRAY]: SchemaType.UINT224, + [SchemaType.UINT232_ARRAY]: SchemaType.UINT232, + [SchemaType.UINT240_ARRAY]: SchemaType.UINT240, + [SchemaType.UINT248_ARRAY]: SchemaType.UINT248, + [SchemaType.UINT256_ARRAY]: SchemaType.UINT256, + + [SchemaType.INT8_ARRAY]: SchemaType.INT8, + [SchemaType.INT16_ARRAY]: SchemaType.INT16, + [SchemaType.INT24_ARRAY]: SchemaType.INT24, + [SchemaType.INT32_ARRAY]: SchemaType.INT32, + [SchemaType.INT40_ARRAY]: SchemaType.INT40, + [SchemaType.INT48_ARRAY]: SchemaType.INT48, + [SchemaType.INT56_ARRAY]: SchemaType.INT56, + [SchemaType.INT64_ARRAY]: SchemaType.INT64, + [SchemaType.INT72_ARRAY]: SchemaType.INT72, + [SchemaType.INT80_ARRAY]: SchemaType.INT80, + [SchemaType.INT88_ARRAY]: SchemaType.INT88, + [SchemaType.INT96_ARRAY]: SchemaType.INT96, + [SchemaType.INT104_ARRAY]: SchemaType.INT104, + [SchemaType.INT112_ARRAY]: SchemaType.INT112, + [SchemaType.INT120_ARRAY]: SchemaType.INT120, + [SchemaType.INT128_ARRAY]: SchemaType.INT128, + [SchemaType.INT136_ARRAY]: SchemaType.INT136, + [SchemaType.INT144_ARRAY]: SchemaType.INT144, + [SchemaType.INT152_ARRAY]: SchemaType.INT152, + [SchemaType.INT160_ARRAY]: SchemaType.INT160, + [SchemaType.INT168_ARRAY]: SchemaType.INT168, + [SchemaType.INT176_ARRAY]: SchemaType.INT176, + [SchemaType.INT184_ARRAY]: SchemaType.INT184, + [SchemaType.INT192_ARRAY]: SchemaType.INT192, + [SchemaType.INT200_ARRAY]: SchemaType.INT200, + [SchemaType.INT208_ARRAY]: SchemaType.INT208, + [SchemaType.INT216_ARRAY]: SchemaType.INT216, + [SchemaType.INT224_ARRAY]: SchemaType.INT224, + [SchemaType.INT232_ARRAY]: SchemaType.INT232, + [SchemaType.INT240_ARRAY]: SchemaType.INT240, + [SchemaType.INT248_ARRAY]: SchemaType.INT248, + [SchemaType.INT256_ARRAY]: SchemaType.INT256, + + [SchemaType.BYTES1_ARRAY]: SchemaType.BYTES1, + [SchemaType.BYTES2_ARRAY]: SchemaType.BYTES2, + [SchemaType.BYTES3_ARRAY]: SchemaType.BYTES3, + [SchemaType.BYTES4_ARRAY]: SchemaType.BYTES4, + [SchemaType.BYTES5_ARRAY]: SchemaType.BYTES5, + [SchemaType.BYTES6_ARRAY]: SchemaType.BYTES6, + [SchemaType.BYTES7_ARRAY]: SchemaType.BYTES7, + [SchemaType.BYTES8_ARRAY]: SchemaType.BYTES8, + [SchemaType.BYTES9_ARRAY]: SchemaType.BYTES9, + [SchemaType.BYTES10_ARRAY]: SchemaType.BYTES10, + [SchemaType.BYTES11_ARRAY]: SchemaType.BYTES11, + [SchemaType.BYTES12_ARRAY]: SchemaType.BYTES12, + [SchemaType.BYTES13_ARRAY]: SchemaType.BYTES13, + [SchemaType.BYTES14_ARRAY]: SchemaType.BYTES14, + [SchemaType.BYTES15_ARRAY]: SchemaType.BYTES15, + [SchemaType.BYTES16_ARRAY]: SchemaType.BYTES16, + [SchemaType.BYTES17_ARRAY]: SchemaType.BYTES17, + [SchemaType.BYTES18_ARRAY]: SchemaType.BYTES18, + [SchemaType.BYTES19_ARRAY]: SchemaType.BYTES19, + [SchemaType.BYTES20_ARRAY]: SchemaType.BYTES20, + [SchemaType.BYTES21_ARRAY]: SchemaType.BYTES21, + [SchemaType.BYTES22_ARRAY]: SchemaType.BYTES22, + [SchemaType.BYTES23_ARRAY]: SchemaType.BYTES23, + [SchemaType.BYTES24_ARRAY]: SchemaType.BYTES24, + [SchemaType.BYTES25_ARRAY]: SchemaType.BYTES25, + [SchemaType.BYTES26_ARRAY]: SchemaType.BYTES26, + [SchemaType.BYTES27_ARRAY]: SchemaType.BYTES27, + [SchemaType.BYTES28_ARRAY]: SchemaType.BYTES28, + [SchemaType.BYTES29_ARRAY]: SchemaType.BYTES29, + [SchemaType.BYTES30_ARRAY]: SchemaType.BYTES30, + [SchemaType.BYTES31_ARRAY]: SchemaType.BYTES31, + [SchemaType.BYTES32_ARRAY]: SchemaType.BYTES32, + + [SchemaType.BOOL_ARRAY]: SchemaType.BOOL, + [SchemaType.ADDRESS_ARRAY]: SchemaType.ADDRESS, +} as { + [K in SchemaType]: K extends ArraySchemaType ? SchemaType : undefined; +}; + +export type DynamicSchemaType = ArraySchemaType | SchemaType.BYTES | SchemaType.STRING; diff --git a/packages/schema-type/test/solidity/SchemaType.t.sol b/packages/schema-type/test/solidity/SchemaType.t.sol new file mode 100644 index 0000000000..aa5e197a62 --- /dev/null +++ b/packages/schema-type/test/solidity/SchemaType.t.sol @@ -0,0 +1,12 @@ +// SPDX-License-Identifier: MIT +pragma solidity >=0.8.0; + +import { Test } from "forge-std/Test.sol"; +import { SchemaType } from "../../src/solidity/SchemaType.sol"; + +contract SchemaTypeTest is Test { + function testGetStaticByteLength() public { + assertEq(SchemaType.UINT8.getStaticByteLength(), 1); + // TODO add more tests (https://github.com/latticexyz/mud/issues/444) + } +} diff --git a/packages/schema-type/tsconfig.json b/packages/schema-type/tsconfig.json new file mode 100644 index 0000000000..af1ef4730a --- /dev/null +++ b/packages/schema-type/tsconfig.json @@ -0,0 +1,18 @@ +{ + "compilerOptions": { + /* Visit https://aka.ms/tsconfig.json to read more about this file */ + "target": "es2020", + "module": "esnext", + "rootDir": "./src/typescript", + "moduleResolution": "node", + "types": [], + "declaration": true, + "sourceMap": true, + "outDir": "dist/typescript", + "isolatedModules": true, + "esModuleInterop": true, + "forceConsistentCasingInFileNames": true, + "strict": true + }, + "include": ["src/typescript"] +} diff --git a/packages/services/Makefile b/packages/services/Makefile index ce62678f32..a6deded812 100644 --- a/packages/services/Makefile +++ b/packages/services/Makefile @@ -26,22 +26,22 @@ protoc-ts: protoc \ --plugin protoc-gen-ts_proto=./node_modules/.bin/protoc-gen-ts_proto \ --ts_proto_out ./protobuf/ts/ecs-stream \ - --ts_proto_opt=env=browser,outputServices=nice-grpc,outputServices=generic-definitions,outputJsonMethods=false,useExactTypes=false,eslint_disable,esModuleInterop=true \ + --ts_proto_opt=env=browser,outputServices=nice-grpc,outputServices=generic-definitions,outputJsonMethods=false,useExactTypes=false,eslint_disable,esModuleInterop=true,importSuffix=.js \ --proto_path proto proto/ecs-stream.proto protoc \ --plugin protoc-gen-ts_proto=./node_modules/.bin/protoc-gen-ts_proto \ --ts_proto_out ./protobuf/ts/ecs-snapshot \ - --ts_proto_opt=env=browser,outputServices=nice-grpc,outputServices=generic-definitions,outputJsonMethods=false,useExactTypes=false,eslint_disable,esModuleInterop=true \ + --ts_proto_opt=env=browser,outputServices=nice-grpc,outputServices=generic-definitions,outputJsonMethods=false,useExactTypes=false,eslint_disable,esModuleInterop=true,importSuffix=.js \ --proto_path proto proto/ecs-snapshot.proto protoc \ --plugin protoc-gen-ts_proto=./node_modules/.bin/protoc-gen-ts_proto \ --ts_proto_out ./protobuf/ts/ecs-relay \ - --ts_proto_opt=env=browser,outputServices=nice-grpc,outputServices=generic-definitions,outputJsonMethods=false,useExactTypes=false,eslint_disable,esModuleInterop=true \ + --ts_proto_opt=env=browser,outputServices=nice-grpc,outputServices=generic-definitions,outputJsonMethods=false,useExactTypes=false,eslint_disable,esModuleInterop=true,importSuffix=.js \ --proto_path proto proto/ecs-relay.proto protoc \ --plugin protoc-gen-ts_proto=./node_modules/.bin/protoc-gen-ts_proto \ --ts_proto_out ./protobuf/ts/faucet \ - --ts_proto_opt=env=browser,outputServices=nice-grpc,outputServices=generic-definitions,outputJsonMethods=false,useExactTypes=false,eslint_disable,esModuleInterop=true \ + --ts_proto_opt=env=browser,outputServices=nice-grpc,outputServices=generic-definitions,outputJsonMethods=false,useExactTypes=false,eslint_disable,esModuleInterop=true,importSuffix=.js \ --proto_path proto proto/faucet.proto .PHONY: protoc-ts diff --git a/packages/services/package.json b/packages/services/package.json index 83a6226959..2d60832dde 100644 --- a/packages/services/package.json +++ b/packages/services/package.json @@ -3,7 +3,8 @@ "license": "MIT", "version": "1.39.0", "description": "MUD services for enhanced interactions with on-chain ECS state", - "main": "protobuf/ts", + "main": "protobuf/ts/index.ts", + "type": "module", "repository": { "type": "git", "url": "https://github.com/latticexyz/mud.git", @@ -12,7 +13,8 @@ "scripts": { "prepare": "make build", "docs": "rimraf API && mkdir -p _docs/pkg && find pkg -type f -name '*.go' -exec bash -c 'gomarkdoc {} > \"$(dirname _docs/{})\".md' \\; && mv _docs/pkg API && rimraf _docs", - "test": "echo 'todo: add tests'", + "test": "tsc --noEmit && echo 'todo: add tests'", + "protoc-ts": "make protoc-ts", "link": "yarn link", "release": "npm publish || echo 'version already published'" }, diff --git a/packages/services/protobuf/ts/ecs-relay/ecs-relay.ts b/packages/services/protobuf/ts/ecs-relay/ecs-relay.ts index 1ab4eaab06..3370f3d5f5 100644 --- a/packages/services/protobuf/ts/ecs-relay/ecs-relay.ts +++ b/packages/services/protobuf/ts/ecs-relay/ecs-relay.ts @@ -1,7 +1,7 @@ /* eslint-disable */ import Long from "long"; import { CallContext, CallOptions } from "nice-grpc-common"; -import _m0 from "protobufjs/minimal"; +import _m0 from "protobufjs/minimal.js"; export const protobufPackage = "ecsrelay"; diff --git a/packages/services/protobuf/ts/ecs-snapshot/ecs-snapshot.ts b/packages/services/protobuf/ts/ecs-snapshot/ecs-snapshot.ts index 7e83f4b500..3c0ade6aa0 100644 --- a/packages/services/protobuf/ts/ecs-snapshot/ecs-snapshot.ts +++ b/packages/services/protobuf/ts/ecs-snapshot/ecs-snapshot.ts @@ -1,7 +1,7 @@ /* eslint-disable */ import Long from "long"; import { CallContext, CallOptions } from "nice-grpc-common"; -import _m0 from "protobufjs/minimal"; +import _m0 from "protobufjs/minimal.js"; export const protobufPackage = "ecssnapshot"; diff --git a/packages/services/protobuf/ts/ecs-stream/ecs-stream.ts b/packages/services/protobuf/ts/ecs-stream/ecs-stream.ts index 25e2bb67c8..d4a0960cdd 100644 --- a/packages/services/protobuf/ts/ecs-stream/ecs-stream.ts +++ b/packages/services/protobuf/ts/ecs-stream/ecs-stream.ts @@ -1,7 +1,7 @@ /* eslint-disable */ import Long from "long"; import { CallContext, CallOptions } from "nice-grpc-common"; -import _m0 from "protobufjs/minimal"; +import _m0 from "protobufjs/minimal.js"; export const protobufPackage = "ecsstream"; diff --git a/packages/services/protobuf/ts/faucet/faucet.ts b/packages/services/protobuf/ts/faucet/faucet.ts index 252252e8fb..5c916f6899 100644 --- a/packages/services/protobuf/ts/faucet/faucet.ts +++ b/packages/services/protobuf/ts/faucet/faucet.ts @@ -1,7 +1,7 @@ /* eslint-disable */ import Long from "long"; import { CallContext, CallOptions } from "nice-grpc-common"; -import _m0 from "protobufjs/minimal"; +import _m0 from "protobufjs/minimal.js"; export const protobufPackage = "faucet"; diff --git a/packages/services/tsconfig.json b/packages/services/tsconfig.json index 42f492082e..e565d6d2dd 100644 --- a/packages/services/tsconfig.json +++ b/packages/services/tsconfig.json @@ -24,7 +24,7 @@ // "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */ /* Modules */ - // "module": "esnext" /* Specify what module code is generated. */, + "module": "esnext" /* Specify what module code is generated. */, // "rootDir": "." /* Specify the root folder within your source files. */, "moduleResolution": "node" /* Specify how TypeScript looks up a file from a given module specifier. */, // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */ @@ -67,8 +67,8 @@ // "preserveValueImports": true, /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */ /* Interop Constraints */ - // "isolatedModules": true /* Ensure that each file can be safely transpiled without relying on other imports. */, - // "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */ + "isolatedModules": true /* Ensure that each file can be safely transpiled without relying on other imports. */, + "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */ "esModuleInterop": true /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables `allowSyntheticDefaultImports` for type compatibility. */ // "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */ // "forceConsistentCasingInFileNames": true /* Ensure that casing is correct in imports. */ diff --git a/packages/store/.gitignore b/packages/store/.gitignore new file mode 100644 index 0000000000..2f6f3adfc2 --- /dev/null +++ b/packages/store/.gitignore @@ -0,0 +1,10 @@ +cache +abi +out +types/ethers-contracts +docs +_docs +DOCS.md +artifacts +yarn-error.log +API \ No newline at end of file diff --git a/packages/store/.npmignore b/packages/store/.npmignore new file mode 100644 index 0000000000..4240dbeb28 --- /dev/null +++ b/packages/store/.npmignore @@ -0,0 +1,7 @@ +* + +!abi/** +!src/** +!types/** +!package.json +!README.md \ No newline at end of file diff --git a/packages/store/.nvmrc b/packages/store/.nvmrc new file mode 100644 index 0000000000..8e2afd3427 --- /dev/null +++ b/packages/store/.nvmrc @@ -0,0 +1 @@ +17 \ No newline at end of file diff --git a/packages/store/.prettierrc b/packages/store/.prettierrc new file mode 100644 index 0000000000..9a5a009900 --- /dev/null +++ b/packages/store/.prettierrc @@ -0,0 +1,7 @@ +{ + "printWidth": 120, + "semi": true, + "tabWidth": 2, + "useTabs": false, + "bracketSpacing": true +} diff --git a/packages/store/.solhint.json b/packages/store/.solhint.json new file mode 100644 index 0000000000..4e2baa8be7 --- /dev/null +++ b/packages/store/.solhint.json @@ -0,0 +1,8 @@ +{ + "extends": "solhint:recommended", + "rules": { + "compiler-version": ["error", ">=0.8.0"], + "avoid-low-level-calls": "off", + "func-visibility": ["warn", { "ignoreConstructors": true }] + } +} diff --git a/packages/store/CHANGELOG.md b/packages/store/CHANGELOG.md new file mode 100644 index 0000000000..e4d87c4d45 --- /dev/null +++ b/packages/store/CHANGELOG.md @@ -0,0 +1,4 @@ +# Change Log + +All notable changes to this project will be documented in this file. +See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. diff --git a/packages/store/CHANGELOG.yml b/packages/store/CHANGELOG.yml new file mode 100644 index 0000000000..e3f6e391b4 --- /dev/null +++ b/packages/store/CHANGELOG.yml @@ -0,0 +1 @@ +label: Changelog diff --git a/packages/store/README.md b/packages/store/README.md new file mode 100644 index 0000000000..3f8815b136 --- /dev/null +++ b/packages/store/README.md @@ -0,0 +1 @@ +# Store diff --git a/packages/store/foundry.toml b/packages/store/foundry.toml new file mode 100644 index 0000000000..fc131f5c1f --- /dev/null +++ b/packages/store/foundry.toml @@ -0,0 +1,9 @@ +[profile.default] +ffi = false +fuzz_runs = 256 +optimizer = true +optimizer_runs = 3000 +verbosity = 1 +libs = ["../../node_modules"] +src = "src" +out = "out" \ No newline at end of file diff --git a/packages/store/gas-report.txt b/packages/store/gas-report.txt new file mode 100644 index 0000000000..f7b803277f --- /dev/null +++ b/packages/store/gas-report.txt @@ -0,0 +1,89 @@ +(test/Bytes.t.sol) | compare equal bytes [bool equals = Bytes.equals(a, b)]: 202 +(test/Bytes.t.sol) | compare unequal bytes [bool equals = Bytes.equals(a, b)]: 202 +(test/Bytes.t.sol) | set bytes1 in bytes32 [Bytes.setBytes1(input, 8, 0xff)]: 7 +(test/Bytes.t.sol) | set bytes2 in bytes32 [Bytes.setBytes2(input, 8, 0xffff)]: 7 +(test/Bytes.t.sol) | set bytes4 in bytes32 [Bytes.setBytes4(input, 8, 0xffffffff)]: 7 +(test/Bytes.t.sol) | slice bytes3 with offset 1 [bytes3 b = Bytes.slice3(a, 1)]: 77 +(test/Bytes.t.sol) | slice bytes32 with offset 10 [bytes32 output = Bytes.slice32(input, 10)]: 74 +(test/Bytes.t.sol) | create bytes32 from bytes memory with offset 0 [bytes32 output = Bytes.toBytes32(input, 0)]: 22 +(test/Bytes.t.sol) | create bytes32 from bytes memory with offset 16 [bytes32 output = Bytes.toBytes32(input, 16)]: 22 +(test/Gas.t.sol) | abi encode [bytes memory abiEncoded = abi.encode(mixed)]: 936 +(test/Gas.t.sol) | abi decode [Mixed memory abiDecoded = abi.decode(abiEncoded, (Mixed))]: 1722 +(test/Gas.t.sol) | custom encode [bytes memory customEncoded = customEncode(mixed)]: 1766 +(test/Gas.t.sol) | custom decode [Mixed memory customDecoded = customDecode(customEncoded)]: 2555 +(test/Gas.t.sol) | pass abi encoded bytes to external contract [someContract.doSomethingWithBytes(abiEncoded)]: 6540 +(test/Gas.t.sol) | pass custom encoded bytes to external contract [someContract.doSomethingWithBytes(customEncoded)]: 1344 +(test/Mixed.t.sol) | store Mixed struct in storage (native solidity) [testMixed = mixed]: 92019 +(test/Mixed.t.sol) | register Mixed schema [Mixed.registerSchema()]: 35085 +(test/Mixed.t.sol) | set record in Mixed [Mixed.set({ key: key, u32: 1, u128: 2, a32: a32, s: s })]: 111007 +(test/Mixed.t.sol) | get record from Mixed [MixedData memory mixed = Mixed.get(key)]: 13249 +(test/PackedCounter.t.sol) | get value at index of PackedCounter [packedCounter.atIndex(3)]: 272 +(test/PackedCounter.t.sol) | set value at index of PackedCounter [packedCounter = packedCounter.setAtIndex(2, 5)]: 830 +(test/PackedCounter.t.sol) | pack uint16 array into PackedCounter [PackedCounter packedCounter = PackedCounterLib.pack(counters)]: 2148 +(test/PackedCounter.t.sol) | get total of PackedCounter [packedCounter.total()]: 33 +(test/Route.t.sol) | register Route schema [Route.registerSchema()]: 33867 +(test/Route.t.sol) | set Route record [Route.set(key, addr, selector, executionMode)]: 37691 +(test/Route.t.sol) | get Route record [RouteData memory systemEntry = Route.get(key)]: 6077 +(test/Schema.t.sol) | encode schema with 6 entries [SchemaLib.encode]: 6044 +(test/Schema.t.sol) | get schema type at index [SchemaType schemaType1 = schema.atIndex(0)]: 200 +(test/Schema.t.sol) | get number of dynamic fields from schema [uint256 num = schema.numDynamicFields()]: 80 +(test/Schema.t.sol) | get number of static fields from schema [uint256 num = schema.numStaticFields()]: 91 +(test/Schema.t.sol) | get static data length from schema [uint256 length = schema.staticDataLength()]: 39 +(test/Schema.t.sol) | check if schema is empty (non-empty schema) [bool empty = encodedSchema.isEmpty()]: 13 +(test/Schema.t.sol) | check if schema is empty (empty schema) [bool empty = encodedSchema.isEmpty()]: 13 +(test/Schema.t.sol) | validate schema [encodedSchema.validate()]: 19398 +(test/Slice.t.sol) | make Slice from bytes [Slice slice = SliceLib.fromBytes(data)]: 40 +(test/Slice.t.sol) | get Slice length [slice.length()]: 7 +(test/Slice.t.sol) | get Slice pointer [slice.pointer()]: 33 +(test/Slice.t.sol) | subslice bytes (no copy) [1:4] [Slice slice1 = SliceLib.getSubslice(data, 1, 1 + 3)]: 330 +(test/Slice.t.sol) | subslice bytes (no copy) [4:37] [Slice slice2 = SliceLib.getSubslice(data, 4, 4 + 33)]: 330 +(test/Slice.t.sol) | Slice (0 bytes) to bytes memory [bytes memory sliceData0 = slice.toBytes()]: 610 +(test/Slice.t.sol) | Slice (2 bytes) to bytes memory [bytes memory sliceData2 = slice.toBytes()]: 645 +(test/Slice.t.sol) | Slice (32 bytes) to bytes memory [bytes memory sliceData32 = slice.toBytes()]: 513 +(test/Slice.t.sol) | Slice (34 bytes) to bytes memory [bytes memory sliceData34 = slice.toBytes()]: 591 +(test/Slice.t.sol) | Slice (1024 bytes) to bytes memory [bytes memory sliceData1024 = slice.toBytes()]: 4847 +(test/Slice.t.sol) | Slice (1024x1024 bytes) to bytes memory [bytes memory sliceData1024x1024 = slice.toBytes()]: 6605248 +(test/Slice.t.sol) | Slice to bytes32 [bytes32 output = slice.toBytes32()]: 87 +(test/Storage.t.sol) | store 1 storage slot [Storage.store({ storagePointer: storagePointer, data: originalDataFirstSlot })]: 22514 +(test/Storage.t.sol) | store 34 bytes over 3 storage slots (with offset and safeTrail)) [Storage.store({ storagePointer: storagePointer, offset: 31, data: data1 })]: 23174 +(test/Storage.t.sol) | load 34 bytes over 3 storage slots (with offset and safeTrail)) [bytes memory data = Storage.load({ storagePointer: storagePointer, length: 34, offset: 31 })]: 1114 +(test/StoreCore.t.sol) | access non-existing record [bytes memory data1 = StoreCore.getRecord(table, key)]: 7088 +(test/StoreCore.t.sol) | access static field of non-existing record [bytes memory data2 = StoreCore.getField(table, key, 0)]: 2760 +(test/StoreCore.t.sol) | access dynamic field of non-existing record [bytes memory data3 = StoreCore.getField(table, key, 1)]: 3363 +(test/StoreCore.t.sol) | delete record (complex data, 3 slots) [StoreCore.deleteRecord(table, key)]: 10318 +(test/StoreCore.t.sol) | Check for existence of table (existent) [StoreCore.hasTable(table)]: 938 +(test/StoreCore.t.sol) | check for existence of table (non-existent) [StoreCore.hasTable(table2)]: 2963 +(test/StoreCore.t.sol) | register subscriber [StoreCore.registerStoreHook(table, subscriber)]: 69041 +(test/StoreCore.t.sol) | set record on table with subscriber [StoreCore.setRecord(table, key, data)]: 72422 +(test/StoreCore.t.sol) | set static field on table with subscriber [StoreCore.setField(table, key, 0, data)]: 28099 +(test/StoreCore.t.sol) | delete record on table with subscriber [StoreCore.deleteRecord(table, key)]: 22869 +(test/StoreCore.t.sol) | register subscriber [StoreCore.registerStoreHook(table, subscriber)]: 69041 +(test/StoreCore.t.sol) | set (dynamic) record on table with subscriber [StoreCore.setRecord(table, key, data)]: 165867 +(test/StoreCore.t.sol) | set (dynamic) field on table with subscriber [StoreCore.setField(table, key, 1, arrayDataBytes)]: 30942 +(test/StoreCore.t.sol) | delete (dynamic) record on table with subscriber [StoreCore.deleteRecord(table, key)]: 24517 +(test/StoreCore.t.sol) | StoreCore: register schema [StoreCore.registerSchema(table, schema)]: 30019 +(test/StoreCore.t.sol) | StoreCore: get schema (warm) [Schema loadedSchema = StoreCore.getSchema(table)]: 909 +(test/StoreCore.t.sol) | set complex record with dynamic data (4 slots) [StoreCore.setRecord(table, key, data)]: 106949 +(test/StoreCore.t.sol) | get complex record with dynamic data (4 slots) [bytes memory loadedData = StoreCore.getRecord(table, key)]: 6260 +(test/StoreCore.t.sol) | compare: Set complex record with dynamic data using native solidity [testStruct = _testStruct]: 116818 +(test/StoreCore.t.sol) | compare: Set complex record with dynamic data using abi.encode [testMapping[1234] = abi.encode(_testStruct)]: 267542 +(test/StoreCore.t.sol) | set dynamic length of dynamic index 0 [StoreCoreInternal._setDynamicDataLengthAtIndex(table, key, 0, 10)]: 23609 +(test/StoreCore.t.sol) | set dynamic length of dynamic index 1 [StoreCoreInternal._setDynamicDataLengthAtIndex(table, key, 1, 99)]: 1729 +(test/StoreCore.t.sol) | reduce dynamic length of dynamic index 0 [StoreCoreInternal._setDynamicDataLengthAtIndex(table, key, 0, 5)]: 1721 +(test/StoreCore.t.sol) | set static field (1 slot) [StoreCore.setField(table, key, 0, abi.encodePacked(firstDataBytes))]: 37332 +(test/StoreCore.t.sol) | get static field (1 slot) [bytes memory loadedData = StoreCore.getField(table, key, 0)]: 2765 +(test/StoreCore.t.sol) | set static field (overlap 2 slot) [StoreCore.setField(table, key, 1, abi.encodePacked(secondDataBytes))]: 32365 +(test/StoreCore.t.sol) | get static field (overlap 2 slot) [loadedData = StoreCore.getField(table, key, 1)]: 3672 +(test/StoreCore.t.sol) | set dynamic field (1 slot, first dynamic field) [StoreCore.setField(table, key, 2, thirdDataBytes)]: 54630 +(test/StoreCore.t.sol) | get dynamic field (1 slot, first dynamic field) [loadedData = StoreCore.getField(table, key, 2)]: 3588 +(test/StoreCore.t.sol) | set dynamic field (1 slot, second dynamic field) [StoreCore.setField(table, key, 3, fourthDataBytes)]: 34762 +(test/StoreCore.t.sol) | get dynamic field (1 slot, second dynamic field) [loadedData = StoreCore.getField(table, key, 3)]: 3605 +(test/StoreCore.t.sol) | set static record (1 slot) [StoreCore.setRecord(table, key, data)]: 36612 +(test/StoreCore.t.sol) | get static record (1 slot) [bytes memory loadedData = StoreCore.getRecord(table, key, schema)]: 1324 +(test/StoreCore.t.sol) | set static record (2 slots) [StoreCore.setRecord(table, key, data)]: 59182 +(test/StoreCore.t.sol) | get static record (2 slots) [bytes memory loadedData = StoreCore.getRecord(table, key, schema)]: 1574 +(test/StoreSwitch.t.sol) | check if delegatecall [isDelegate = StoreSwitch.isDelegateCall()]: 671 +(test/StoreSwitch.t.sol) | check if delegatecall [isDelegate = StoreSwitch.isDelegateCall()]: 627 +(test/Vector2.t.sol) | register Vector2 schema [Vector2.registerSchema()]: 31876 +(test/Vector2.t.sol) | set Vector2 record [Vector2.set({ key: key, x: 1, y: 2 })]: 37637 +(test/Vector2.t.sol) | get Vector2 record [Vector2Data memory vector = Vector2.get(key)]: 4865 \ No newline at end of file diff --git a/packages/store/git-install.sh b/packages/store/git-install.sh new file mode 100755 index 0000000000..b86de4f8c9 --- /dev/null +++ b/packages/store/git-install.sh @@ -0,0 +1,5 @@ +#! usr/bin/bash +giturl=https://github.com/$1.git +head=$(git ls-remote $giturl HEAD | head -n1 | awk '{print $1;}') +yarn add $giturl#$head +echo "Installed $giturl#$head" \ No newline at end of file diff --git a/packages/store/hardhat.config.ts b/packages/store/hardhat.config.ts new file mode 100644 index 0000000000..da00b249c6 --- /dev/null +++ b/packages/store/hardhat.config.ts @@ -0,0 +1,23 @@ +import { HardhatUserConfig } from "hardhat/config"; +import "./tasks/compile"; +import "solidity-docgen"; + +const config: HardhatUserConfig = { + paths: { + sources: "./src", + }, + solidity: { + version: "0.8.13", + settings: { + optimizer: { + enabled: true, + runs: 200, + }, + }, + }, + docgen: { + outputDir: "API", + }, +}; + +export default config; diff --git a/packages/store/index.ts b/packages/store/index.ts new file mode 100644 index 0000000000..cb0ff5c3b5 --- /dev/null +++ b/packages/store/index.ts @@ -0,0 +1 @@ +export {}; diff --git a/packages/store/index.yml b/packages/store/index.yml new file mode 100644 index 0000000000..67be39bdfd --- /dev/null +++ b/packages/store/index.yml @@ -0,0 +1,2 @@ +label: store +order: 50 diff --git a/packages/store/mud.config.mts b/packages/store/mud.config.mts new file mode 100644 index 0000000000..8669b01ce2 --- /dev/null +++ b/packages/store/mud.config.mts @@ -0,0 +1,35 @@ +import { StoreUserConfig } from "@latticexyz/cli"; +import { SchemaType } from "@latticexyz/schema-type"; + +const config: StoreUserConfig = { + storeImportPath: "../", + baseRoute: "/store_internals", + + tables: { + Hooks: SchemaType.ADDRESS_ARRAY, + Callbacks: SchemaType.BYTES24_ARRAY, + Mixed: { + schema: { + u32: SchemaType.UINT32, + u128: SchemaType.UINT128, + a32: SchemaType.UINT32_ARRAY, + s: SchemaType.STRING, + }, + }, + Route: { + schema: { + addr: SchemaType.ADDRESS, + selector: SchemaType.BYTES4, + executionMode: SchemaType.UINT8, + }, + }, + Vector2: { + schema: { + x: SchemaType.UINT32, + y: SchemaType.UINT32, + }, + }, + }, +}; + +export default config; diff --git a/packages/store/package.json b/packages/store/package.json new file mode 100644 index 0000000000..2a687b8618 --- /dev/null +++ b/packages/store/package.json @@ -0,0 +1,53 @@ +{ + "name": "@latticexyz/store", + "license": "MIT", + "version": "1.34.0", + "description": "Store", + "types": "./types/ethers-contracts/", + "repository": { + "type": "git", + "url": "https://github.com/latticexyz/mud.git", + "directory": "packages/store" + }, + "scripts": { + "prepare": "yarn build && chmod u+x git-install.sh", + "git:install": "bash git-install.sh", + "codegen": "ts-node ./scripts/codegen.ts", + "tablegen": "../cli/dist/mud.js tablegen", + "test": "yarn codegen && forge test", + "build": "yarn codegen && rimraf out && forge build && yarn dist && yarn types", + "dist": "rimraf abi && mkdir abi && cp -rf out/*.sol/*.json abi/ && yarn rimraf abi/*.metadata.json", + "types": "rimraf types && typechain --target=ethers-v5 abi/*.json", + "prettier": "prettier --write 'src/**/*.sol'", + "solhint": "solhint --config ./.solhint.json 'src/**/*.sol'", + "lint": "yarn prettier && yarn solhint", + "link": "yarn link", + "docs": "rimraf API && hardhat docgen && echo 'label: API\norder: 50' > API/index.yml", + "release": "npm publish || echo 'version already published'", + "gasreport": "mud gas-report --path test/** --save gas-report.txt" + }, + "devDependencies": { + "@latticexyz/cli": "^1.37.1", + "@latticexyz/schema-type": "^1.34.0", + "@typechain/ethers-v5": "^9.0.0", + "@types/ejs": "^3.1.1", + "@types/mocha": "^9.1.1", + "ds-test": "https://github.com/dapphub/ds-test.git#c9ce3f25bde29fc5eb9901842bf02850dfd2d084", + "ejs": "^3.1.8", + "forge-std": "https://github.com/foundry-rs/forge-std.git#b4f121555729b3afb3c5ffccb62ff4b6e2818fd3", + "hardhat": "^2.10.1", + "prettier": "^2.6.2", + "prettier-plugin-solidity": "^1.0.0-beta.19", + "rimraf": "^3.0.2", + "solhint": "^3.3.7", + "solidity-docgen": "^0.6.0-beta.22", + "ts-node": "^10.9.1", + "typechain": "^8.1.1", + "typedoc": "^0.23.10" + }, + "peerDependencies": { + "ds-test": "https://github.com/dapphub/ds-test.git#c9ce3f25bde29fc5eb9901842bf02850dfd2d084", + "forge-std": "https://github.com/foundry-rs/forge-std.git#b4f121555729b3afb3c5ffccb62ff4b6e2818fd3" + }, + "gitHead": "218f56893d268b0c5157a3e4c603b859e287a343" +} diff --git a/packages/store/remappings.txt b/packages/store/remappings.txt new file mode 100644 index 0000000000..aeeced7eb6 --- /dev/null +++ b/packages/store/remappings.txt @@ -0,0 +1,2 @@ +ds-test/=../../node_modules/ds-test/src/ +forge-std/=../../node_modules/forge-std/src/ diff --git a/packages/store/scripts/codegen.ts b/packages/store/scripts/codegen.ts new file mode 100644 index 0000000000..ec09fc3505 --- /dev/null +++ b/packages/store/scripts/codegen.ts @@ -0,0 +1,17 @@ +import { renderFile } from "ejs"; +import { writeFileSync } from "fs"; +import { extname, basename, join, dirname } from "path"; + +function renderEjsToSol(file: string, data: object) { + renderFile(file, data, {}, (err, str) => { + if (err) throw err; + const solFile = basename(file, extname(file)) + ".sol"; + const outFullPath = join(dirname(file), solFile); + writeFileSync(outFullPath, str); + console.log(`generated: ${outFullPath}`); + }); +} + +renderEjsToSol("src/tightcoder/DecodeSlice.ejs", {}); +renderEjsToSol("src/tightcoder/EncodeArray.ejs", {}); +renderEjsToSol("test/tightcoder/TightCoderAuto.t.ejs", {}); diff --git a/packages/store/src/Bytes.sol b/packages/store/src/Bytes.sol new file mode 100644 index 0000000000..85499f5d04 --- /dev/null +++ b/packages/store/src/Bytes.sol @@ -0,0 +1,407 @@ +// SPDX-License-Identifier: MIT +pragma solidity >=0.8.0; + +import { console } from "forge-std/console.sol"; + +library Bytes { + /** + * Converts a `bytes` memory blob to a single `bytes32` memory value, starting at the given byte offset. + */ + function toBytes32(bytes memory input, uint256 offset) internal pure returns (bytes32 output) { + assembly { + // input is a pointer to the start of the bytes array + // in memory, the first 32 bytes are the length of the array + // so we add 32 to the pointer to get to the start of the data + // then we add the start offset to get to the start of the desired word + output := mload(add(input, add(0x20, offset))) + } + } + + /************************************************************************ + * + * UTILS + * + ************************************************************************/ + + function equals(bytes memory a, bytes memory b) internal pure returns (bool) { + if (a.length != b.length) { + return false; + } + return keccak256(a) == keccak256(b); + } + + /************************************************************************ + * + * SET + * + ************************************************************************/ + + /** + * Overwrite a single byte of a `bytes32` value and return the new value. + */ + function setBytes1( + bytes32 input, + uint256 index, + bytes1 overwrite + ) internal pure returns (bytes32 output) { + bytes1 mask = 0xff; + assembly { + mask := shr(mul(8, index), mask) // create a mask by shifting 0xff right by index bytes + output := and(input, not(mask)) // zero out the byte at index + output := or(output, shr(mul(8, index), overwrite)) // set the byte at index + } + return output; + } + + /** + * Overwrite two bytes of a `bytes32` value and return the new value. + */ + function setBytes2( + bytes32 input, + uint256 index, + bytes2 overwrite + ) internal pure returns (bytes32 output) { + bytes2 mask = 0xffff; + assembly { + mask := shr(mul(8, index), mask) // create a mask by shifting 0xffff right by index bytes + output := and(input, not(mask)) // zero out the byte at index + output := or(output, shr(mul(8, index), overwrite)) // set the byte at index + } + return output; + } + + /** + * Overwrite four bytes of a `bytes32` value and return the new value. + */ + function setBytes4( + bytes32 input, + uint256 index, + bytes4 overwrite + ) internal pure returns (bytes32 output) { + bytes4 mask = 0xffffffff; + assembly { + mask := shr(mul(8, index), mask) // create a mask by shifting 0xffffffff right by index bytes + output := and(input, not(mask)) // zero out the byte at index + output := or(output, shr(mul(8, index), overwrite)) // set the byte at index + } + return output; + } + + /************************************************************************ + * + * SLICE + * + ************************************************************************/ + + /** Slice bytes to bytes1 without copying data */ + function slice1(bytes memory data, uint256 start) internal pure returns (bytes1) { + bytes1 output; + assembly { + output := mload(add(add(data, 0x20), start)) + } + return output; + } + + function slice1(bytes32 data, uint256 start) internal pure returns (bytes1) { + bytes1 output; + assembly { + output := shl(mul(8, start), data) + } + return output; + } + + /** Slice bytes to bytes2 without copying data */ + function slice2(bytes memory data, uint256 start) internal pure returns (bytes2) { + bytes2 output; + assembly { + output := mload(add(add(data, 0x20), start)) + } + return output; + } + + function slice2(bytes32 data, uint256 start) internal pure returns (bytes2) { + bytes2 output; + assembly { + output := shl(mul(8, start), data) + } + return output; + } + + /** Slice bytes to bytes3 without copying data */ + function slice3(bytes memory data, uint256 start) internal pure returns (bytes3) { + bytes3 output; + assembly { + output := mload(add(add(data, 0x20), start)) + } + return output; + } + + /** Slice bytes to bytes4 without copying data */ + function slice4(bytes memory data, uint256 start) internal pure returns (bytes4) { + bytes4 output; + assembly { + output := mload(add(add(data, 0x20), start)) + } + return output; + } + + function slice4(bytes32 data, uint256 start) internal pure returns (bytes4) { + bytes2 output; + assembly { + output := shl(mul(8, start), data) + } + return output; + } + + /** Slice bytes to bytes5 without copying data */ + function slice5(bytes memory data, uint256 start) internal pure returns (bytes5) { + bytes5 output; + assembly { + output := mload(add(add(data, 0x20), start)) + } + return output; + } + + /** Slice bytes to bytes6 without copying data */ + function slice6(bytes memory data, uint256 start) internal pure returns (bytes6) { + bytes6 output; + assembly { + output := mload(add(add(data, 0x20), start)) + } + return output; + } + + /** Slice bytes to bytes7 without copying data */ + function slice7(bytes memory data, uint256 start) internal pure returns (bytes7) { + bytes7 output; + assembly { + output := mload(add(add(data, 0x20), start)) + } + return output; + } + + /** Slice bytes to bytes8 without copying data */ + function slice8(bytes memory data, uint256 start) internal pure returns (bytes8) { + bytes8 output; + assembly { + output := mload(add(add(data, 0x20), start)) + } + return output; + } + + /** Slice bytes to bytes9 without copying data */ + function slice9(bytes memory data, uint256 start) internal pure returns (bytes9) { + bytes9 output; + assembly { + output := mload(add(add(data, 0x20), start)) + } + return output; + } + + /** Slice bytes to bytes10 without copying data */ + function slice10(bytes memory data, uint256 start) internal pure returns (bytes10) { + bytes10 output; + assembly { + output := mload(add(add(data, 0x20), start)) + } + return output; + } + + /** Slice bytes to bytes11 without copying data */ + function slice11(bytes memory data, uint256 start) internal pure returns (bytes11) { + bytes11 output; + assembly { + output := mload(add(add(data, 0x20), start)) + } + return output; + } + + /** Slice bytes to bytes12 without copying data */ + function slice12(bytes memory data, uint256 start) internal pure returns (bytes12) { + bytes12 output; + assembly { + output := mload(add(add(data, 0x20), start)) + } + return output; + } + + /** Slice bytes to bytes13 without copying data */ + function slice13(bytes memory data, uint256 start) internal pure returns (bytes13) { + bytes13 output; + assembly { + output := mload(add(add(data, 0x20), start)) + } + return output; + } + + /** Slice bytes to bytes14 without copying data */ + function slice14(bytes memory data, uint256 start) internal pure returns (bytes14) { + bytes14 output; + assembly { + output := mload(add(add(data, 0x20), start)) + } + return output; + } + + /** Slice bytes to bytes15 without copying data */ + function slice15(bytes memory data, uint256 start) internal pure returns (bytes15) { + bytes15 output; + assembly { + output := mload(add(add(data, 0x20), start)) + } + return output; + } + + /** Slice bytes to bytes16 without copying data */ + function slice16(bytes memory data, uint256 start) internal pure returns (bytes16) { + bytes16 output; + assembly { + output := mload(add(add(data, 0x20), start)) + } + return output; + } + + /** Slice bytes to bytes17 without copying data */ + function slice17(bytes memory data, uint256 start) internal pure returns (bytes17) { + bytes17 output; + assembly { + output := mload(add(add(data, 0x20), start)) + } + return output; + } + + /** Slice bytes to bytes18 without copying data */ + function slice18(bytes memory data, uint256 start) internal pure returns (bytes18) { + bytes18 output; + assembly { + output := mload(add(add(data, 0x20), start)) + } + return output; + } + + /** Slice bytes to bytes19 without copying data */ + function slice19(bytes memory data, uint256 start) internal pure returns (bytes19) { + bytes19 output; + assembly { + output := mload(add(add(data, 0x20), start)) + } + return output; + } + + /** Slice bytes to bytes20 without copying data */ + function slice20(bytes memory data, uint256 start) internal pure returns (bytes20) { + bytes20 output; + assembly { + output := mload(add(add(data, 0x20), start)) + } + return output; + } + + /** Slice bytes to bytes21 without copying data */ + function slice21(bytes memory data, uint256 start) internal pure returns (bytes21) { + bytes21 output; + assembly { + output := mload(add(add(data, 0x20), start)) + } + return output; + } + + /** Slice bytes to bytes22 without copying data */ + function slice22(bytes memory data, uint256 start) internal pure returns (bytes22) { + bytes22 output; + assembly { + output := mload(add(add(data, 0x20), start)) + } + return output; + } + + /** Slice bytes to bytes23 without copying data */ + function slice23(bytes memory data, uint256 start) internal pure returns (bytes23) { + bytes23 output; + assembly { + output := mload(add(add(data, 0x20), start)) + } + return output; + } + + /** Slice bytes to bytes24 without copying data */ + function slice24(bytes memory data, uint256 start) internal pure returns (bytes24) { + bytes24 output; + assembly { + output := mload(add(add(data, 0x20), start)) + } + return output; + } + + /** Slice bytes to bytes25 without copying data */ + function slice25(bytes memory data, uint256 start) internal pure returns (bytes25) { + bytes25 output; + assembly { + output := mload(add(add(data, 0x20), start)) + } + return output; + } + + /** Slice bytes to bytes26 without copying data */ + function slice26(bytes memory data, uint256 start) internal pure returns (bytes26) { + bytes26 output; + assembly { + output := mload(add(add(data, 0x20), start)) + } + return output; + } + + /** Slice bytes to bytes27 without copying data */ + function slice27(bytes memory data, uint256 start) internal pure returns (bytes27) { + bytes27 output; + assembly { + output := mload(add(add(data, 0x20), start)) + } + return output; + } + + /** Slice bytes to bytes28 without copying data */ + function slice28(bytes memory data, uint256 start) internal pure returns (bytes28) { + bytes28 output; + assembly { + output := mload(add(add(data, 0x20), start)) + } + return output; + } + + /** Slice bytes to bytes29 without copying data */ + function slice29(bytes memory data, uint256 start) internal pure returns (bytes29) { + bytes29 output; + assembly { + output := mload(add(add(data, 0x20), start)) + } + return output; + } + + /** Slice bytes to bytes30 without copying data */ + function slice30(bytes memory data, uint256 start) internal pure returns (bytes30) { + bytes30 output; + assembly { + output := mload(add(add(data, 0x20), start)) + } + return output; + } + + /** Slice bytes to bytes31 without copying data */ + function slice31(bytes memory data, uint256 start) internal pure returns (bytes31) { + bytes31 output; + assembly { + output := mload(add(add(data, 0x20), start)) + } + return output; + } + + /** Slice bytes to bytes32 without copying data */ + function slice32(bytes memory data, uint256 start) internal pure returns (bytes32) { + bytes32 output; + assembly { + output := mload(add(add(data, 0x20), start)) + } + return output; + } +} diff --git a/packages/store/src/IStore.sol b/packages/store/src/IStore.sol new file mode 100644 index 0000000000..bc1e46a725 --- /dev/null +++ b/packages/store/src/IStore.sol @@ -0,0 +1,75 @@ +// SPDX-License-Identifier: MIT +pragma solidity >=0.8.0; + +import { SchemaType } from "./Types.sol"; +import { Schema } from "./Schema.sol"; + +interface IStore { + event StoreSetRecord(uint256 table, bytes32[] key, bytes data); + event StoreSetField(uint256 table, bytes32[] key, uint8 schemaIndex, bytes data); + event StoreDeleteRecord(uint256 table, bytes32[] key); + + function registerSchema(uint256 table, Schema schema) external; + + function getSchema(uint256 table) external view returns (Schema schema); + + // Set full record (including full dynamic data) + function setRecord( + uint256 table, + bytes32[] calldata key, + bytes calldata data + ) external; + + // Set partial data at schema index + function setField( + uint256 table, + bytes32[] calldata key, + uint8 schemaIndex, + bytes calldata data + ) external; + + // Register hooks to be called when a record or field is set or deleted + function registerStoreHook(uint256 table, IStoreHook hooks) external; + + // Set full record (including full dynamic data) + function deleteRecord(uint256 table, bytes32[] memory key) external; + + // Get full record (including full array, load table schema from storage) + function getRecord(uint256 table, bytes32[] memory key) external view returns (bytes memory data); + + // Get full record (including full array) + function getRecord( + uint256 table, + bytes32[] calldata key, + Schema schema + ) external view returns (bytes memory data); + + // Get partial data at schema index + function getField( + uint256 table, + bytes32[] calldata key, + uint8 schemaIndex + ) external view returns (bytes memory data); + + // If this function exists on the contract, it is a store + // TODO: benchmark this vs. using a known storage slot to determine whether a contract is a Store + // (see https://github.com/latticexyz/mud/issues/444) + function isStore() external view; +} + +interface IStoreHook { + function onSetRecord( + uint256 table, + bytes32[] memory key, + bytes memory data + ) external; + + function onSetField( + uint256 table, + bytes32[] memory key, + uint8 schemaIndex, + bytes memory data + ) external; + + function onDeleteRecord(uint256 table, bytes32[] memory key) external; +} diff --git a/packages/store/src/Memory.sol b/packages/store/src/Memory.sol new file mode 100644 index 0000000000..0938f69d86 --- /dev/null +++ b/packages/store/src/Memory.sol @@ -0,0 +1,70 @@ +// SPDX-License-Identifier: MIT +pragma solidity >=0.8.0; + +import { Utils } from "./Utils.sol"; + +library Memory { + function load(uint256 memoryPointer) internal pure returns (bytes32 data) { + assembly { + data := mload(memoryPointer) + } + } + + function load(uint256 memoryPointer, uint256 offset) internal pure returns (bytes32 data) { + assembly { + data := mload(add(memoryPointer, offset)) + } + } + + function dataPointer(bytes memory data) internal pure returns (uint256 memoryPointer) { + assembly { + memoryPointer := add(data, 0x20) + } + } + + function lengthPointer(bytes memory data) internal pure returns (uint256 memoryPointer) { + assembly { + memoryPointer := data + } + } + + function store(uint256 memoryPointer, bytes32 value) internal pure { + assembly { + mstore(memoryPointer, value) + } + } + + function copy( + uint256 fromPointer, + uint256 toPointer, + uint256 length + ) internal view { + if (length > 32) { + assembly { + pop( + staticcall( + gas(), // gas (unused is returned) + 0x04, // identity precompile address + fromPointer, // argsOffset + length, // argsSize: byte size to copy + toPointer, // retOffset + length // retSize: byte size to copy + ) + ) + } + } else { + uint256 mask = Utils.leftMask(length); + assembly { + mstore( + toPointer, + or( + // Store the left part + and(mload(fromPointer), mask), + // Preserve the right part + and(mload(toPointer), not(mask)) + ) + ) + } + } + } +} diff --git a/packages/store/src/PackedCounter.sol b/packages/store/src/PackedCounter.sol new file mode 100644 index 0000000000..cf8bd7c37b --- /dev/null +++ b/packages/store/src/PackedCounter.sol @@ -0,0 +1,142 @@ +// SPDX-License-Identifier: MIT +pragma solidity >=0.8.0; + +import { Bytes } from "./Bytes.sol"; + +// - 4 bytes accumulated counter +// - 2 bytes length per counter +type PackedCounter is bytes32; + +using PackedCounterLib for PackedCounter global; + +library PackedCounterLib { + /************************************************************************ + * + * STATIC FUNCTIONS + * + ************************************************************************/ + + /** + * Encode the given counters into a single packed counter + * - 4 bytes for the accumulated length + * - 2 bytes per counter -> max 14 counters + */ + function pack(uint16[] memory counters) internal pure returns (PackedCounter) { + bytes32 packedCounter; + uint32 accumulator; + + // Compute the sum of all counters + // and pack the counters + for (uint256 i; i < counters.length; ) { + packedCounter = Bytes.setBytes2(packedCounter, 4 + 2 * i, bytes2(counters[i])); + accumulator += counters[i]; + unchecked { + i++; + } + } + + // Store total length + packedCounter = Bytes.setBytes4(packedCounter, 0, bytes4(accumulator)); + + return PackedCounter.wrap(packedCounter); + } + + // Overrides for pack function + function pack(uint16 a) internal pure returns (PackedCounter) { + uint16[] memory counters = new uint16[](1); + counters[0] = a; + return pack(counters); + } + + function pack(uint16 a, uint16 b) internal pure returns (PackedCounter) { + uint16[] memory counters = new uint16[](2); + counters[0] = a; + counters[1] = b; + return pack(counters); + } + + function pack( + uint16 a, + uint16 b, + uint16 c + ) internal pure returns (PackedCounter) { + uint16[] memory counters = new uint16[](3); + counters[0] = a; + counters[1] = b; + counters[2] = c; + return pack(counters); + } + + function pack( + uint16 a, + uint16 b, + uint16 c, + uint16 d + ) internal pure returns (PackedCounter) { + uint16[] memory counters = new uint16[](4); + counters[0] = a; + counters[1] = b; + counters[2] = c; + counters[3] = d; + return pack(counters); + } + + /************************************************************************ + * + * INSTANCE FUNCTIONS + * + ************************************************************************/ + + /** + * Decode the accumulated counter + * (first four bytes of packed counter) + */ + function total(PackedCounter packedCounter) internal pure returns (uint256) { + return uint256(uint32(bytes4(PackedCounter.unwrap(packedCounter)))); + } + + /** + * Decode the counter at the given index + * (two bytes per counter after the first four bytes) + */ + function atIndex(PackedCounter packedCounter, uint256 index) internal pure returns (uint256) { + uint256 offset = 4 + index * 2; + return uint256(uint16(Bytes.slice2(PackedCounter.unwrap(packedCounter), offset))); + } + + /** + * Set a counter at the given index, return the new packed counter + */ + function setAtIndex( + PackedCounter packedCounter, + uint256 index, + uint256 newValueAtIndex + ) internal pure returns (PackedCounter) { + bytes32 rawPackedCounter = PackedCounter.unwrap(packedCounter); + + // Get current lengths (total and at index) + uint256 accumulator = total(packedCounter); + uint256 currentValueAtIndex = atIndex(packedCounter, uint8(index)); + + // Compute the difference and update the total value + if (newValueAtIndex >= currentValueAtIndex) { + accumulator += newValueAtIndex - currentValueAtIndex; + } else { + accumulator -= currentValueAtIndex - newValueAtIndex; + } + + // Set the new accumulated value and value at index + uint256 offset = 4 + index * 2; // (4 bytes total length, 2 bytes per dynamic schema) + rawPackedCounter = Bytes.setBytes4(rawPackedCounter, 0, bytes4(uint32(accumulator))); + rawPackedCounter = Bytes.setBytes2(rawPackedCounter, offset, bytes2(uint16(newValueAtIndex))); + + return PackedCounter.wrap(rawPackedCounter); + } + + /* + * Unwrap the packed counter + */ + function unwrap(PackedCounter packedCounter) internal pure returns (bytes32) { + return PackedCounter.unwrap(packedCounter); + } +} diff --git a/packages/store/src/Schema.sol b/packages/store/src/Schema.sol new file mode 100644 index 0000000000..20b9961c8b --- /dev/null +++ b/packages/store/src/Schema.sol @@ -0,0 +1,227 @@ +// SPDX-License-Identifier: MIT +pragma solidity >=0.8.0; + +import { SchemaType } from "./Types.sol"; +import { Bytes } from "./Bytes.sol"; + +// - 2 bytes static length of the schema +// - 1 byte for number of static size fields +// - 1 byte for number of dynamic size fields +// - 28 bytes for 28 schema types (max 14 dynamic fields to we can pack their lengths into 1 word) +type Schema is bytes32; + +using SchemaLib for Schema global; + +library SchemaLib { + error SchemaLib_InvalidLength(uint256 length); + error SchemaLib_StaticTypeAfterDynamicType(); + + /************************************************************************ + * + * STATIC FUNCTIONS + * + ************************************************************************/ + + /** + * Encode the given schema into a single bytes32 + */ + function encode(SchemaType[] memory _schema) internal pure returns (Schema) { + if (_schema.length > 28) revert SchemaLib_InvalidLength(_schema.length); + bytes32 schema; + uint16 length; + uint8 staticFields; + + // Compute the length of the schema and the number of static fields + // and store the schema types in the encoded schema + bool hasDynamicFields; + for (uint256 i = 0; i < _schema.length; ) { + uint16 staticByteLength = uint16(_schema[i].getStaticByteLength()); + + // Increase the static field count if the field is static + if (staticByteLength > 0) { + // Revert if we have seen a dynamic field before, but now we see a static field + if (hasDynamicFields) revert SchemaLib_StaticTypeAfterDynamicType(); + staticFields++; + } else { + // Flag that we have seen a dynamic field + hasDynamicFields = true; + } + + length += staticByteLength; + schema = Bytes.setBytes1(schema, i + 4, bytes1(uint8(_schema[i]))); + unchecked { + i++; + } + } + + // Require max 14 dynamic fields + uint8 dynamicFields = uint8(_schema.length) - staticFields; + if (dynamicFields > 14) revert SchemaLib_InvalidLength(dynamicFields); + + // Store total static length, and number of static and dynamic fields + schema = Bytes.setBytes2(schema, 0, (bytes2(length))); // 2 length bytes + schema = Bytes.setBytes1(schema, 2, bytes1(staticFields)); // number of static fields + schema = Bytes.setBytes1(schema, 3, bytes1(dynamicFields)); // number of dynamic fields + + return Schema.wrap(schema); + } + + // Overrides for encode functions + function encode(SchemaType a) internal pure returns (Schema) { + SchemaType[] memory schema = new SchemaType[](1); + schema[0] = a; + return encode(schema); + } + + function encode(SchemaType a, SchemaType b) internal pure returns (Schema) { + SchemaType[] memory schema = new SchemaType[](2); + schema[0] = a; + schema[1] = b; + return encode(schema); + } + + function encode( + SchemaType a, + SchemaType b, + SchemaType c + ) internal pure returns (Schema) { + SchemaType[] memory schema = new SchemaType[](3); + schema[0] = a; + schema[1] = b; + schema[2] = c; + return encode(schema); + } + + function encode( + SchemaType a, + SchemaType b, + SchemaType c, + SchemaType d + ) internal pure returns (Schema) { + SchemaType[] memory schema = new SchemaType[](4); + schema[0] = a; + schema[1] = b; + schema[2] = c; + schema[3] = d; + return encode(schema); + } + + function encode( + SchemaType a, + SchemaType b, + SchemaType c, + SchemaType d, + SchemaType e + ) internal pure returns (Schema) { + SchemaType[] memory schema = new SchemaType[](5); + schema[0] = a; + schema[1] = b; + schema[2] = c; + schema[3] = d; + schema[4] = e; + return encode(schema); + } + + function encode( + SchemaType a, + SchemaType b, + SchemaType c, + SchemaType d, + SchemaType e, + SchemaType f + ) internal pure returns (Schema) { + SchemaType[] memory schema = new SchemaType[](6); + schema[0] = a; + schema[1] = b; + schema[2] = c; + schema[3] = d; + schema[4] = e; + schema[5] = f; + return encode(schema); + } + + /************************************************************************ + * + * INSTANCE FUNCTIONS + * + ************************************************************************/ + + /** + * Get the length of the static data for the given schema + */ + function staticDataLength(Schema schema) internal pure returns (uint256) { + return uint256(uint16(bytes2(Schema.unwrap(schema)))); + } + + /** + * Get the type of the data for the given schema at the given index + */ + function atIndex(Schema schema, uint256 index) internal pure returns (SchemaType) { + return SchemaType(uint8(Bytes.slice1(Schema.unwrap(schema), index + 4))); + } + + /** + * Get the number of dynamic length fields for the given schema + */ + function numDynamicFields(Schema schema) internal pure returns (uint8) { + return uint8(Bytes.slice1(Schema.unwrap(schema), 3)); + } + + /** + * Get the number of static fields for the given schema + */ + function numStaticFields(Schema schema) internal pure returns (uint8) { + return uint8(Bytes.slice1(Schema.unwrap(schema), 2)); + } + + /** + * Check if the given schema is empty + */ + function isEmpty(Schema schema) internal pure returns (bool) { + return Schema.unwrap(schema) == bytes32(0); + } + + function validate(Schema schema) internal pure { + // Schema must not be empty + if (schema.isEmpty()) revert SchemaLib_InvalidLength(0); + + // Schema must have no more than 14 dynamic fields + uint256 _numDynamicFields = schema.numDynamicFields(); + if (_numDynamicFields > 14) revert SchemaLib_InvalidLength(_numDynamicFields); + + uint256 _numStaticFields = schema.numStaticFields(); + // Schema must not have more than 28 fields in total + if (_numStaticFields + _numDynamicFields > 28) revert SchemaLib_InvalidLength(_numStaticFields + _numDynamicFields); + + // No static field can be after a dynamic field + uint256 countStaticFields; + uint256 countDynamicFields; + for (uint256 i; i < _numStaticFields + _numDynamicFields; ) { + if (schema.atIndex(i).getStaticByteLength() > 0) { + // Static field in dynamic part + if (i >= _numStaticFields) revert SchemaLib_StaticTypeAfterDynamicType(); + countStaticFields++; + } else { + // Dynamic field in static part + if (i < _numStaticFields) revert SchemaLib_StaticTypeAfterDynamicType(); + countDynamicFields++; + } + unchecked { + i++; + } + } + + // Number of static fields must match + if (countStaticFields != _numStaticFields) revert SchemaLib_InvalidLength(countStaticFields); + + // Number of dynamic fields must match + if (countDynamicFields != _numDynamicFields) revert SchemaLib_InvalidLength(countDynamicFields); + } + + /** + * Unwrap the schema + */ + function unwrap(Schema schema) internal pure returns (bytes32) { + return Schema.unwrap(schema); + } +} diff --git a/packages/store/src/Slice.sol b/packages/store/src/Slice.sol new file mode 100644 index 0000000000..4841933be5 --- /dev/null +++ b/packages/store/src/Slice.sol @@ -0,0 +1,115 @@ +// SPDX-License-Identifier: MIT +pragma solidity >=0.8.0; + +import { SchemaType } from "./Types.sol"; +import { Memory } from "./Memory.sol"; +import { DecodeSlice } from "./tightcoder/DecodeSlice.sol"; + +// Acknowledgements: +// Based on @dk1a's Slice.sol library (https://github.com/dk1a/solidity-stringutils/blob/main/src/Slice.sol) + +// First 16 bytes are the pointer to the data, followed by 16 bytes of data length. +type Slice is uint256; + +using SliceInstance for Slice global; +using DecodeSlice for Slice global; + +/** + * @title Static functions for Slice + */ +library SliceLib { + error Slice_OutOfBounds(bytes data, uint256 start, uint256 end); + + uint256 constant MASK_LEN = uint256(type(uint128).max); + uint256 constant MASK_PTR = uint256(type(uint128).max) << 128; + + /** + * @dev Converts a bytes array to a slice (without copying data) + */ + function fromBytes(bytes memory data) internal pure returns (Slice) { + uint256 _pointer; + assembly { + _pointer := add(data, 0x20) // pointer to first data byte + } + + // Pointer is stored in upper 128 bits, length is stored in lower 128 bits + return Slice.wrap((_pointer << 128) | (data.length & MASK_LEN)); + } + + /** + * @dev Subslice a bytes array using the given start index until the end of the array (without copying data) + */ + function getSubslice(bytes memory data, uint256 start) internal pure returns (Slice) { + return getSubslice(data, start, data.length); + } + + /** + * @dev Subslice a bytes array using the given indexes (without copying data) + * The start index is inclusive, the end index is exclusive + */ + function getSubslice( + bytes memory data, + uint256 start, + uint256 end + ) internal pure returns (Slice) { + // TODO this check helps catch bugs and can eventually be removed + if (!(start <= end && end <= data.length)) revert Slice_OutOfBounds(data, start, end); + + uint256 _pointer; + assembly { + _pointer := add(data, 0x20) // pointer to first data byte + } + + _pointer += start; + uint256 _len = end - start; + + // Pointer is stored in upper 128 bits, length is stored in lower 128 bits + return Slice.wrap((_pointer << 128) | (_len & MASK_LEN)); + } +} + +/** + * @title Instance functions for Slice + */ +library SliceInstance { + /** + * @dev Returns the pointer to the start of a slice + */ + function pointer(Slice self) internal pure returns (uint256) { + return Slice.unwrap(self) >> 128; + } + + /** + * @dev Returns the slice length in bytes + */ + function length(Slice self) internal pure returns (uint256) { + return Slice.unwrap(self) & SliceLib.MASK_LEN; + } + + /** + * @dev Copies the slice to a new bytes array + * The slice will NOT point to the new bytes array + */ + function toBytes(Slice self) internal view returns (bytes memory data) { + uint256 fromPointer = pointer(self); + uint256 _length = length(self); + + // Allocate a new bytes array and get the pointer to it + data = new bytes(_length); + uint256 toPointer; + assembly { + toPointer := add(data, 32) + } + // Copy the slice contents to the array + Memory.copy(fromPointer, toPointer, _length); + } + + function toBytes32(Slice self) internal pure returns (bytes32 result) { + uint256 memoryPointer = self.pointer(); + /// @solidity memory-safe-assembly + assembly { + result := mload(memoryPointer) + } + return result; + } +} diff --git a/packages/store/src/Storage.sol b/packages/store/src/Storage.sol new file mode 100644 index 0000000000..ea92a4b8a9 --- /dev/null +++ b/packages/store/src/Storage.sol @@ -0,0 +1,232 @@ +// SPDX-License-Identifier: MIT +pragma solidity >=0.8.0; + +import { console } from "forge-std/console.sol"; +import { Utils } from "./Utils.sol"; + +/** + * TODO Probably not fully optimized + * (see https://github.com/latticexyz/mud/issues/444) + */ +library Storage { + function store(uint256 storagePointer, bytes memory data) internal { + store(storagePointer, 0, data); + } + + function store(uint256 storagePointer, bytes32 data) internal { + assembly { + sstore(storagePointer, data) + } + } + + function store( + uint256 storagePointer, + uint256 offset, + bytes memory data + ) internal { + uint256 memoryPointer; + assembly { + memoryPointer := add(data, 0x20) + } + store(storagePointer, offset, memoryPointer, data.length); + } + + /** + * @notice Stores raw bytes to storage at the given storagePointer and offset (keeping the rest of the word intact) + */ + function store( + uint256 storagePointer, + uint256 offset, + uint256 memoryPointer, + uint256 length + ) internal { + // Support offsets that are greater than 32 bytes by incrementing the storagePointer and decrementing the offset + unchecked { + storagePointer += offset / 32; + offset %= 32; + } + + // For the first word, if there is an offset, apply a mask to beginning + if (offset > 0) { + // Get the word's remaining length after the offset + uint256 wordRemainder; + // (safe because of `offset %= 32` at the start) + unchecked { + wordRemainder = 32 - offset; + } + + uint256 mask = Utils.leftMask(length); + /// @solidity memory-safe-assembly + assembly { + // Load data from memory and offset it to match storage + let bitOffset := mul(offset, 8) + mask := shr(bitOffset, mask) + let offsetData := shr(bitOffset, mload(memoryPointer)) + + sstore( + storagePointer, + or( + // Store the middle part + and(offsetData, mask), + // Preserve the surrounding parts + and(sload(storagePointer), not(mask)) + ) + ) + } + // Return if done + if (length <= wordRemainder) return; + + // Advance pointers + storagePointer += 1; + // (safe because of `length <= prefixLength` earlier) + unchecked { + memoryPointer += wordRemainder; + length -= wordRemainder; + } + } + + // Store full words + while (length >= 32) { + /// @solidity memory-safe-assembly + assembly { + sstore(storagePointer, mload(memoryPointer)) + } + storagePointer += 1; + // (safe unless length is improbably large) + unchecked { + memoryPointer += 32; + length -= 32; + } + } + + // For the last partial word, apply a mask to the end + if (length > 0) { + uint256 mask = Utils.leftMask(length); + /// @solidity memory-safe-assembly + assembly { + sstore( + storagePointer, + or( + // store the left part + and(mload(memoryPointer), mask), + // preserve the right part + and(sload(storagePointer), not(mask)) + ) + ) + } + } + } + + function load(uint256 storagePointer) internal view returns (bytes32 word) { + assembly { + word := sload(storagePointer) + } + } + + function load(uint256 storagePointer, uint256 length) internal view returns (bytes memory) { + return load(storagePointer, length, 0); + } + + /** + * @notice Load raw bytes from storage at the given storagePointer, offset, and length + */ + function load( + uint256 storagePointer, + uint256 length, + uint256 offset + ) internal view returns (bytes memory result) { + // TODO this will probably use less gas via manual memory allocation + // (see https://github.com/latticexyz/mud/issues/444) + result = new bytes(length); + uint256 memoryPointer; + assembly { + memoryPointer := add(result, 0x20) + } + load(storagePointer, length, offset, memoryPointer); + return result; + } + + /** + * @notice Append raw bytes from storage at the given storagePointer, offset, and length to the given memoryPointer + */ + function load( + uint256 storagePointer, + uint256 length, + uint256 offset, + uint256 memoryPointer + ) internal view { + // Support offsets that are greater than 32 bytes by incrementing the storagePointer and decrementing the offset + unchecked { + storagePointer += offset / 32; + offset %= 32; + } + + // For the first word, if there is an offset, apply a mask to beginning + if (offset > 0) { + // Get the word's remaining length after the offset + uint256 wordRemainder; + // (safe because of `offset %= 32` at the start) + unchecked { + wordRemainder = 32 - offset; + } + + uint256 mask = Utils.leftMask(wordRemainder); + /// @solidity memory-safe-assembly + assembly { + // Load data from storage and offset it to match memory + let offsetData := shl(mul(offset, 8), sload(storagePointer)) + + mstore( + memoryPointer, + or( + // store the middle part + and(offsetData, mask), + // preserve the surrounding parts + and(mload(memoryPointer), not(mask)) + ) + ) + } + // Return if done + if (length <= wordRemainder) return; + + // Advance pointers + storagePointer += 1; + // (safe because of `length <= prefixLength` earlier) + unchecked { + memoryPointer += wordRemainder; + length -= wordRemainder; + } + } + + // Load full words + while (length >= 32) { + /// @solidity memory-safe-assembly + assembly { + mstore(memoryPointer, sload(storagePointer)) + } + storagePointer += 1; + // (safe unless length is improbably large) + unchecked { + memoryPointer += 32; + length -= 32; + } + } + + // For the last partial word, apply a mask to the end + if (length > 0) { + uint256 mask = Utils.leftMask(length); + /// @solidity memory-safe-assembly + assembly { + mstore( + memoryPointer, + or( + // store the left part + and(sload(storagePointer), mask), + // preserve the right part + and(mload(memoryPointer), not(mask)) + ) + ) + } + } + } +} diff --git a/packages/store/src/Store.sol b/packages/store/src/Store.sol new file mode 100644 index 0000000000..35e278f6cd --- /dev/null +++ b/packages/store/src/Store.sol @@ -0,0 +1,42 @@ +// SPDX-License-Identifier: MIT +pragma solidity >=0.8.0; + +import { SchemaType } from "./Types.sol"; +import { IStore, IStoreHook } from "./IStore.sol"; +import { StoreCore } from "./StoreCore.sol"; +import { Schema } from "./Schema.sol"; + +abstract contract Store is IStore { + constructor() { + StoreCore.initialize(); + } + + function getSchema(uint256 table) public view virtual returns (Schema schema) { + schema = StoreCore.getSchema(table); + } + + // Get full record (static and dynamic data, load schema from storage) + function getRecord(uint256 table, bytes32[] calldata key) public view virtual returns (bytes memory data) { + data = StoreCore.getRecord(table, key); + } + + // Get full record (static and dynamic data) + function getRecord( + uint256 table, + bytes32[] calldata key, + Schema schema + ) public view virtual returns (bytes memory data) { + data = StoreCore.getRecord(table, key, schema); + } + + // Get partial data at schema index + function getField( + uint256 table, + bytes32[] calldata key, + uint8 schemaIndex + ) public view virtual returns (bytes memory data) { + data = StoreCore.getField(table, key, schemaIndex); + } + + function isStore() public view {} +} diff --git a/packages/store/src/StoreCore.sol b/packages/store/src/StoreCore.sol new file mode 100644 index 0000000000..47c0a37bd5 --- /dev/null +++ b/packages/store/src/StoreCore.sol @@ -0,0 +1,562 @@ +// SPDX-License-Identifier: MIT +pragma solidity >=0.8.0; +import { Bytes } from "./Bytes.sol"; +import { SchemaType } from "./Types.sol"; +import { Storage } from "./Storage.sol"; +import { Memory } from "./Memory.sol"; +import { console } from "forge-std/console.sol"; +import { Schema, SchemaLib } from "./Schema.sol"; +import { PackedCounter } from "./PackedCounter.sol"; +import { Slice } from "./Slice.sol"; +import { Hooks, HooksTableId } from "./tables/Hooks.sol"; +import { IStoreHook } from "./IStore.sol"; + +library StoreCore { + // note: the preimage of the tuple of keys used to index is part of the event, so it can be used by indexers + event StoreSetRecord(uint256 table, bytes32[] key, bytes data); + event StoreSetField(uint256 table, bytes32[] key, uint8 schemaIndex, bytes data); + event StoreDeleteRecord(uint256 table, bytes32[] key); + + error StoreCore_TableAlreadyExists(uint256 table); + error StoreCore_TableNotFound(uint256 table); + error StoreCore_NotImplemented(); + error StoreCore_InvalidDataLength(uint256 expected, uint256 received); + error StoreCore_NoDynamicField(); + + /** + * Initialize internal tables. + * Consumers must call this function in their constructor. + * TODO: should we turn the schema table into a "proper table" and register it here? + * (see https://github.com/latticexyz/mud/issues/444) + */ + function initialize() internal { + registerSchema(StoreCoreInternal.SCHEMA_TABLE, SchemaLib.encode(SchemaType.BYTES32)); + registerSchema(HooksTableId, Hooks.getSchema()); + } + + /************************************************************************ + * + * SCHEMA + * + ************************************************************************/ + + /** + * Check if the given table exists + */ + function hasTable(uint256 table) internal view returns (bool) { + return !getSchema(table).isEmpty(); + } + + /** + * Register a new table schema + */ + function registerSchema(uint256 table, Schema schema) internal { + // Verify the schema is valid + schema.validate(); + + // Verify the schema doesn't exist yet + if (hasTable(table)) { + revert StoreCore_TableAlreadyExists(table); + } + + // Register the schema + StoreCoreInternal._registerSchemaUnchecked(table, schema); + } + + /** + * Get the schema for the given table + */ + function getSchema(uint256 table) internal view returns (Schema schema) { + return StoreCoreInternal._getSchema(table); + } + + /************************************************************************ + * + * REGISTER HOOKS + * + ************************************************************************/ + + /* + * Register hooks to be called when a record or field is set or deleted + */ + function registerStoreHook(uint256 table, IStoreHook hook) external { + Hooks.push(bytes32(table), address(hook)); + } + + /************************************************************************ + * + * SET DATA + * + ************************************************************************/ + + /** + * Set full data record for the given table and key tuple (static and dynamic data) + */ + function setRecord( + uint256 table, + bytes32[] memory key, + bytes memory data + ) internal { + // verify the value has the correct length for the table (based on the table's schema) + // to prevent invalid data from being stored + Schema schema = getSchema(table); + + // Verify static data length + dynamic data length matches the given data + uint256 staticLength = schema.staticDataLength(); + uint256 expectedLength = staticLength; + PackedCounter dynamicLength; + if (schema.numDynamicFields() > 0) { + // Dynamic length is encoded at the start of the dynamic length blob + dynamicLength = PackedCounter.wrap(Bytes.slice32(data, staticLength)); + expectedLength += 32 + dynamicLength.total(); // encoded length + data + } + + if (expectedLength != data.length) { + revert StoreCore_InvalidDataLength(expectedLength, data.length); + } + + // Emit event to notify indexers + emit StoreSetRecord(table, key, data); + + // Call onSetRecord hooks (before actually modifying the state, so observers have access to the previous state if needed) + address[] memory hooks = Hooks.get(bytes32(table)); + for (uint256 i = 0; i < hooks.length; i++) { + IStoreHook hook = IStoreHook(hooks[i]); + hook.onSetRecord(table, key, data); + } + + // Store the static data at the static data location + uint256 staticDataLocation = StoreCoreInternal._getStaticDataLocation(table, key); + uint256 memoryPointer = Memory.dataPointer(data); + Storage.store({ + storagePointer: staticDataLocation, + offset: 0, + memoryPointer: memoryPointer, + length: staticLength + }); + memoryPointer += staticLength + 32; // move the memory pointer to the start of the dynamic data (skip the encoded dynamic length) + + // If there is no dynamic data, we're done + if (schema.numDynamicFields() == 0) return; + + // Store the dynamic data length at the dynamic data length location + uint256 dynamicDataLengthLocation = StoreCoreInternal._getDynamicDataLengthLocation(table, key); + Storage.store({ storagePointer: dynamicDataLengthLocation, data: dynamicLength.unwrap() }); + + // For every dynamic element, slice off the dynamic data and store it at the dynamic location + uint256 dynamicDataLocation; + uint256 dynamicDataLength; + for (uint8 i; i < schema.numDynamicFields(); ) { + dynamicDataLocation = StoreCoreInternal._getDynamicDataLocation(table, key, i); + dynamicDataLength = dynamicLength.atIndex(i); + Storage.store({ + storagePointer: dynamicDataLocation, + offset: 0, + memoryPointer: memoryPointer, + length: dynamicDataLength + }); + memoryPointer += dynamicDataLength; // move the memory pointer to the start of the next dynamic data + unchecked { + i++; + } + } + } + + function setField( + uint256 table, + bytes32[] memory key, + uint8 schemaIndex, + bytes memory data + ) internal { + Schema schema = getSchema(table); + + // Emit event to notify indexers + emit StoreSetField(table, key, schemaIndex, data); + + // Call onSetField hooks (before actually modifying the state, so observers have access to the previous state if needed) + address[] memory hooks = Hooks.get(bytes32(table)); + for (uint256 i = 0; i < hooks.length; i++) { + IStoreHook hook = IStoreHook(hooks[i]); + hook.onSetField(table, key, schemaIndex, data); + } + + if (schemaIndex < schema.numStaticFields()) { + StoreCoreInternal._setStaticField(table, key, schema, schemaIndex, data); + } else { + StoreCoreInternal._setDynamicField(table, key, schema, schemaIndex, data); + } + } + + function deleteRecord(uint256 table, bytes32[] memory key) internal { + // Get schema for this table + Schema schema = getSchema(table); + + // Emit event to notify indexers + emit StoreDeleteRecord(table, key); + + // Call onDeleteRecord hooks (before actually modifying the state, so observers have access to the previous state if needed) + address[] memory hooks = Hooks.get(bytes32(table)); + for (uint256 i = 0; i < hooks.length; i++) { + IStoreHook hook = IStoreHook(hooks[i]); + hook.onDeleteRecord(table, key); + } + + // Delete static data + uint256 staticDataLocation = StoreCoreInternal._getStaticDataLocation(table, key); + Storage.store({ storagePointer: staticDataLocation, offset: 0, data: new bytes(schema.staticDataLength()) }); + + // If there are no dynamic fields, we're done + if (schema.numDynamicFields() == 0) return; + + // Delete dynamic data length + uint256 dynamicDataLengthLocation = StoreCoreInternal._getDynamicDataLengthLocation(table, key); + Storage.store({ storagePointer: dynamicDataLengthLocation, data: bytes32(0) }); + } + + /************************************************************************ + * + * GET DATA + * + ************************************************************************/ + + /** + * Get full record (all fields, static and dynamic data) for the given table and key tuple (loading schema from storage) + */ + function getRecord(uint256 table, bytes32[] memory key) internal view returns (bytes memory) { + // Get schema for this table + Schema schema = getSchema(table); + if (schema.isEmpty()) revert StoreCore_TableNotFound(table); + + return getRecord(table, key, schema); + } + + /** + * Get full record (all fields, static and dynamic data) for the given table and key tuple, with the given schema + */ + function getRecord( + uint256 table, + bytes32[] memory key, + Schema schema + ) internal view returns (bytes memory) { + // Get the static data length + uint256 staticLength = schema.staticDataLength(); + uint256 outputLength = staticLength; + + // Load the dynamic data length if there are dynamic fields + PackedCounter dynamicDataLength; + uint256 numDynamicFields = schema.numDynamicFields(); + if (numDynamicFields > 0) { + dynamicDataLength = StoreCoreInternal._loadEncodedDynamicDataLength(table, key); + // TODO should total output include dynamic data length even if it's 0? + if (dynamicDataLength.total() > 0) { + outputLength += 32 + dynamicDataLength.total(); // encoded length + data + } + } + + // Allocate length for the full packed data (static and dynamic) + bytes memory data = new bytes(outputLength); + uint256 memoryPointer = Memory.dataPointer(data); + + // Load the static data from storage + StoreCoreInternal._getStaticData(table, key, staticLength, memoryPointer); + + // Early return if there are no dynamic fields + if (dynamicDataLength.total() == 0) return data; + // Advance memoryPointer to the dynamic data section + memoryPointer += staticLength; + + // Append the encoded dynamic length + Memory.store(memoryPointer, dynamicDataLength.unwrap()); + // Advance memoryPointer by the length of `dynamicDataLength` (1 word) + memoryPointer += 0x20; + + // Append dynamic data + for (uint8 i; i < numDynamicFields; i++) { + uint256 dynamicDataLocation = StoreCoreInternal._getDynamicDataLocation(table, key, i); + uint256 length = dynamicDataLength.atIndex(i); + Storage.load({ storagePointer: dynamicDataLocation, length: length, offset: 0, memoryPointer: memoryPointer }); + // Advance memoryPointer by the length of this dynamic field + memoryPointer += length; + } + + // Return the packed data + return data; + } + + /** + * Get a single field from the given table and key tuple (loading schema from storage) + */ + function getField( + uint256 table, + bytes32[] memory key, + uint8 schemaIndex + ) internal view returns (bytes memory) { + Schema schema = getSchema(table); + return getField(table, key, schemaIndex, schema); + } + + /** + * Get a single field from the given table and key tuple, with the given schema + */ + function getField( + uint256 table, + bytes32[] memory key, + uint8 schemaIndex, + Schema schema + ) internal view returns (bytes memory) { + if (schemaIndex < schema.numStaticFields()) { + return StoreCoreInternal._getStaticField(table, key, schemaIndex, schema); + } else { + return StoreCoreInternal._getDynamicField(table, key, schemaIndex, schema); + } + } +} + +library StoreCoreInternal { + bytes32 internal constant SLOT = keccak256("mud.store"); + uint256 internal constant SCHEMA_TABLE = uint256(keccak256("mud.store.table.schema")); + + /************************************************************************ + * + * SCHEMA + * + ************************************************************************/ + + function _getSchema(uint256 table) internal view returns (Schema) { + bytes32[] memory key = new bytes32[](1); + key[0] = bytes32(table); + uint256 location = StoreCoreInternal._getStaticDataLocation(SCHEMA_TABLE, key); + return Schema.wrap(Storage.load({ storagePointer: location })); + } + + /** + * Register a new table schema without validity checks + */ + function _registerSchemaUnchecked(uint256 table, Schema schema) internal { + bytes32[] memory key = new bytes32[](1); + key[0] = bytes32(table); + uint256 location = _getStaticDataLocation(SCHEMA_TABLE, key); + Storage.store({ storagePointer: location, data: schema.unwrap() }); + + // Emit an event to notify indexers + emit StoreCore.StoreSetRecord(SCHEMA_TABLE, key, abi.encodePacked(schema.unwrap())); + } + + /************************************************************************ + * + * SET DATA + * + ************************************************************************/ + + function _setStaticField( + uint256 table, + bytes32[] memory key, + Schema schema, + uint8 schemaIndex, + bytes memory data + ) internal { + // verify the value has the correct length for the field + SchemaType schemaType = schema.atIndex(schemaIndex); + if (schemaType.getStaticByteLength() != data.length) + revert StoreCore.StoreCore_InvalidDataLength(schemaType.getStaticByteLength(), data.length); + + // Store the provided value in storage + uint256 location = _getStaticDataLocation(table, key); + uint256 offset = _getStaticDataOffset(schema, schemaIndex); + Storage.store({ storagePointer: location, offset: offset, data: data }); + } + + function _setDynamicField( + uint256 table, + bytes32[] memory key, + Schema schema, + uint8 schemaIndex, + bytes memory data + ) internal { + uint8 dynamicSchemaIndex = schemaIndex - schema.numStaticFields(); + + // Update the dynamic data length + _setDynamicDataLengthAtIndex(table, key, dynamicSchemaIndex, data.length); + + // Store the provided value in storage + uint256 dynamicDataLocation = _getDynamicDataLocation(table, key, dynamicSchemaIndex); + Storage.store({ storagePointer: dynamicDataLocation, data: data }); + } + + /************************************************************************ + * + * GET DATA + * + ************************************************************************/ + + /** + * Get full static record for the given table and key tuple (loading schema's static length from storage) + */ + function _getStaticData( + uint256 table, + bytes32[] memory key, + uint256 memoryPointer + ) internal view { + Schema schema = _getSchema(table); + _getStaticData(table, key, schema.staticDataLength(), memoryPointer); + } + + /** + * Get full static data for the given table and key tuple, with the given static length + */ + function _getStaticData( + uint256 table, + bytes32[] memory key, + uint256 length, + uint256 memoryPointer + ) internal view { + if (length == 0) return; + + // Load the data from storage + uint256 location = _getStaticDataLocation(table, key); + Storage.load({ storagePointer: location, length: length, offset: 0, memoryPointer: memoryPointer }); + } + + /** + * Get a single static field from the given table and key tuple, with the given schema + */ + function _getStaticField( + uint256 table, + bytes32[] memory key, + uint8 schemaIndex, + Schema schema + ) internal view returns (bytes memory) { + // Get the length, storage location and offset of the static field + SchemaType schemaType = schema.atIndex(schemaIndex); + uint256 dataLength = schemaType.getStaticByteLength(); + uint256 location = _getStaticDataLocation(table, key); + uint256 offset = _getStaticDataOffset(schema, schemaIndex); + + // Load the data from storage + + return Storage.load({ storagePointer: location, length: dataLength, offset: offset }); + } + + /** + * Get a single dynamic field from the given table and key tuple, with the given schema + */ + function _getDynamicField( + uint256 table, + bytes32[] memory key, + uint8 schemaIndex, + Schema schema + ) internal view returns (bytes memory) { + // Get the length and storage location of the dynamic field + uint8 dynamicSchemaIndex = schemaIndex - schema.numStaticFields(); + uint256 location = _getDynamicDataLocation(table, key, dynamicSchemaIndex); + uint256 dataLength = _loadEncodedDynamicDataLength(table, key).atIndex(dynamicSchemaIndex); + + return Storage.load({ storagePointer: location, length: dataLength }); + } + + /************************************************************************ + * + * HELPER FUNCTIONS + * + ************************************************************************/ + + ///////////////////////////////////////////////////////////////////////// + // STATIC DATA + ///////////////////////////////////////////////////////////////////////// + + /** + * Compute the storage location based on table id and index tuple + */ + function _getStaticDataLocation(uint256 table, bytes32[] memory key) internal pure returns (uint256) { + return uint256(keccak256(abi.encode(SLOT, table, key))); + } + + /** + * Get storage offset for the given schema and (static length) index + */ + function _getStaticDataOffset(Schema schema, uint8 schemaIndex) internal pure returns (uint256) { + uint256 offset = 0; + for (uint256 i = 0; i < schemaIndex; i++) { + offset += schema.atIndex(i).getStaticByteLength(); + } + return offset; + } + + ///////////////////////////////////////////////////////////////////////// + // DYNAMIC DATA + ///////////////////////////////////////////////////////////////////////// + + /** + * Compute the storage location based on table id and index tuple + */ + function _getDynamicDataLocation( + uint256 table, + bytes32[] memory key, + uint8 schemaIndex + ) internal pure returns (uint256) { + return uint256(keccak256(abi.encode(SLOT, table, key, schemaIndex))); + } + + /** + * Compute the storage location for the length of the dynamic data + */ + function _getDynamicDataLengthLocation(uint256 table, bytes32[] memory key) internal pure returns (uint256) { + return uint256(keccak256(abi.encode(SLOT, table, key, "length"))); + } + + /** + * Get the length of the dynamic data for the given schema and index + */ + function _loadEncodedDynamicDataLength(uint256 table, bytes32[] memory key) internal view returns (PackedCounter) { + // Load dynamic data length from storage + uint256 dynamicSchemaLengthSlot = _getDynamicDataLengthLocation(table, key); + return PackedCounter.wrap(Storage.load({ storagePointer: dynamicSchemaLengthSlot })); + } + + /** + * Set the length of the dynamic data (in bytes) for the given schema and index + */ + function _setDynamicDataLengthAtIndex( + uint256 table, + bytes32[] memory key, + uint8 dynamicSchemaIndex, // schemaIndex - numStaticFields + uint256 newLengthAtIndex + ) internal { + // Load dynamic data length from storage + uint256 dynamicSchemaLengthSlot = _getDynamicDataLengthLocation(table, key); + PackedCounter encodedLengths = PackedCounter.wrap(Storage.load({ storagePointer: dynamicSchemaLengthSlot })); + + // Update the encoded lengths + encodedLengths = encodedLengths.setAtIndex(dynamicSchemaIndex, newLengthAtIndex); + + // Set the new lengths + Storage.store({ storagePointer: dynamicSchemaLengthSlot, data: encodedLengths.unwrap() }); + } +} + +// Overloads for single key and some fixed length array keys for better devex +library StoreCoreExtended { + /************************************************************************ + * + * SET DATA + * + ************************************************************************/ + + /************************************************************************ + * + * GET DATA + * + ************************************************************************/ + function getRecord(uint256 table, bytes32 _key) external view returns (bytes memory) { + bytes32[] memory key = new bytes32[](1); + key[0] = _key; + return StoreCore.getRecord(table, key); + } + + function getData(uint256 table, bytes32[2] memory _key) external view returns (bytes memory) { + bytes32[] memory key = new bytes32[](2); + key[0] = _key[0]; + key[1] = _key[1]; + return StoreCore.getRecord(table, key); + } +} diff --git a/packages/store/src/StoreSwitch.sol b/packages/store/src/StoreSwitch.sol new file mode 100644 index 0000000000..fece083bc2 --- /dev/null +++ b/packages/store/src/StoreSwitch.sol @@ -0,0 +1,118 @@ +// SPDX-License-Identifier: MIT +pragma solidity >=0.8.0; + +import { console } from "forge-std/console.sol"; +import { SchemaType } from "./Types.sol"; +import { IStore } from "./IStore.sol"; +import { StoreCore } from "./StoreCore.sol"; +import { Schema } from "./Schema.sol"; + +/** + * Call IStore functions on self or msg.sender, depending on whether the call is a delegatecall or regular call. + */ +library StoreSwitch { + error StoreSwitch_InvalidInsideConstructor(); + + /** + * Detect whether the current call is a delegatecall or regular call. + * (The isStore method doesn't return a value to save gas, but it if exists, the call will succeed.) + */ + function isDelegateCall() internal view returns (bool success) { + // Detect calls from within a constructor and revert to avoid unexpected behavior + uint256 codeSize; + assembly { + codeSize := extcodesize(address()) + } + + // If the call is from within a constructor, use StoreCore to write to own storage + if (codeSize == 0) return true; + + // Check whether this contract implements the IStore interface + try IStore(address(this)).isStore() { + success = true; + } catch { + success = false; + } + } + + function registerSchema(uint256 table, Schema schema) internal { + if (isDelegateCall()) { + StoreCore.registerSchema(table, schema); + } else { + IStore(msg.sender).registerSchema(table, schema); + } + } + + function getSchema(uint256 table) internal view returns (Schema schema) { + if (isDelegateCall()) { + schema = StoreCore.getSchema(table); + } else { + schema = IStore(msg.sender).getSchema(table); + } + } + + function setRecord( + uint256 table, + bytes32[] memory key, + bytes memory data + ) internal { + if (isDelegateCall()) { + StoreCore.setRecord(table, key, data); + } else { + IStore(msg.sender).setRecord(table, key, data); + } + } + + function setField( + uint256 table, + bytes32[] memory key, + uint8 fieldIndex, + bytes memory data + ) internal { + if (isDelegateCall()) { + StoreCore.setField(table, key, fieldIndex, data); + } else { + IStore(msg.sender).setField(table, key, fieldIndex, data); + } + } + + function deleteRecord(uint256 table, bytes32[] memory key) internal { + if (isDelegateCall()) { + StoreCore.deleteRecord(table, key); + } else { + IStore(msg.sender).deleteRecord(table, key); + } + } + + function getRecord(uint256 table, bytes32[] memory key) internal view returns (bytes memory) { + if (isDelegateCall()) { + return StoreCore.getRecord(table, key); + } else { + return IStore(msg.sender).getRecord(table, key); + } + } + + function getRecord( + uint256 table, + bytes32[] memory key, + Schema schema + ) internal view returns (bytes memory) { + if (isDelegateCall()) { + return StoreCore.getRecord(table, key, schema); + } else { + return IStore(msg.sender).getRecord(table, key, schema); + } + } + + function getField( + uint256 table, + bytes32[] memory key, + uint8 fieldIndex + ) internal view returns (bytes memory) { + if (isDelegateCall()) { + return StoreCore.getField(table, key, fieldIndex); + } else { + return IStore(msg.sender).getField(table, key, fieldIndex); + } + } +} diff --git a/packages/store/src/StoreView.sol b/packages/store/src/StoreView.sol new file mode 100644 index 0000000000..4f48ab6f5e --- /dev/null +++ b/packages/store/src/StoreView.sol @@ -0,0 +1,57 @@ +// SPDX-License-Identifier: MIT +pragma solidity >=0.8.0; + +import { SchemaType } from "./Types.sol"; +import { IStoreHook } from "./IStore.sol"; +import { StoreCore } from "./StoreCore.sol"; +import { Schema } from "./Schema.sol"; +import { Store } from "./Store.sol"; + +// Not abstract, so that it can be used as a base contract for testing and wherever write access is not needed +contract StoreView is Store { + error StoreView_NotImplemented(); + + /** + * Not implemented in StoreView + */ + function registerSchema(uint256, Schema) public virtual { + revert StoreView_NotImplemented(); + } + + /** + * Not implemented in StoreView + */ + function setRecord( + uint256, + bytes32[] calldata, + bytes calldata + ) public virtual { + revert StoreView_NotImplemented(); + } + + /** + * Not implemented in StoreView + */ + function setField( + uint256, + bytes32[] calldata, + uint8, + bytes calldata + ) public virtual { + revert StoreView_NotImplemented(); + } + + /** + * Not implemented in StoreView + */ + function registerStoreHook(uint256, IStoreHook) public virtual { + revert StoreView_NotImplemented(); + } + + /** + * Not implemented in StoreView + */ + function deleteRecord(uint256, bytes32[] calldata) public virtual { + revert StoreView_NotImplemented(); + } +} diff --git a/packages/store/src/Types.sol b/packages/store/src/Types.sol new file mode 100644 index 0000000000..5c5c47dcb5 --- /dev/null +++ b/packages/store/src/Types.sol @@ -0,0 +1,241 @@ +// SPDX-License-Identifier: MIT +pragma solidity >=0.8.0; + +using { getStaticByteLength } for SchemaType global; + +// WARNING: SchemaType methods use hardcoded enum indexes, review them after any changes to the enum +// TODO add and implement BYTES_ARRAY, STRING_ARRAY if they are needed (they are special nested arrays) +enum SchemaType { + UINT8, + UINT16, + UINT24, + UINT32, + UINT40, + UINT48, + UINT56, + UINT64, + UINT72, + UINT80, + UINT88, + UINT96, + UINT104, + UINT112, + UINT120, + UINT128, + UINT136, + UINT144, + UINT152, + UINT160, + UINT168, + UINT176, + UINT184, + UINT192, + UINT200, + UINT208, + UINT216, + UINT224, + UINT232, + UINT240, + UINT248, + UINT256, + INT8, + INT16, + INT24, + INT32, + INT40, + INT48, + INT56, + INT64, + INT72, + INT80, + INT88, + INT96, + INT104, + INT112, + INT120, + INT128, + INT136, + INT144, + INT152, + INT160, + INT168, + INT176, + INT184, + INT192, + INT200, + INT208, + INT216, + INT224, + INT232, + INT240, + INT248, + INT256, + BYTES1, + BYTES2, + BYTES3, + BYTES4, + BYTES5, + BYTES6, + BYTES7, + BYTES8, + BYTES9, + BYTES10, + BYTES11, + BYTES12, + BYTES13, + BYTES14, + BYTES15, + BYTES16, + BYTES17, + BYTES18, + BYTES19, + BYTES20, + BYTES21, + BYTES22, + BYTES23, + BYTES24, + BYTES25, + BYTES26, + BYTES27, + BYTES28, + BYTES29, + BYTES30, + BYTES31, + BYTES32, + BOOL, + ADDRESS, + UINT8_ARRAY, + UINT16_ARRAY, + UINT24_ARRAY, + UINT32_ARRAY, + UINT40_ARRAY, + UINT48_ARRAY, + UINT56_ARRAY, + UINT64_ARRAY, + UINT72_ARRAY, + UINT80_ARRAY, + UINT88_ARRAY, + UINT96_ARRAY, + UINT104_ARRAY, + UINT112_ARRAY, + UINT120_ARRAY, + UINT128_ARRAY, + UINT136_ARRAY, + UINT144_ARRAY, + UINT152_ARRAY, + UINT160_ARRAY, + UINT168_ARRAY, + UINT176_ARRAY, + UINT184_ARRAY, + UINT192_ARRAY, + UINT200_ARRAY, + UINT208_ARRAY, + UINT216_ARRAY, + UINT224_ARRAY, + UINT232_ARRAY, + UINT240_ARRAY, + UINT248_ARRAY, + UINT256_ARRAY, + INT8_ARRAY, + INT16_ARRAY, + INT24_ARRAY, + INT32_ARRAY, + INT40_ARRAY, + INT48_ARRAY, + INT56_ARRAY, + INT64_ARRAY, + INT72_ARRAY, + INT80_ARRAY, + INT88_ARRAY, + INT96_ARRAY, + INT104_ARRAY, + INT112_ARRAY, + INT120_ARRAY, + INT128_ARRAY, + INT136_ARRAY, + INT144_ARRAY, + INT152_ARRAY, + INT160_ARRAY, + INT168_ARRAY, + INT176_ARRAY, + INT184_ARRAY, + INT192_ARRAY, + INT200_ARRAY, + INT208_ARRAY, + INT216_ARRAY, + INT224_ARRAY, + INT232_ARRAY, + INT240_ARRAY, + INT248_ARRAY, + INT256_ARRAY, + BYTES1_ARRAY, + BYTES2_ARRAY, + BYTES3_ARRAY, + BYTES4_ARRAY, + BYTES5_ARRAY, + BYTES6_ARRAY, + BYTES7_ARRAY, + BYTES8_ARRAY, + BYTES9_ARRAY, + BYTES10_ARRAY, + BYTES11_ARRAY, + BYTES12_ARRAY, + BYTES13_ARRAY, + BYTES14_ARRAY, + BYTES15_ARRAY, + BYTES16_ARRAY, + BYTES17_ARRAY, + BYTES18_ARRAY, + BYTES19_ARRAY, + BYTES20_ARRAY, + BYTES21_ARRAY, + BYTES22_ARRAY, + BYTES23_ARRAY, + BYTES24_ARRAY, + BYTES25_ARRAY, + BYTES26_ARRAY, + BYTES27_ARRAY, + BYTES28_ARRAY, + BYTES29_ARRAY, + BYTES30_ARRAY, + BYTES31_ARRAY, + BYTES32_ARRAY, + BOOL_ARRAY, + ADDRESS_ARRAY, + BYTES, + STRING +} + +/** + * Get the length of the data for the given schema type + * (Because Solidity doesn't support constant arrays, we need to use a function) + */ +function getStaticByteLength(SchemaType schemaType) pure returns (uint256) { + uint256 index = uint8(schemaType); + + if (index < 32) { + // uint8-256 + return index + 1; + } else if (index < 64) { + // int8-256, offset by 32 + return index + 1 - 32; + } else if (index < 96) { + // bytes1-32, offset by 64 + return index + 1 - 64; + } + + // Other static types + if (schemaType == SchemaType.BOOL) { + return 1; + } else if (schemaType == SchemaType.ADDRESS) { + return 20; + } + + // Return 0 for all dynamic types + return 0; +} + +enum ExecutionMode { + Delegate, + Autonomous +} diff --git a/packages/store/src/Utils.sol b/packages/store/src/Utils.sol new file mode 100644 index 0000000000..14c95abd14 --- /dev/null +++ b/packages/store/src/Utils.sol @@ -0,0 +1,27 @@ +// SPDX-License-Identifier: MIT +pragma solidity >=0.8.0; + +library Utils { + function divCeil(uint256 a, uint256 b) internal pure returns (uint256) { + return a / b + (a % b == 0 ? 0 : 1); + } + + /** + * Adapted from https://github.com/dk1a/solidity-stringutils/blob/main/src/utils/mem.sol#L149-L167 + * @dev Left-aligned byte mask (e.g. for partial mload/mstore). + * For byteLength >= 32 returns type(uint256).max + * + * length 0: 0x000000...000000 + * length 1: 0xff0000...000000 + * length 2: 0xffff00...000000 + * ... + * length 30: 0xffffff...ff0000 + * length 31: 0xffffff...ffff00 + * length 32+: 0xffffff...ffffff + */ + function leftMask(uint256 byteLength) internal pure returns (uint256) { + unchecked { + return ~(type(uint256).max >> (byteLength * 8)); + } + } +} diff --git a/packages/store/src/tables/Callbacks.sol b/packages/store/src/tables/Callbacks.sol new file mode 100644 index 0000000000..2a41f86d5c --- /dev/null +++ b/packages/store/src/tables/Callbacks.sol @@ -0,0 +1,71 @@ +// SPDX-License-Identifier: MIT +pragma solidity >=0.8.0; + +/* Autogenerated file. Do not edit manually. */ + +import { IStore } from "../IStore.sol"; +import { StoreSwitch } from "../StoreSwitch.sol"; +import { StoreCore } from "../StoreCore.sol"; +import { SchemaType } from "../Types.sol"; +import { Bytes } from "../Bytes.sol"; +import { SliceLib } from "../Slice.sol"; +import { EncodeArray } from "../tightcoder/EncodeArray.sol"; +import { Schema, SchemaLib } from "../Schema.sol"; +import { PackedCounter, PackedCounterLib } from "../PackedCounter.sol"; + +uint256 constant _tableId = uint256(keccak256("/store_internals/tables/Callbacks")); +uint256 constant CallbacksTableId = _tableId; + +library Callbacks { + /** Get the table's schema */ + function getSchema() internal pure returns (Schema) { + SchemaType[] memory _schema = new SchemaType[](1); + _schema[0] = SchemaType.BYTES24_ARRAY; + + return SchemaLib.encode(_schema); + } + + /** Register the table's schema */ + function registerSchema() internal { + StoreSwitch.registerSchema(_tableId, getSchema()); + } + + /** Get value */ + function get(bytes32 key) internal view returns (bytes24[] memory value) { + bytes32[] memory _primaryKeys = new bytes32[](1); + + _primaryKeys[0] = bytes32(key); + + bytes memory _blob = StoreSwitch.getField(_tableId, _primaryKeys, 0); + return SliceLib.getSubslice(_blob, 0, _blob.length).decodeArray_bytes24(); + } + + /** Set value */ + function set(bytes32 key, bytes24[] memory value) internal { + bytes32[] memory _primaryKeys = new bytes32[](1); + + _primaryKeys[0] = bytes32(key); + + StoreSwitch.setField(_tableId, _primaryKeys, 0, EncodeArray.encode(value)); + } + + /** Push an element to value */ + function push(bytes32 key, bytes24 _element) internal { + bytes32[] memory _primaryKeys = new bytes32[](1); + + _primaryKeys[0] = bytes32(key); + + bytes memory _blob = StoreSwitch.getField(_tableId, _primaryKeys, 0); + bytes memory _newBlob = abi.encodePacked(_blob, abi.encodePacked(_element)); + StoreSwitch.setField(_tableId, _primaryKeys, 0, _newBlob); + } + + /* Delete all data for given keys */ + function deleteRecord(bytes32 key) internal { + bytes32[] memory _primaryKeys = new bytes32[](1); + + _primaryKeys[0] = bytes32(key); + + StoreSwitch.deleteRecord(_tableId, _primaryKeys); + } +} diff --git a/packages/store/src/tables/Hooks.sol b/packages/store/src/tables/Hooks.sol new file mode 100644 index 0000000000..89c905de3c --- /dev/null +++ b/packages/store/src/tables/Hooks.sol @@ -0,0 +1,71 @@ +// SPDX-License-Identifier: MIT +pragma solidity >=0.8.0; + +/* Autogenerated file. Do not edit manually. */ + +import { IStore } from "../IStore.sol"; +import { StoreSwitch } from "../StoreSwitch.sol"; +import { StoreCore } from "../StoreCore.sol"; +import { SchemaType } from "../Types.sol"; +import { Bytes } from "../Bytes.sol"; +import { SliceLib } from "../Slice.sol"; +import { EncodeArray } from "../tightcoder/EncodeArray.sol"; +import { Schema, SchemaLib } from "../Schema.sol"; +import { PackedCounter, PackedCounterLib } from "../PackedCounter.sol"; + +uint256 constant _tableId = uint256(keccak256("/store_internals/tables/Hooks")); +uint256 constant HooksTableId = _tableId; + +library Hooks { + /** Get the table's schema */ + function getSchema() internal pure returns (Schema) { + SchemaType[] memory _schema = new SchemaType[](1); + _schema[0] = SchemaType.ADDRESS_ARRAY; + + return SchemaLib.encode(_schema); + } + + /** Register the table's schema */ + function registerSchema() internal { + StoreSwitch.registerSchema(_tableId, getSchema()); + } + + /** Get value */ + function get(bytes32 key) internal view returns (address[] memory value) { + bytes32[] memory _primaryKeys = new bytes32[](1); + + _primaryKeys[0] = bytes32(key); + + bytes memory _blob = StoreSwitch.getField(_tableId, _primaryKeys, 0); + return SliceLib.getSubslice(_blob, 0, _blob.length).decodeArray_address(); + } + + /** Set value */ + function set(bytes32 key, address[] memory value) internal { + bytes32[] memory _primaryKeys = new bytes32[](1); + + _primaryKeys[0] = bytes32(key); + + StoreSwitch.setField(_tableId, _primaryKeys, 0, EncodeArray.encode(value)); + } + + /** Push an element to value */ + function push(bytes32 key, address _element) internal { + bytes32[] memory _primaryKeys = new bytes32[](1); + + _primaryKeys[0] = bytes32(key); + + bytes memory _blob = StoreSwitch.getField(_tableId, _primaryKeys, 0); + bytes memory _newBlob = abi.encodePacked(_blob, abi.encodePacked(_element)); + StoreSwitch.setField(_tableId, _primaryKeys, 0, _newBlob); + } + + /* Delete all data for given keys */ + function deleteRecord(bytes32 key) internal { + bytes32[] memory _primaryKeys = new bytes32[](1); + + _primaryKeys[0] = bytes32(key); + + StoreSwitch.deleteRecord(_tableId, _primaryKeys); + } +} diff --git a/packages/store/src/tables/Mixed.sol b/packages/store/src/tables/Mixed.sol new file mode 100644 index 0000000000..1866b7ae01 --- /dev/null +++ b/packages/store/src/tables/Mixed.sol @@ -0,0 +1,207 @@ +// SPDX-License-Identifier: MIT +pragma solidity >=0.8.0; + +/* Autogenerated file. Do not edit manually. */ + +import { IStore } from "../IStore.sol"; +import { StoreSwitch } from "../StoreSwitch.sol"; +import { StoreCore } from "../StoreCore.sol"; +import { SchemaType } from "../Types.sol"; +import { Bytes } from "../Bytes.sol"; +import { SliceLib } from "../Slice.sol"; +import { EncodeArray } from "../tightcoder/EncodeArray.sol"; +import { Schema, SchemaLib } from "../Schema.sol"; +import { PackedCounter, PackedCounterLib } from "../PackedCounter.sol"; + +uint256 constant _tableId = uint256(keccak256("/store_internals/tables/Mixed")); +uint256 constant MixedTableId = _tableId; + +struct MixedData { + uint32 u32; + uint128 u128; + uint32[] a32; + string s; +} + +library Mixed { + /** Get the table's schema */ + function getSchema() internal pure returns (Schema) { + SchemaType[] memory _schema = new SchemaType[](4); + _schema[0] = SchemaType.UINT32; + _schema[1] = SchemaType.UINT128; + _schema[2] = SchemaType.UINT32_ARRAY; + _schema[3] = SchemaType.STRING; + + return SchemaLib.encode(_schema); + } + + /** Register the table's schema */ + function registerSchema() internal { + StoreSwitch.registerSchema(_tableId, getSchema()); + } + + /** Get u32 */ + function getU32(bytes32 key) internal view returns (uint32 u32) { + bytes32[] memory _primaryKeys = new bytes32[](1); + + _primaryKeys[0] = bytes32(key); + + bytes memory _blob = StoreSwitch.getField(_tableId, _primaryKeys, 0); + return uint32(Bytes.slice4(_blob, 0)); + } + + /** Set u32 */ + function setU32(bytes32 key, uint32 u32) internal { + bytes32[] memory _primaryKeys = new bytes32[](1); + + _primaryKeys[0] = bytes32(key); + + StoreSwitch.setField(_tableId, _primaryKeys, 0, abi.encodePacked(u32)); + } + + /** Get u128 */ + function getU128(bytes32 key) internal view returns (uint128 u128) { + bytes32[] memory _primaryKeys = new bytes32[](1); + + _primaryKeys[0] = bytes32(key); + + bytes memory _blob = StoreSwitch.getField(_tableId, _primaryKeys, 1); + return uint128(Bytes.slice16(_blob, 0)); + } + + /** Set u128 */ + function setU128(bytes32 key, uint128 u128) internal { + bytes32[] memory _primaryKeys = new bytes32[](1); + + _primaryKeys[0] = bytes32(key); + + StoreSwitch.setField(_tableId, _primaryKeys, 1, abi.encodePacked(u128)); + } + + /** Get a32 */ + function getA32(bytes32 key) internal view returns (uint32[] memory a32) { + bytes32[] memory _primaryKeys = new bytes32[](1); + + _primaryKeys[0] = bytes32(key); + + bytes memory _blob = StoreSwitch.getField(_tableId, _primaryKeys, 2); + return SliceLib.getSubslice(_blob, 0, _blob.length).decodeArray_uint32(); + } + + /** Set a32 */ + function setA32(bytes32 key, uint32[] memory a32) internal { + bytes32[] memory _primaryKeys = new bytes32[](1); + + _primaryKeys[0] = bytes32(key); + + StoreSwitch.setField(_tableId, _primaryKeys, 2, EncodeArray.encode(a32)); + } + + /** Push an element to a32 */ + function pushA32(bytes32 key, uint32 _element) internal { + bytes32[] memory _primaryKeys = new bytes32[](1); + + _primaryKeys[0] = bytes32(key); + + bytes memory _blob = StoreSwitch.getField(_tableId, _primaryKeys, 2); + bytes memory _newBlob = abi.encodePacked(_blob, abi.encodePacked(_element)); + StoreSwitch.setField(_tableId, _primaryKeys, 2, _newBlob); + } + + /** Get s */ + function getS(bytes32 key) internal view returns (string memory s) { + bytes32[] memory _primaryKeys = new bytes32[](1); + + _primaryKeys[0] = bytes32(key); + + bytes memory _blob = StoreSwitch.getField(_tableId, _primaryKeys, 3); + return string(_blob); + } + + /** Set s */ + function setS(bytes32 key, string memory s) internal { + bytes32[] memory _primaryKeys = new bytes32[](1); + + _primaryKeys[0] = bytes32(key); + + StoreSwitch.setField(_tableId, _primaryKeys, 3, bytes(s)); + } + + /** Push a slice to s */ + function pushS(bytes32 key, string memory _slice) internal { + bytes32[] memory _primaryKeys = new bytes32[](1); + + _primaryKeys[0] = bytes32(key); + + bytes memory _blob = StoreSwitch.getField(_tableId, _primaryKeys, 3); + bytes memory _newBlob = abi.encodePacked(_blob, bytes(_slice)); + StoreSwitch.setField(_tableId, _primaryKeys, 3, _newBlob); + } + + /** Get the full data */ + function get(bytes32 key) internal view returns (MixedData memory _table) { + bytes32[] memory _primaryKeys = new bytes32[](1); + + _primaryKeys[0] = bytes32(key); + + bytes memory _blob = StoreSwitch.getRecord(_tableId, _primaryKeys, getSchema()); + return decode(_blob); + } + + /** Set the full data using individual values */ + function set( + bytes32 key, + uint32 u32, + uint128 u128, + uint32[] memory a32, + string memory s + ) internal { + uint16[] memory _counters = new uint16[](2); + _counters[0] = uint16(a32.length * 4); + _counters[1] = uint16(bytes(s).length); + PackedCounter _encodedLengths = PackedCounterLib.pack(_counters); + + bytes memory _data = abi.encodePacked(u32, u128, _encodedLengths.unwrap(), EncodeArray.encode(a32), bytes(s)); + + bytes32[] memory _primaryKeys = new bytes32[](1); + + _primaryKeys[0] = bytes32(key); + + StoreSwitch.setRecord(_tableId, _primaryKeys, _data); + } + + /** Set the full data using the data struct */ + function set(bytes32 key, MixedData memory _table) internal { + set(key, _table.u32, _table.u128, _table.a32, _table.s); + } + + /** Decode the tightly packed blob using this table's schema */ + function decode(bytes memory _blob) internal view returns (MixedData memory _table) { + // 20 is the total byte length of static data + PackedCounter _encodedLengths = PackedCounter.wrap(Bytes.slice32(_blob, 20)); + + _table.u32 = uint32(Bytes.slice4(_blob, 0)); + + _table.u128 = uint128(Bytes.slice16(_blob, 4)); + + uint256 _start; + uint256 _end = 52; + + _start = _end; + _end += _encodedLengths.atIndex(0); + _table.a32 = SliceLib.getSubslice(_blob, _start, _end).decodeArray_uint32(); + + _start = _end; + _end += _encodedLengths.atIndex(1); + _table.s = string(SliceLib.getSubslice(_blob, _start, _end).toBytes()); + } + + /* Delete all data for given keys */ + function deleteRecord(bytes32 key) internal { + bytes32[] memory _primaryKeys = new bytes32[](1); + + _primaryKeys[0] = bytes32(key); + + StoreSwitch.deleteRecord(_tableId, _primaryKeys); + } +} diff --git a/packages/store/src/tables/Route.sol b/packages/store/src/tables/Route.sol new file mode 100644 index 0000000000..d359638410 --- /dev/null +++ b/packages/store/src/tables/Route.sol @@ -0,0 +1,146 @@ +// SPDX-License-Identifier: MIT +pragma solidity >=0.8.0; + +/* Autogenerated file. Do not edit manually. */ + +import { IStore } from "../IStore.sol"; +import { StoreSwitch } from "../StoreSwitch.sol"; +import { StoreCore } from "../StoreCore.sol"; +import { SchemaType } from "../Types.sol"; +import { Bytes } from "../Bytes.sol"; +import { SliceLib } from "../Slice.sol"; +import { EncodeArray } from "../tightcoder/EncodeArray.sol"; +import { Schema, SchemaLib } from "../Schema.sol"; +import { PackedCounter, PackedCounterLib } from "../PackedCounter.sol"; + +uint256 constant _tableId = uint256(keccak256("/store_internals/tables/Route")); +uint256 constant RouteTableId = _tableId; + +struct RouteData { + address addr; + bytes4 selector; + uint8 executionMode; +} + +library Route { + /** Get the table's schema */ + function getSchema() internal pure returns (Schema) { + SchemaType[] memory _schema = new SchemaType[](3); + _schema[0] = SchemaType.ADDRESS; + _schema[1] = SchemaType.BYTES4; + _schema[2] = SchemaType.UINT8; + + return SchemaLib.encode(_schema); + } + + /** Register the table's schema */ + function registerSchema() internal { + StoreSwitch.registerSchema(_tableId, getSchema()); + } + + /** Get addr */ + function getAddr(bytes32 key) internal view returns (address addr) { + bytes32[] memory _primaryKeys = new bytes32[](1); + + _primaryKeys[0] = bytes32(key); + + bytes memory _blob = StoreSwitch.getField(_tableId, _primaryKeys, 0); + return address(Bytes.slice20(_blob, 0)); + } + + /** Set addr */ + function setAddr(bytes32 key, address addr) internal { + bytes32[] memory _primaryKeys = new bytes32[](1); + + _primaryKeys[0] = bytes32(key); + + StoreSwitch.setField(_tableId, _primaryKeys, 0, abi.encodePacked(addr)); + } + + /** Get selector */ + function getSelector(bytes32 key) internal view returns (bytes4 selector) { + bytes32[] memory _primaryKeys = new bytes32[](1); + + _primaryKeys[0] = bytes32(key); + + bytes memory _blob = StoreSwitch.getField(_tableId, _primaryKeys, 1); + return Bytes.slice4(_blob, 0); + } + + /** Set selector */ + function setSelector(bytes32 key, bytes4 selector) internal { + bytes32[] memory _primaryKeys = new bytes32[](1); + + _primaryKeys[0] = bytes32(key); + + StoreSwitch.setField(_tableId, _primaryKeys, 1, abi.encodePacked(selector)); + } + + /** Get executionMode */ + function getExecutionMode(bytes32 key) internal view returns (uint8 executionMode) { + bytes32[] memory _primaryKeys = new bytes32[](1); + + _primaryKeys[0] = bytes32(key); + + bytes memory _blob = StoreSwitch.getField(_tableId, _primaryKeys, 2); + return uint8(Bytes.slice1(_blob, 0)); + } + + /** Set executionMode */ + function setExecutionMode(bytes32 key, uint8 executionMode) internal { + bytes32[] memory _primaryKeys = new bytes32[](1); + + _primaryKeys[0] = bytes32(key); + + StoreSwitch.setField(_tableId, _primaryKeys, 2, abi.encodePacked(executionMode)); + } + + /** Get the full data */ + function get(bytes32 key) internal view returns (RouteData memory _table) { + bytes32[] memory _primaryKeys = new bytes32[](1); + + _primaryKeys[0] = bytes32(key); + + bytes memory _blob = StoreSwitch.getRecord(_tableId, _primaryKeys, getSchema()); + return decode(_blob); + } + + /** Set the full data using individual values */ + function set( + bytes32 key, + address addr, + bytes4 selector, + uint8 executionMode + ) internal { + bytes memory _data = abi.encodePacked(addr, selector, executionMode); + + bytes32[] memory _primaryKeys = new bytes32[](1); + + _primaryKeys[0] = bytes32(key); + + StoreSwitch.setRecord(_tableId, _primaryKeys, _data); + } + + /** Set the full data using the data struct */ + function set(bytes32 key, RouteData memory _table) internal { + set(key, _table.addr, _table.selector, _table.executionMode); + } + + /** Decode the tightly packed blob using this table's schema */ + function decode(bytes memory _blob) internal pure returns (RouteData memory _table) { + _table.addr = address(Bytes.slice20(_blob, 0)); + + _table.selector = Bytes.slice4(_blob, 20); + + _table.executionMode = uint8(Bytes.slice1(_blob, 24)); + } + + /* Delete all data for given keys */ + function deleteRecord(bytes32 key) internal { + bytes32[] memory _primaryKeys = new bytes32[](1); + + _primaryKeys[0] = bytes32(key); + + StoreSwitch.deleteRecord(_tableId, _primaryKeys); + } +} diff --git a/packages/store/src/tables/Vector2.sol b/packages/store/src/tables/Vector2.sol new file mode 100644 index 0000000000..8765f6c48f --- /dev/null +++ b/packages/store/src/tables/Vector2.sol @@ -0,0 +1,122 @@ +// SPDX-License-Identifier: MIT +pragma solidity >=0.8.0; + +/* Autogenerated file. Do not edit manually. */ + +import { IStore } from "../IStore.sol"; +import { StoreSwitch } from "../StoreSwitch.sol"; +import { StoreCore } from "../StoreCore.sol"; +import { SchemaType } from "../Types.sol"; +import { Bytes } from "../Bytes.sol"; +import { SliceLib } from "../Slice.sol"; +import { EncodeArray } from "../tightcoder/EncodeArray.sol"; +import { Schema, SchemaLib } from "../Schema.sol"; +import { PackedCounter, PackedCounterLib } from "../PackedCounter.sol"; + +uint256 constant _tableId = uint256(keccak256("/store_internals/tables/Vector2")); +uint256 constant Vector2TableId = _tableId; + +struct Vector2Data { + uint32 x; + uint32 y; +} + +library Vector2 { + /** Get the table's schema */ + function getSchema() internal pure returns (Schema) { + SchemaType[] memory _schema = new SchemaType[](2); + _schema[0] = SchemaType.UINT32; + _schema[1] = SchemaType.UINT32; + + return SchemaLib.encode(_schema); + } + + /** Register the table's schema */ + function registerSchema() internal { + StoreSwitch.registerSchema(_tableId, getSchema()); + } + + /** Get x */ + function getX(bytes32 key) internal view returns (uint32 x) { + bytes32[] memory _primaryKeys = new bytes32[](1); + + _primaryKeys[0] = bytes32(key); + + bytes memory _blob = StoreSwitch.getField(_tableId, _primaryKeys, 0); + return uint32(Bytes.slice4(_blob, 0)); + } + + /** Set x */ + function setX(bytes32 key, uint32 x) internal { + bytes32[] memory _primaryKeys = new bytes32[](1); + + _primaryKeys[0] = bytes32(key); + + StoreSwitch.setField(_tableId, _primaryKeys, 0, abi.encodePacked(x)); + } + + /** Get y */ + function getY(bytes32 key) internal view returns (uint32 y) { + bytes32[] memory _primaryKeys = new bytes32[](1); + + _primaryKeys[0] = bytes32(key); + + bytes memory _blob = StoreSwitch.getField(_tableId, _primaryKeys, 1); + return uint32(Bytes.slice4(_blob, 0)); + } + + /** Set y */ + function setY(bytes32 key, uint32 y) internal { + bytes32[] memory _primaryKeys = new bytes32[](1); + + _primaryKeys[0] = bytes32(key); + + StoreSwitch.setField(_tableId, _primaryKeys, 1, abi.encodePacked(y)); + } + + /** Get the full data */ + function get(bytes32 key) internal view returns (Vector2Data memory _table) { + bytes32[] memory _primaryKeys = new bytes32[](1); + + _primaryKeys[0] = bytes32(key); + + bytes memory _blob = StoreSwitch.getRecord(_tableId, _primaryKeys, getSchema()); + return decode(_blob); + } + + /** Set the full data using individual values */ + function set( + bytes32 key, + uint32 x, + uint32 y + ) internal { + bytes memory _data = abi.encodePacked(x, y); + + bytes32[] memory _primaryKeys = new bytes32[](1); + + _primaryKeys[0] = bytes32(key); + + StoreSwitch.setRecord(_tableId, _primaryKeys, _data); + } + + /** Set the full data using the data struct */ + function set(bytes32 key, Vector2Data memory _table) internal { + set(key, _table.x, _table.y); + } + + /** Decode the tightly packed blob using this table's schema */ + function decode(bytes memory _blob) internal pure returns (Vector2Data memory _table) { + _table.x = uint32(Bytes.slice4(_blob, 0)); + + _table.y = uint32(Bytes.slice4(_blob, 4)); + } + + /* Delete all data for given keys */ + function deleteRecord(bytes32 key) internal { + bytes32[] memory _primaryKeys = new bytes32[](1); + + _primaryKeys[0] = bytes32(key); + + StoreSwitch.deleteRecord(_tableId, _primaryKeys); + } +} diff --git a/packages/store/src/tightcoder/DecodeSlice.ejs b/packages/store/src/tightcoder/DecodeSlice.ejs new file mode 100644 index 0000000000..e68ba0a316 --- /dev/null +++ b/packages/store/src/tightcoder/DecodeSlice.ejs @@ -0,0 +1,83 @@ +// SPDX-License-Identifier: MIT +pragma solidity >=0.8.0; + +/* Autogenerated via `yarn codegen`. Do not edit the `.sol` file manually. */ + +import { TightCoder } from "./TightCoder.sol"; +import { Slice } from "../Slice.sol"; +import { SchemaType } from "../Types.sol"; + +library DecodeSlice { + /************************************************************************ + * + * uint8 - uint256 + * + ************************************************************************/ +<% for (let i = 8; i <= 256; i += 8) { -%> + + function decodeArray_uint<%= i %>(Slice self) internal pure returns (uint<%= i %>[] memory output) { + bytes32[] memory genericArray = TightCoder.decode(self, <%= i / 8 %>, false); + assembly { + output := genericArray + } + } +<% } -%> + + /************************************************************************ + * + * int8 - int256 + * + ************************************************************************/ +<% for (let i = 8; i <= 256; i += 8) { -%> + + function decodeArray_int<%= i %>(Slice self) internal pure returns (int<%= i %>[] memory output) { + bytes32[] memory genericArray = TightCoder.decode(self, <%= i / 8 %>, false); + assembly { + output := genericArray + } + } +<% } -%> + + /************************************************************************ + * + * bytes1 - bytes32 + * + ************************************************************************/ +<% for (let i = 1; i <= 32; i += 1) { -%> + + function decodeArray_bytes<%= i %>(Slice self) internal pure returns (bytes<%= i %>[] memory output) { + bytes32[] memory genericArray = TightCoder.decode(self, <%= i %>, true); + assembly { + output := genericArray + } + } +<% } -%> + + /************************************************************************ + * + * Other types + * + ************************************************************************/ + + function decodeArray_address(Slice self) internal pure returns (address[] memory output) { + // Note: internally address is right-aligned, like uint160 + bytes32[] memory genericArray = TightCoder.decode(self, 20, false); + assembly { + output := genericArray + } + } + + function decodeArray_bool(Slice self) internal pure returns (bool[] memory output) { + bytes32[] memory genericArray = TightCoder.decode(self, 1, false); + assembly { + output := genericArray + } + } + + function decodeArray_SchemaType(Slice self) internal pure returns (SchemaType[] memory output) { + bytes32[] memory genericArray = TightCoder.decode(self, 1, false); + assembly { + output := genericArray + } + } +} diff --git a/packages/store/src/tightcoder/DecodeSlice.sol b/packages/store/src/tightcoder/DecodeSlice.sol new file mode 100644 index 0000000000..260aa668a4 --- /dev/null +++ b/packages/store/src/tightcoder/DecodeSlice.sol @@ -0,0 +1,728 @@ +// SPDX-License-Identifier: MIT +pragma solidity >=0.8.0; + +/* Autogenerated via `yarn codegen`. Do not edit the `.sol` file manually. */ + +import { TightCoder } from "./TightCoder.sol"; +import { Slice } from "../Slice.sol"; +import { SchemaType } from "../Types.sol"; + +library DecodeSlice { + /************************************************************************ + * + * uint8 - uint256 + * + ************************************************************************/ + + function decodeArray_uint8(Slice self) internal pure returns (uint8[] memory output) { + bytes32[] memory genericArray = TightCoder.decode(self, 1, false); + assembly { + output := genericArray + } + } + + function decodeArray_uint16(Slice self) internal pure returns (uint16[] memory output) { + bytes32[] memory genericArray = TightCoder.decode(self, 2, false); + assembly { + output := genericArray + } + } + + function decodeArray_uint24(Slice self) internal pure returns (uint24[] memory output) { + bytes32[] memory genericArray = TightCoder.decode(self, 3, false); + assembly { + output := genericArray + } + } + + function decodeArray_uint32(Slice self) internal pure returns (uint32[] memory output) { + bytes32[] memory genericArray = TightCoder.decode(self, 4, false); + assembly { + output := genericArray + } + } + + function decodeArray_uint40(Slice self) internal pure returns (uint40[] memory output) { + bytes32[] memory genericArray = TightCoder.decode(self, 5, false); + assembly { + output := genericArray + } + } + + function decodeArray_uint48(Slice self) internal pure returns (uint48[] memory output) { + bytes32[] memory genericArray = TightCoder.decode(self, 6, false); + assembly { + output := genericArray + } + } + + function decodeArray_uint56(Slice self) internal pure returns (uint56[] memory output) { + bytes32[] memory genericArray = TightCoder.decode(self, 7, false); + assembly { + output := genericArray + } + } + + function decodeArray_uint64(Slice self) internal pure returns (uint64[] memory output) { + bytes32[] memory genericArray = TightCoder.decode(self, 8, false); + assembly { + output := genericArray + } + } + + function decodeArray_uint72(Slice self) internal pure returns (uint72[] memory output) { + bytes32[] memory genericArray = TightCoder.decode(self, 9, false); + assembly { + output := genericArray + } + } + + function decodeArray_uint80(Slice self) internal pure returns (uint80[] memory output) { + bytes32[] memory genericArray = TightCoder.decode(self, 10, false); + assembly { + output := genericArray + } + } + + function decodeArray_uint88(Slice self) internal pure returns (uint88[] memory output) { + bytes32[] memory genericArray = TightCoder.decode(self, 11, false); + assembly { + output := genericArray + } + } + + function decodeArray_uint96(Slice self) internal pure returns (uint96[] memory output) { + bytes32[] memory genericArray = TightCoder.decode(self, 12, false); + assembly { + output := genericArray + } + } + + function decodeArray_uint104(Slice self) internal pure returns (uint104[] memory output) { + bytes32[] memory genericArray = TightCoder.decode(self, 13, false); + assembly { + output := genericArray + } + } + + function decodeArray_uint112(Slice self) internal pure returns (uint112[] memory output) { + bytes32[] memory genericArray = TightCoder.decode(self, 14, false); + assembly { + output := genericArray + } + } + + function decodeArray_uint120(Slice self) internal pure returns (uint120[] memory output) { + bytes32[] memory genericArray = TightCoder.decode(self, 15, false); + assembly { + output := genericArray + } + } + + function decodeArray_uint128(Slice self) internal pure returns (uint128[] memory output) { + bytes32[] memory genericArray = TightCoder.decode(self, 16, false); + assembly { + output := genericArray + } + } + + function decodeArray_uint136(Slice self) internal pure returns (uint136[] memory output) { + bytes32[] memory genericArray = TightCoder.decode(self, 17, false); + assembly { + output := genericArray + } + } + + function decodeArray_uint144(Slice self) internal pure returns (uint144[] memory output) { + bytes32[] memory genericArray = TightCoder.decode(self, 18, false); + assembly { + output := genericArray + } + } + + function decodeArray_uint152(Slice self) internal pure returns (uint152[] memory output) { + bytes32[] memory genericArray = TightCoder.decode(self, 19, false); + assembly { + output := genericArray + } + } + + function decodeArray_uint160(Slice self) internal pure returns (uint160[] memory output) { + bytes32[] memory genericArray = TightCoder.decode(self, 20, false); + assembly { + output := genericArray + } + } + + function decodeArray_uint168(Slice self) internal pure returns (uint168[] memory output) { + bytes32[] memory genericArray = TightCoder.decode(self, 21, false); + assembly { + output := genericArray + } + } + + function decodeArray_uint176(Slice self) internal pure returns (uint176[] memory output) { + bytes32[] memory genericArray = TightCoder.decode(self, 22, false); + assembly { + output := genericArray + } + } + + function decodeArray_uint184(Slice self) internal pure returns (uint184[] memory output) { + bytes32[] memory genericArray = TightCoder.decode(self, 23, false); + assembly { + output := genericArray + } + } + + function decodeArray_uint192(Slice self) internal pure returns (uint192[] memory output) { + bytes32[] memory genericArray = TightCoder.decode(self, 24, false); + assembly { + output := genericArray + } + } + + function decodeArray_uint200(Slice self) internal pure returns (uint200[] memory output) { + bytes32[] memory genericArray = TightCoder.decode(self, 25, false); + assembly { + output := genericArray + } + } + + function decodeArray_uint208(Slice self) internal pure returns (uint208[] memory output) { + bytes32[] memory genericArray = TightCoder.decode(self, 26, false); + assembly { + output := genericArray + } + } + + function decodeArray_uint216(Slice self) internal pure returns (uint216[] memory output) { + bytes32[] memory genericArray = TightCoder.decode(self, 27, false); + assembly { + output := genericArray + } + } + + function decodeArray_uint224(Slice self) internal pure returns (uint224[] memory output) { + bytes32[] memory genericArray = TightCoder.decode(self, 28, false); + assembly { + output := genericArray + } + } + + function decodeArray_uint232(Slice self) internal pure returns (uint232[] memory output) { + bytes32[] memory genericArray = TightCoder.decode(self, 29, false); + assembly { + output := genericArray + } + } + + function decodeArray_uint240(Slice self) internal pure returns (uint240[] memory output) { + bytes32[] memory genericArray = TightCoder.decode(self, 30, false); + assembly { + output := genericArray + } + } + + function decodeArray_uint248(Slice self) internal pure returns (uint248[] memory output) { + bytes32[] memory genericArray = TightCoder.decode(self, 31, false); + assembly { + output := genericArray + } + } + + function decodeArray_uint256(Slice self) internal pure returns (uint256[] memory output) { + bytes32[] memory genericArray = TightCoder.decode(self, 32, false); + assembly { + output := genericArray + } + } + + /************************************************************************ + * + * int8 - int256 + * + ************************************************************************/ + + function decodeArray_int8(Slice self) internal pure returns (int8[] memory output) { + bytes32[] memory genericArray = TightCoder.decode(self, 1, false); + assembly { + output := genericArray + } + } + + function decodeArray_int16(Slice self) internal pure returns (int16[] memory output) { + bytes32[] memory genericArray = TightCoder.decode(self, 2, false); + assembly { + output := genericArray + } + } + + function decodeArray_int24(Slice self) internal pure returns (int24[] memory output) { + bytes32[] memory genericArray = TightCoder.decode(self, 3, false); + assembly { + output := genericArray + } + } + + function decodeArray_int32(Slice self) internal pure returns (int32[] memory output) { + bytes32[] memory genericArray = TightCoder.decode(self, 4, false); + assembly { + output := genericArray + } + } + + function decodeArray_int40(Slice self) internal pure returns (int40[] memory output) { + bytes32[] memory genericArray = TightCoder.decode(self, 5, false); + assembly { + output := genericArray + } + } + + function decodeArray_int48(Slice self) internal pure returns (int48[] memory output) { + bytes32[] memory genericArray = TightCoder.decode(self, 6, false); + assembly { + output := genericArray + } + } + + function decodeArray_int56(Slice self) internal pure returns (int56[] memory output) { + bytes32[] memory genericArray = TightCoder.decode(self, 7, false); + assembly { + output := genericArray + } + } + + function decodeArray_int64(Slice self) internal pure returns (int64[] memory output) { + bytes32[] memory genericArray = TightCoder.decode(self, 8, false); + assembly { + output := genericArray + } + } + + function decodeArray_int72(Slice self) internal pure returns (int72[] memory output) { + bytes32[] memory genericArray = TightCoder.decode(self, 9, false); + assembly { + output := genericArray + } + } + + function decodeArray_int80(Slice self) internal pure returns (int80[] memory output) { + bytes32[] memory genericArray = TightCoder.decode(self, 10, false); + assembly { + output := genericArray + } + } + + function decodeArray_int88(Slice self) internal pure returns (int88[] memory output) { + bytes32[] memory genericArray = TightCoder.decode(self, 11, false); + assembly { + output := genericArray + } + } + + function decodeArray_int96(Slice self) internal pure returns (int96[] memory output) { + bytes32[] memory genericArray = TightCoder.decode(self, 12, false); + assembly { + output := genericArray + } + } + + function decodeArray_int104(Slice self) internal pure returns (int104[] memory output) { + bytes32[] memory genericArray = TightCoder.decode(self, 13, false); + assembly { + output := genericArray + } + } + + function decodeArray_int112(Slice self) internal pure returns (int112[] memory output) { + bytes32[] memory genericArray = TightCoder.decode(self, 14, false); + assembly { + output := genericArray + } + } + + function decodeArray_int120(Slice self) internal pure returns (int120[] memory output) { + bytes32[] memory genericArray = TightCoder.decode(self, 15, false); + assembly { + output := genericArray + } + } + + function decodeArray_int128(Slice self) internal pure returns (int128[] memory output) { + bytes32[] memory genericArray = TightCoder.decode(self, 16, false); + assembly { + output := genericArray + } + } + + function decodeArray_int136(Slice self) internal pure returns (int136[] memory output) { + bytes32[] memory genericArray = TightCoder.decode(self, 17, false); + assembly { + output := genericArray + } + } + + function decodeArray_int144(Slice self) internal pure returns (int144[] memory output) { + bytes32[] memory genericArray = TightCoder.decode(self, 18, false); + assembly { + output := genericArray + } + } + + function decodeArray_int152(Slice self) internal pure returns (int152[] memory output) { + bytes32[] memory genericArray = TightCoder.decode(self, 19, false); + assembly { + output := genericArray + } + } + + function decodeArray_int160(Slice self) internal pure returns (int160[] memory output) { + bytes32[] memory genericArray = TightCoder.decode(self, 20, false); + assembly { + output := genericArray + } + } + + function decodeArray_int168(Slice self) internal pure returns (int168[] memory output) { + bytes32[] memory genericArray = TightCoder.decode(self, 21, false); + assembly { + output := genericArray + } + } + + function decodeArray_int176(Slice self) internal pure returns (int176[] memory output) { + bytes32[] memory genericArray = TightCoder.decode(self, 22, false); + assembly { + output := genericArray + } + } + + function decodeArray_int184(Slice self) internal pure returns (int184[] memory output) { + bytes32[] memory genericArray = TightCoder.decode(self, 23, false); + assembly { + output := genericArray + } + } + + function decodeArray_int192(Slice self) internal pure returns (int192[] memory output) { + bytes32[] memory genericArray = TightCoder.decode(self, 24, false); + assembly { + output := genericArray + } + } + + function decodeArray_int200(Slice self) internal pure returns (int200[] memory output) { + bytes32[] memory genericArray = TightCoder.decode(self, 25, false); + assembly { + output := genericArray + } + } + + function decodeArray_int208(Slice self) internal pure returns (int208[] memory output) { + bytes32[] memory genericArray = TightCoder.decode(self, 26, false); + assembly { + output := genericArray + } + } + + function decodeArray_int216(Slice self) internal pure returns (int216[] memory output) { + bytes32[] memory genericArray = TightCoder.decode(self, 27, false); + assembly { + output := genericArray + } + } + + function decodeArray_int224(Slice self) internal pure returns (int224[] memory output) { + bytes32[] memory genericArray = TightCoder.decode(self, 28, false); + assembly { + output := genericArray + } + } + + function decodeArray_int232(Slice self) internal pure returns (int232[] memory output) { + bytes32[] memory genericArray = TightCoder.decode(self, 29, false); + assembly { + output := genericArray + } + } + + function decodeArray_int240(Slice self) internal pure returns (int240[] memory output) { + bytes32[] memory genericArray = TightCoder.decode(self, 30, false); + assembly { + output := genericArray + } + } + + function decodeArray_int248(Slice self) internal pure returns (int248[] memory output) { + bytes32[] memory genericArray = TightCoder.decode(self, 31, false); + assembly { + output := genericArray + } + } + + function decodeArray_int256(Slice self) internal pure returns (int256[] memory output) { + bytes32[] memory genericArray = TightCoder.decode(self, 32, false); + assembly { + output := genericArray + } + } + + /************************************************************************ + * + * bytes1 - bytes32 + * + ************************************************************************/ + + function decodeArray_bytes1(Slice self) internal pure returns (bytes1[] memory output) { + bytes32[] memory genericArray = TightCoder.decode(self, 1, true); + assembly { + output := genericArray + } + } + + function decodeArray_bytes2(Slice self) internal pure returns (bytes2[] memory output) { + bytes32[] memory genericArray = TightCoder.decode(self, 2, true); + assembly { + output := genericArray + } + } + + function decodeArray_bytes3(Slice self) internal pure returns (bytes3[] memory output) { + bytes32[] memory genericArray = TightCoder.decode(self, 3, true); + assembly { + output := genericArray + } + } + + function decodeArray_bytes4(Slice self) internal pure returns (bytes4[] memory output) { + bytes32[] memory genericArray = TightCoder.decode(self, 4, true); + assembly { + output := genericArray + } + } + + function decodeArray_bytes5(Slice self) internal pure returns (bytes5[] memory output) { + bytes32[] memory genericArray = TightCoder.decode(self, 5, true); + assembly { + output := genericArray + } + } + + function decodeArray_bytes6(Slice self) internal pure returns (bytes6[] memory output) { + bytes32[] memory genericArray = TightCoder.decode(self, 6, true); + assembly { + output := genericArray + } + } + + function decodeArray_bytes7(Slice self) internal pure returns (bytes7[] memory output) { + bytes32[] memory genericArray = TightCoder.decode(self, 7, true); + assembly { + output := genericArray + } + } + + function decodeArray_bytes8(Slice self) internal pure returns (bytes8[] memory output) { + bytes32[] memory genericArray = TightCoder.decode(self, 8, true); + assembly { + output := genericArray + } + } + + function decodeArray_bytes9(Slice self) internal pure returns (bytes9[] memory output) { + bytes32[] memory genericArray = TightCoder.decode(self, 9, true); + assembly { + output := genericArray + } + } + + function decodeArray_bytes10(Slice self) internal pure returns (bytes10[] memory output) { + bytes32[] memory genericArray = TightCoder.decode(self, 10, true); + assembly { + output := genericArray + } + } + + function decodeArray_bytes11(Slice self) internal pure returns (bytes11[] memory output) { + bytes32[] memory genericArray = TightCoder.decode(self, 11, true); + assembly { + output := genericArray + } + } + + function decodeArray_bytes12(Slice self) internal pure returns (bytes12[] memory output) { + bytes32[] memory genericArray = TightCoder.decode(self, 12, true); + assembly { + output := genericArray + } + } + + function decodeArray_bytes13(Slice self) internal pure returns (bytes13[] memory output) { + bytes32[] memory genericArray = TightCoder.decode(self, 13, true); + assembly { + output := genericArray + } + } + + function decodeArray_bytes14(Slice self) internal pure returns (bytes14[] memory output) { + bytes32[] memory genericArray = TightCoder.decode(self, 14, true); + assembly { + output := genericArray + } + } + + function decodeArray_bytes15(Slice self) internal pure returns (bytes15[] memory output) { + bytes32[] memory genericArray = TightCoder.decode(self, 15, true); + assembly { + output := genericArray + } + } + + function decodeArray_bytes16(Slice self) internal pure returns (bytes16[] memory output) { + bytes32[] memory genericArray = TightCoder.decode(self, 16, true); + assembly { + output := genericArray + } + } + + function decodeArray_bytes17(Slice self) internal pure returns (bytes17[] memory output) { + bytes32[] memory genericArray = TightCoder.decode(self, 17, true); + assembly { + output := genericArray + } + } + + function decodeArray_bytes18(Slice self) internal pure returns (bytes18[] memory output) { + bytes32[] memory genericArray = TightCoder.decode(self, 18, true); + assembly { + output := genericArray + } + } + + function decodeArray_bytes19(Slice self) internal pure returns (bytes19[] memory output) { + bytes32[] memory genericArray = TightCoder.decode(self, 19, true); + assembly { + output := genericArray + } + } + + function decodeArray_bytes20(Slice self) internal pure returns (bytes20[] memory output) { + bytes32[] memory genericArray = TightCoder.decode(self, 20, true); + assembly { + output := genericArray + } + } + + function decodeArray_bytes21(Slice self) internal pure returns (bytes21[] memory output) { + bytes32[] memory genericArray = TightCoder.decode(self, 21, true); + assembly { + output := genericArray + } + } + + function decodeArray_bytes22(Slice self) internal pure returns (bytes22[] memory output) { + bytes32[] memory genericArray = TightCoder.decode(self, 22, true); + assembly { + output := genericArray + } + } + + function decodeArray_bytes23(Slice self) internal pure returns (bytes23[] memory output) { + bytes32[] memory genericArray = TightCoder.decode(self, 23, true); + assembly { + output := genericArray + } + } + + function decodeArray_bytes24(Slice self) internal pure returns (bytes24[] memory output) { + bytes32[] memory genericArray = TightCoder.decode(self, 24, true); + assembly { + output := genericArray + } + } + + function decodeArray_bytes25(Slice self) internal pure returns (bytes25[] memory output) { + bytes32[] memory genericArray = TightCoder.decode(self, 25, true); + assembly { + output := genericArray + } + } + + function decodeArray_bytes26(Slice self) internal pure returns (bytes26[] memory output) { + bytes32[] memory genericArray = TightCoder.decode(self, 26, true); + assembly { + output := genericArray + } + } + + function decodeArray_bytes27(Slice self) internal pure returns (bytes27[] memory output) { + bytes32[] memory genericArray = TightCoder.decode(self, 27, true); + assembly { + output := genericArray + } + } + + function decodeArray_bytes28(Slice self) internal pure returns (bytes28[] memory output) { + bytes32[] memory genericArray = TightCoder.decode(self, 28, true); + assembly { + output := genericArray + } + } + + function decodeArray_bytes29(Slice self) internal pure returns (bytes29[] memory output) { + bytes32[] memory genericArray = TightCoder.decode(self, 29, true); + assembly { + output := genericArray + } + } + + function decodeArray_bytes30(Slice self) internal pure returns (bytes30[] memory output) { + bytes32[] memory genericArray = TightCoder.decode(self, 30, true); + assembly { + output := genericArray + } + } + + function decodeArray_bytes31(Slice self) internal pure returns (bytes31[] memory output) { + bytes32[] memory genericArray = TightCoder.decode(self, 31, true); + assembly { + output := genericArray + } + } + + function decodeArray_bytes32(Slice self) internal pure returns (bytes32[] memory output) { + bytes32[] memory genericArray = TightCoder.decode(self, 32, true); + assembly { + output := genericArray + } + } + + /************************************************************************ + * + * Other types + * + ************************************************************************/ + + function decodeArray_address(Slice self) internal pure returns (address[] memory output) { + // Note: internally address is right-aligned, like uint160 + bytes32[] memory genericArray = TightCoder.decode(self, 20, false); + assembly { + output := genericArray + } + } + + function decodeArray_bool(Slice self) internal pure returns (bool[] memory output) { + bytes32[] memory genericArray = TightCoder.decode(self, 1, false); + assembly { + output := genericArray + } + } + + function decodeArray_SchemaType(Slice self) internal pure returns (SchemaType[] memory output) { + bytes32[] memory genericArray = TightCoder.decode(self, 1, false); + assembly { + output := genericArray + } + } +} diff --git a/packages/store/src/tightcoder/EncodeArray.ejs b/packages/store/src/tightcoder/EncodeArray.ejs new file mode 100644 index 0000000000..a505a37d51 --- /dev/null +++ b/packages/store/src/tightcoder/EncodeArray.ejs @@ -0,0 +1,98 @@ +// SPDX-License-Identifier: MIT +pragma solidity >=0.8.0; + +/* Autogenerated via `yarn codegen`. Do not edit the `.sol` file manually. */ + +import { SchemaType } from "../Types.sol"; +import { TightCoder } from "./TightCoder.sol"; + +library EncodeArray { + /************************************************************************ + * + * uint8 - uint256 + * + ************************************************************************/ +<% for (let i = 8; i <= 256; i += 8) { -%> + + function encode(uint<%= i %>[] memory input) internal pure returns (bytes memory output) { + bytes32[] memory _genericArray; + assembly { + _genericArray := input + } + return TightCoder.encode(_genericArray, <%= i / 8 %>, false); + } +<% } -%> + + /************************************************************************ + * + * int8 - int256 + * + ************************************************************************/ +<% for (let i = 8; i <= 256; i += 8) { -%> + + function encode(int<%= i %>[] memory input) internal pure returns (bytes memory output) { + bytes32[] memory _genericArray; + assembly { + _genericArray := input + } + return TightCoder.encode(_genericArray, <%= i / 8 %>, false); + } +<% } -%> + + /************************************************************************ + * + * bytes1 - bytes32 + * + ************************************************************************/ +<% for (let i = 1; i <= 32; i += 1) { -%> + + function encode(bytes<%= i %>[] memory input) internal pure returns (bytes memory output) { + bytes32[] memory _genericArray; + assembly { + _genericArray := input + } + return TightCoder.encode(_genericArray, <%= i %>, true); + } +<% } -%> + + /************************************************************************ + * + * Other types + * + ************************************************************************/ + + function encode(address[] memory input) internal pure returns (bytes memory output) { + bytes32[] memory _genericArray; + assembly { + _genericArray := input + } + return TightCoder.encode(_genericArray, 20, false); + } + + function encode(bool[] memory input) internal pure returns (bytes memory output) { + bytes32[] memory _genericArray; + assembly { + _genericArray := input + } + return TightCoder.encode(_genericArray, 1, false); + } + + function encode(SchemaType[] memory input) internal pure returns (bytes memory output) { + bytes32[] memory _genericArray; + assembly { + _genericArray := input + } + return TightCoder.encode(_genericArray, 1, false); + } + + /** + * Converts a `bytes` memory array to a single `bytes` memory value. + * TODO: optimize gas cost + */ + function encode(bytes[] memory input) internal pure returns (bytes memory output) { + output = new bytes(0); + for (uint256 i; i < input.length; i++) { + output = bytes.concat(output, input[i]); + } + } +} diff --git a/packages/store/src/tightcoder/EncodeArray.sol b/packages/store/src/tightcoder/EncodeArray.sol new file mode 100644 index 0000000000..c39241203b --- /dev/null +++ b/packages/store/src/tightcoder/EncodeArray.sol @@ -0,0 +1,836 @@ +// SPDX-License-Identifier: MIT +pragma solidity >=0.8.0; + +/* Autogenerated via `yarn codegen`. Do not edit the `.sol` file manually. */ + +import { SchemaType } from "../Types.sol"; +import { TightCoder } from "./TightCoder.sol"; + +library EncodeArray { + /************************************************************************ + * + * uint8 - uint256 + * + ************************************************************************/ + + function encode(uint8[] memory input) internal pure returns (bytes memory output) { + bytes32[] memory _genericArray; + assembly { + _genericArray := input + } + return TightCoder.encode(_genericArray, 1, false); + } + + function encode(uint16[] memory input) internal pure returns (bytes memory output) { + bytes32[] memory _genericArray; + assembly { + _genericArray := input + } + return TightCoder.encode(_genericArray, 2, false); + } + + function encode(uint24[] memory input) internal pure returns (bytes memory output) { + bytes32[] memory _genericArray; + assembly { + _genericArray := input + } + return TightCoder.encode(_genericArray, 3, false); + } + + function encode(uint32[] memory input) internal pure returns (bytes memory output) { + bytes32[] memory _genericArray; + assembly { + _genericArray := input + } + return TightCoder.encode(_genericArray, 4, false); + } + + function encode(uint40[] memory input) internal pure returns (bytes memory output) { + bytes32[] memory _genericArray; + assembly { + _genericArray := input + } + return TightCoder.encode(_genericArray, 5, false); + } + + function encode(uint48[] memory input) internal pure returns (bytes memory output) { + bytes32[] memory _genericArray; + assembly { + _genericArray := input + } + return TightCoder.encode(_genericArray, 6, false); + } + + function encode(uint56[] memory input) internal pure returns (bytes memory output) { + bytes32[] memory _genericArray; + assembly { + _genericArray := input + } + return TightCoder.encode(_genericArray, 7, false); + } + + function encode(uint64[] memory input) internal pure returns (bytes memory output) { + bytes32[] memory _genericArray; + assembly { + _genericArray := input + } + return TightCoder.encode(_genericArray, 8, false); + } + + function encode(uint72[] memory input) internal pure returns (bytes memory output) { + bytes32[] memory _genericArray; + assembly { + _genericArray := input + } + return TightCoder.encode(_genericArray, 9, false); + } + + function encode(uint80[] memory input) internal pure returns (bytes memory output) { + bytes32[] memory _genericArray; + assembly { + _genericArray := input + } + return TightCoder.encode(_genericArray, 10, false); + } + + function encode(uint88[] memory input) internal pure returns (bytes memory output) { + bytes32[] memory _genericArray; + assembly { + _genericArray := input + } + return TightCoder.encode(_genericArray, 11, false); + } + + function encode(uint96[] memory input) internal pure returns (bytes memory output) { + bytes32[] memory _genericArray; + assembly { + _genericArray := input + } + return TightCoder.encode(_genericArray, 12, false); + } + + function encode(uint104[] memory input) internal pure returns (bytes memory output) { + bytes32[] memory _genericArray; + assembly { + _genericArray := input + } + return TightCoder.encode(_genericArray, 13, false); + } + + function encode(uint112[] memory input) internal pure returns (bytes memory output) { + bytes32[] memory _genericArray; + assembly { + _genericArray := input + } + return TightCoder.encode(_genericArray, 14, false); + } + + function encode(uint120[] memory input) internal pure returns (bytes memory output) { + bytes32[] memory _genericArray; + assembly { + _genericArray := input + } + return TightCoder.encode(_genericArray, 15, false); + } + + function encode(uint128[] memory input) internal pure returns (bytes memory output) { + bytes32[] memory _genericArray; + assembly { + _genericArray := input + } + return TightCoder.encode(_genericArray, 16, false); + } + + function encode(uint136[] memory input) internal pure returns (bytes memory output) { + bytes32[] memory _genericArray; + assembly { + _genericArray := input + } + return TightCoder.encode(_genericArray, 17, false); + } + + function encode(uint144[] memory input) internal pure returns (bytes memory output) { + bytes32[] memory _genericArray; + assembly { + _genericArray := input + } + return TightCoder.encode(_genericArray, 18, false); + } + + function encode(uint152[] memory input) internal pure returns (bytes memory output) { + bytes32[] memory _genericArray; + assembly { + _genericArray := input + } + return TightCoder.encode(_genericArray, 19, false); + } + + function encode(uint160[] memory input) internal pure returns (bytes memory output) { + bytes32[] memory _genericArray; + assembly { + _genericArray := input + } + return TightCoder.encode(_genericArray, 20, false); + } + + function encode(uint168[] memory input) internal pure returns (bytes memory output) { + bytes32[] memory _genericArray; + assembly { + _genericArray := input + } + return TightCoder.encode(_genericArray, 21, false); + } + + function encode(uint176[] memory input) internal pure returns (bytes memory output) { + bytes32[] memory _genericArray; + assembly { + _genericArray := input + } + return TightCoder.encode(_genericArray, 22, false); + } + + function encode(uint184[] memory input) internal pure returns (bytes memory output) { + bytes32[] memory _genericArray; + assembly { + _genericArray := input + } + return TightCoder.encode(_genericArray, 23, false); + } + + function encode(uint192[] memory input) internal pure returns (bytes memory output) { + bytes32[] memory _genericArray; + assembly { + _genericArray := input + } + return TightCoder.encode(_genericArray, 24, false); + } + + function encode(uint200[] memory input) internal pure returns (bytes memory output) { + bytes32[] memory _genericArray; + assembly { + _genericArray := input + } + return TightCoder.encode(_genericArray, 25, false); + } + + function encode(uint208[] memory input) internal pure returns (bytes memory output) { + bytes32[] memory _genericArray; + assembly { + _genericArray := input + } + return TightCoder.encode(_genericArray, 26, false); + } + + function encode(uint216[] memory input) internal pure returns (bytes memory output) { + bytes32[] memory _genericArray; + assembly { + _genericArray := input + } + return TightCoder.encode(_genericArray, 27, false); + } + + function encode(uint224[] memory input) internal pure returns (bytes memory output) { + bytes32[] memory _genericArray; + assembly { + _genericArray := input + } + return TightCoder.encode(_genericArray, 28, false); + } + + function encode(uint232[] memory input) internal pure returns (bytes memory output) { + bytes32[] memory _genericArray; + assembly { + _genericArray := input + } + return TightCoder.encode(_genericArray, 29, false); + } + + function encode(uint240[] memory input) internal pure returns (bytes memory output) { + bytes32[] memory _genericArray; + assembly { + _genericArray := input + } + return TightCoder.encode(_genericArray, 30, false); + } + + function encode(uint248[] memory input) internal pure returns (bytes memory output) { + bytes32[] memory _genericArray; + assembly { + _genericArray := input + } + return TightCoder.encode(_genericArray, 31, false); + } + + function encode(uint256[] memory input) internal pure returns (bytes memory output) { + bytes32[] memory _genericArray; + assembly { + _genericArray := input + } + return TightCoder.encode(_genericArray, 32, false); + } + + /************************************************************************ + * + * int8 - int256 + * + ************************************************************************/ + + function encode(int8[] memory input) internal pure returns (bytes memory output) { + bytes32[] memory _genericArray; + assembly { + _genericArray := input + } + return TightCoder.encode(_genericArray, 1, false); + } + + function encode(int16[] memory input) internal pure returns (bytes memory output) { + bytes32[] memory _genericArray; + assembly { + _genericArray := input + } + return TightCoder.encode(_genericArray, 2, false); + } + + function encode(int24[] memory input) internal pure returns (bytes memory output) { + bytes32[] memory _genericArray; + assembly { + _genericArray := input + } + return TightCoder.encode(_genericArray, 3, false); + } + + function encode(int32[] memory input) internal pure returns (bytes memory output) { + bytes32[] memory _genericArray; + assembly { + _genericArray := input + } + return TightCoder.encode(_genericArray, 4, false); + } + + function encode(int40[] memory input) internal pure returns (bytes memory output) { + bytes32[] memory _genericArray; + assembly { + _genericArray := input + } + return TightCoder.encode(_genericArray, 5, false); + } + + function encode(int48[] memory input) internal pure returns (bytes memory output) { + bytes32[] memory _genericArray; + assembly { + _genericArray := input + } + return TightCoder.encode(_genericArray, 6, false); + } + + function encode(int56[] memory input) internal pure returns (bytes memory output) { + bytes32[] memory _genericArray; + assembly { + _genericArray := input + } + return TightCoder.encode(_genericArray, 7, false); + } + + function encode(int64[] memory input) internal pure returns (bytes memory output) { + bytes32[] memory _genericArray; + assembly { + _genericArray := input + } + return TightCoder.encode(_genericArray, 8, false); + } + + function encode(int72[] memory input) internal pure returns (bytes memory output) { + bytes32[] memory _genericArray; + assembly { + _genericArray := input + } + return TightCoder.encode(_genericArray, 9, false); + } + + function encode(int80[] memory input) internal pure returns (bytes memory output) { + bytes32[] memory _genericArray; + assembly { + _genericArray := input + } + return TightCoder.encode(_genericArray, 10, false); + } + + function encode(int88[] memory input) internal pure returns (bytes memory output) { + bytes32[] memory _genericArray; + assembly { + _genericArray := input + } + return TightCoder.encode(_genericArray, 11, false); + } + + function encode(int96[] memory input) internal pure returns (bytes memory output) { + bytes32[] memory _genericArray; + assembly { + _genericArray := input + } + return TightCoder.encode(_genericArray, 12, false); + } + + function encode(int104[] memory input) internal pure returns (bytes memory output) { + bytes32[] memory _genericArray; + assembly { + _genericArray := input + } + return TightCoder.encode(_genericArray, 13, false); + } + + function encode(int112[] memory input) internal pure returns (bytes memory output) { + bytes32[] memory _genericArray; + assembly { + _genericArray := input + } + return TightCoder.encode(_genericArray, 14, false); + } + + function encode(int120[] memory input) internal pure returns (bytes memory output) { + bytes32[] memory _genericArray; + assembly { + _genericArray := input + } + return TightCoder.encode(_genericArray, 15, false); + } + + function encode(int128[] memory input) internal pure returns (bytes memory output) { + bytes32[] memory _genericArray; + assembly { + _genericArray := input + } + return TightCoder.encode(_genericArray, 16, false); + } + + function encode(int136[] memory input) internal pure returns (bytes memory output) { + bytes32[] memory _genericArray; + assembly { + _genericArray := input + } + return TightCoder.encode(_genericArray, 17, false); + } + + function encode(int144[] memory input) internal pure returns (bytes memory output) { + bytes32[] memory _genericArray; + assembly { + _genericArray := input + } + return TightCoder.encode(_genericArray, 18, false); + } + + function encode(int152[] memory input) internal pure returns (bytes memory output) { + bytes32[] memory _genericArray; + assembly { + _genericArray := input + } + return TightCoder.encode(_genericArray, 19, false); + } + + function encode(int160[] memory input) internal pure returns (bytes memory output) { + bytes32[] memory _genericArray; + assembly { + _genericArray := input + } + return TightCoder.encode(_genericArray, 20, false); + } + + function encode(int168[] memory input) internal pure returns (bytes memory output) { + bytes32[] memory _genericArray; + assembly { + _genericArray := input + } + return TightCoder.encode(_genericArray, 21, false); + } + + function encode(int176[] memory input) internal pure returns (bytes memory output) { + bytes32[] memory _genericArray; + assembly { + _genericArray := input + } + return TightCoder.encode(_genericArray, 22, false); + } + + function encode(int184[] memory input) internal pure returns (bytes memory output) { + bytes32[] memory _genericArray; + assembly { + _genericArray := input + } + return TightCoder.encode(_genericArray, 23, false); + } + + function encode(int192[] memory input) internal pure returns (bytes memory output) { + bytes32[] memory _genericArray; + assembly { + _genericArray := input + } + return TightCoder.encode(_genericArray, 24, false); + } + + function encode(int200[] memory input) internal pure returns (bytes memory output) { + bytes32[] memory _genericArray; + assembly { + _genericArray := input + } + return TightCoder.encode(_genericArray, 25, false); + } + + function encode(int208[] memory input) internal pure returns (bytes memory output) { + bytes32[] memory _genericArray; + assembly { + _genericArray := input + } + return TightCoder.encode(_genericArray, 26, false); + } + + function encode(int216[] memory input) internal pure returns (bytes memory output) { + bytes32[] memory _genericArray; + assembly { + _genericArray := input + } + return TightCoder.encode(_genericArray, 27, false); + } + + function encode(int224[] memory input) internal pure returns (bytes memory output) { + bytes32[] memory _genericArray; + assembly { + _genericArray := input + } + return TightCoder.encode(_genericArray, 28, false); + } + + function encode(int232[] memory input) internal pure returns (bytes memory output) { + bytes32[] memory _genericArray; + assembly { + _genericArray := input + } + return TightCoder.encode(_genericArray, 29, false); + } + + function encode(int240[] memory input) internal pure returns (bytes memory output) { + bytes32[] memory _genericArray; + assembly { + _genericArray := input + } + return TightCoder.encode(_genericArray, 30, false); + } + + function encode(int248[] memory input) internal pure returns (bytes memory output) { + bytes32[] memory _genericArray; + assembly { + _genericArray := input + } + return TightCoder.encode(_genericArray, 31, false); + } + + function encode(int256[] memory input) internal pure returns (bytes memory output) { + bytes32[] memory _genericArray; + assembly { + _genericArray := input + } + return TightCoder.encode(_genericArray, 32, false); + } + + /************************************************************************ + * + * bytes1 - bytes32 + * + ************************************************************************/ + + function encode(bytes1[] memory input) internal pure returns (bytes memory output) { + bytes32[] memory _genericArray; + assembly { + _genericArray := input + } + return TightCoder.encode(_genericArray, 1, true); + } + + function encode(bytes2[] memory input) internal pure returns (bytes memory output) { + bytes32[] memory _genericArray; + assembly { + _genericArray := input + } + return TightCoder.encode(_genericArray, 2, true); + } + + function encode(bytes3[] memory input) internal pure returns (bytes memory output) { + bytes32[] memory _genericArray; + assembly { + _genericArray := input + } + return TightCoder.encode(_genericArray, 3, true); + } + + function encode(bytes4[] memory input) internal pure returns (bytes memory output) { + bytes32[] memory _genericArray; + assembly { + _genericArray := input + } + return TightCoder.encode(_genericArray, 4, true); + } + + function encode(bytes5[] memory input) internal pure returns (bytes memory output) { + bytes32[] memory _genericArray; + assembly { + _genericArray := input + } + return TightCoder.encode(_genericArray, 5, true); + } + + function encode(bytes6[] memory input) internal pure returns (bytes memory output) { + bytes32[] memory _genericArray; + assembly { + _genericArray := input + } + return TightCoder.encode(_genericArray, 6, true); + } + + function encode(bytes7[] memory input) internal pure returns (bytes memory output) { + bytes32[] memory _genericArray; + assembly { + _genericArray := input + } + return TightCoder.encode(_genericArray, 7, true); + } + + function encode(bytes8[] memory input) internal pure returns (bytes memory output) { + bytes32[] memory _genericArray; + assembly { + _genericArray := input + } + return TightCoder.encode(_genericArray, 8, true); + } + + function encode(bytes9[] memory input) internal pure returns (bytes memory output) { + bytes32[] memory _genericArray; + assembly { + _genericArray := input + } + return TightCoder.encode(_genericArray, 9, true); + } + + function encode(bytes10[] memory input) internal pure returns (bytes memory output) { + bytes32[] memory _genericArray; + assembly { + _genericArray := input + } + return TightCoder.encode(_genericArray, 10, true); + } + + function encode(bytes11[] memory input) internal pure returns (bytes memory output) { + bytes32[] memory _genericArray; + assembly { + _genericArray := input + } + return TightCoder.encode(_genericArray, 11, true); + } + + function encode(bytes12[] memory input) internal pure returns (bytes memory output) { + bytes32[] memory _genericArray; + assembly { + _genericArray := input + } + return TightCoder.encode(_genericArray, 12, true); + } + + function encode(bytes13[] memory input) internal pure returns (bytes memory output) { + bytes32[] memory _genericArray; + assembly { + _genericArray := input + } + return TightCoder.encode(_genericArray, 13, true); + } + + function encode(bytes14[] memory input) internal pure returns (bytes memory output) { + bytes32[] memory _genericArray; + assembly { + _genericArray := input + } + return TightCoder.encode(_genericArray, 14, true); + } + + function encode(bytes15[] memory input) internal pure returns (bytes memory output) { + bytes32[] memory _genericArray; + assembly { + _genericArray := input + } + return TightCoder.encode(_genericArray, 15, true); + } + + function encode(bytes16[] memory input) internal pure returns (bytes memory output) { + bytes32[] memory _genericArray; + assembly { + _genericArray := input + } + return TightCoder.encode(_genericArray, 16, true); + } + + function encode(bytes17[] memory input) internal pure returns (bytes memory output) { + bytes32[] memory _genericArray; + assembly { + _genericArray := input + } + return TightCoder.encode(_genericArray, 17, true); + } + + function encode(bytes18[] memory input) internal pure returns (bytes memory output) { + bytes32[] memory _genericArray; + assembly { + _genericArray := input + } + return TightCoder.encode(_genericArray, 18, true); + } + + function encode(bytes19[] memory input) internal pure returns (bytes memory output) { + bytes32[] memory _genericArray; + assembly { + _genericArray := input + } + return TightCoder.encode(_genericArray, 19, true); + } + + function encode(bytes20[] memory input) internal pure returns (bytes memory output) { + bytes32[] memory _genericArray; + assembly { + _genericArray := input + } + return TightCoder.encode(_genericArray, 20, true); + } + + function encode(bytes21[] memory input) internal pure returns (bytes memory output) { + bytes32[] memory _genericArray; + assembly { + _genericArray := input + } + return TightCoder.encode(_genericArray, 21, true); + } + + function encode(bytes22[] memory input) internal pure returns (bytes memory output) { + bytes32[] memory _genericArray; + assembly { + _genericArray := input + } + return TightCoder.encode(_genericArray, 22, true); + } + + function encode(bytes23[] memory input) internal pure returns (bytes memory output) { + bytes32[] memory _genericArray; + assembly { + _genericArray := input + } + return TightCoder.encode(_genericArray, 23, true); + } + + function encode(bytes24[] memory input) internal pure returns (bytes memory output) { + bytes32[] memory _genericArray; + assembly { + _genericArray := input + } + return TightCoder.encode(_genericArray, 24, true); + } + + function encode(bytes25[] memory input) internal pure returns (bytes memory output) { + bytes32[] memory _genericArray; + assembly { + _genericArray := input + } + return TightCoder.encode(_genericArray, 25, true); + } + + function encode(bytes26[] memory input) internal pure returns (bytes memory output) { + bytes32[] memory _genericArray; + assembly { + _genericArray := input + } + return TightCoder.encode(_genericArray, 26, true); + } + + function encode(bytes27[] memory input) internal pure returns (bytes memory output) { + bytes32[] memory _genericArray; + assembly { + _genericArray := input + } + return TightCoder.encode(_genericArray, 27, true); + } + + function encode(bytes28[] memory input) internal pure returns (bytes memory output) { + bytes32[] memory _genericArray; + assembly { + _genericArray := input + } + return TightCoder.encode(_genericArray, 28, true); + } + + function encode(bytes29[] memory input) internal pure returns (bytes memory output) { + bytes32[] memory _genericArray; + assembly { + _genericArray := input + } + return TightCoder.encode(_genericArray, 29, true); + } + + function encode(bytes30[] memory input) internal pure returns (bytes memory output) { + bytes32[] memory _genericArray; + assembly { + _genericArray := input + } + return TightCoder.encode(_genericArray, 30, true); + } + + function encode(bytes31[] memory input) internal pure returns (bytes memory output) { + bytes32[] memory _genericArray; + assembly { + _genericArray := input + } + return TightCoder.encode(_genericArray, 31, true); + } + + function encode(bytes32[] memory input) internal pure returns (bytes memory output) { + bytes32[] memory _genericArray; + assembly { + _genericArray := input + } + return TightCoder.encode(_genericArray, 32, true); + } + + /************************************************************************ + * + * Other types + * + ************************************************************************/ + + function encode(address[] memory input) internal pure returns (bytes memory output) { + bytes32[] memory _genericArray; + assembly { + _genericArray := input + } + return TightCoder.encode(_genericArray, 20, false); + } + + function encode(bool[] memory input) internal pure returns (bytes memory output) { + bytes32[] memory _genericArray; + assembly { + _genericArray := input + } + return TightCoder.encode(_genericArray, 1, false); + } + + function encode(SchemaType[] memory input) internal pure returns (bytes memory output) { + bytes32[] memory _genericArray; + assembly { + _genericArray := input + } + return TightCoder.encode(_genericArray, 1, false); + } + + /** + * Converts a `bytes` memory array to a single `bytes` memory value. + * TODO: optimize gas cost + */ + function encode(bytes[] memory input) internal pure returns (bytes memory output) { + output = new bytes(0); + for (uint256 i; i < input.length; i++) { + output = bytes.concat(output, input[i]); + } + } +} diff --git a/packages/store/src/tightcoder/TightCoder.sol b/packages/store/src/tightcoder/TightCoder.sol new file mode 100644 index 0000000000..b0b0d77261 --- /dev/null +++ b/packages/store/src/tightcoder/TightCoder.sol @@ -0,0 +1,113 @@ +// SPDX-License-Identifier: MIT +pragma solidity >=0.8.0; + +import { Slice, SliceLib } from "../Slice.sol"; +import { SchemaType } from "../Types.sol"; + +library TightCoder { + /** + * @dev Copies the array to the location of `packedSlice`, + * tightly packing it using the given size per element (in bytes) + * + * TODO this function is currently not used externally and will be changed in the future + * (see https://github.com/latticexyz/mud/issues/444) + */ + function _encodeToLocation( + bytes32[] memory array, + Slice packedSlice, + uint256 elementSize, + bool leftAligned + ) private pure { + uint256 arrayLength = array.length; + uint256 packedPointer = packedSlice.pointer(); + uint256 shiftLeft = leftAligned ? 0 : 256 - elementSize * 8; + + // TODO temporary check to catch bugs, either remove it or use a custom error + // (see https://github.com/latticexyz/mud/issues/444) + uint256 packedLength = arrayLength * elementSize; + if (packedLength > packedSlice.length()) { + revert("packFromArray: insufficient allocated packedSlice length"); + } + + /// @solidity memory-safe-assembly + assembly { + for { + let i := 0 + let arrayCursor := add(array, 0x20) // skip array length + let packedCursor := packedPointer + } lt(i, arrayLength) { + // Loop until we reach the end of the array + i := add(i, 1) + arrayCursor := add(arrayCursor, 0x20) // increment array pointer by one word + packedCursor := add(packedCursor, elementSize) // increment packed pointer by one element size + } { + mstore(packedCursor, shl(shiftLeft, mload(arrayCursor))) // pack one array element + } + } + } + + /** + * @dev Copies the array to a new bytes array, + * tightly packing it using the given size per element (in bytes) + */ + function encode( + bytes32[] memory array, + uint256 elementSize, + bool leftAligned + ) internal pure returns (bytes memory data) { + uint256 packedLength = array.length * elementSize; + data = new bytes(packedLength); + _encodeToLocation(array, SliceLib.fromBytes(data), elementSize, leftAligned); + } + + /** + * @dev Unpacks the slice to a new memory location + * and lays it out like a memory array with the given size per element (in bytes) + * @return array a generic array, needs to be casted to the expected type using assembly + */ + function decode( + Slice packedSlice, + uint256 elementSize, + bool leftAligned + ) internal pure returns (bytes32[] memory array) { + uint256 packedPointer = packedSlice.pointer(); + uint256 packedLength = packedSlice.length(); + uint256 padLeft = leftAligned ? 0 : 256 - elementSize * 8; + // Array length (number of elements) + uint256 arrayLength; + unchecked { + arrayLength = packedLength / elementSize; + } + + // TODO temporary check to catch bugs, either remove it or use a custom error + // (see https://github.com/latticexyz/mud/issues/444) + if (packedLength % elementSize != 0) { + revert("unpackToArray: packedLength must be a multiple of elementSize"); + } + + /// @solidity memory-safe-assembly + assembly { + // Allocate a word for each element, and a word for the array's length + let allocateBytes := add(mul(arrayLength, 32), 0x20) + // Allocate memory and update the free memory pointer + array := mload(0x40) + mstore(0x40, add(array, allocateBytes)) + + // Store array length + mstore(array, arrayLength) + + for { + let i := 0 + let arrayCursor := add(array, 0x20) // skip array length + let packedCursor := packedPointer + } lt(i, arrayLength) { + // Loop until we reach the end of the array + i := add(i, 1) + arrayCursor := add(arrayCursor, 0x20) // increment array pointer by one word + packedCursor := add(packedCursor, elementSize) // increment packed pointer by one element size + } { + mstore(arrayCursor, shr(padLeft, mload(packedCursor))) // unpack one array element + } + } + } +} diff --git a/packages/store/tasks/compile.ts b/packages/store/tasks/compile.ts new file mode 100644 index 0000000000..65335021b4 --- /dev/null +++ b/packages/store/tasks/compile.ts @@ -0,0 +1,38 @@ +import { TASK_COMPILE_SOLIDITY } from "hardhat/builtin-tasks/task-names"; +import * as fs from "fs"; +import * as path from "path"; +import { subtask } from "hardhat/config"; + +subtask(TASK_COMPILE_SOLIDITY).setAction(async (_: { force: boolean; quiet: boolean }, { config }, runSuper) => { + console.log("Symlinking forge-style libraries"); + const symlinks: string[] = []; + const remappings = fs + .readFileSync("remappings.txt") + .toString() + .split("\n") + .filter((r) => r.length > 0) + .map((r) => r.split("=")); + + console.log("remappings", remappings); + for (const [library, libraryPath] of remappings) { + const symlinkPath = path.join(process.cwd(), library.replace("/", "")); + console.log("Adding symlink at path: " + symlinkPath); + if (fs.existsSync(symlinkPath)) { + console.warn("symlink already exists!"); + } else { + const libPath = path.join(config.paths.sources, "..", libraryPath); + fs.symlinkSync(libPath, symlinkPath, "dir"); + } + symlinks.push(symlinkPath); + } + try { + await runSuper(); + } catch (e) { + console.error(e); + } finally { + for (const symlink of symlinks) { + console.log("Removing symlink at path: " + symlink); + fs.unlinkSync(symlink); + } + } +}); diff --git a/packages/store/test/Bytes.t.sol b/packages/store/test/Bytes.t.sol new file mode 100644 index 0000000000..ac8fbcbe9c --- /dev/null +++ b/packages/store/test/Bytes.t.sol @@ -0,0 +1,122 @@ +// SPDX-License-Identifier: MIT +pragma solidity >=0.8.0; + +import "forge-std/Test.sol"; +import { Bytes } from "../src/Bytes.sol"; + +contract BytesTest is Test { + function testToBytes32() public { + bytes memory input = new bytes(32); + input[0] = 0x01; + input[31] = 0x02; + + // !gasreport create bytes32 from bytes memory with offset 0 + bytes32 output = Bytes.toBytes32(input, 0); + + assertEq(uint256(output), 0x0100000000000000000000000000000000000000000000000000000000000002); + } + + function testToBytes32CrossWord() public { + bytes memory input = new bytes(64); + input[0 + 16] = 0x01; + input[31 + 16] = 0x02; + + // !gasreport create bytes32 from bytes memory with offset 16 + bytes32 output = Bytes.toBytes32(input, 16); + + assertEq(uint256(output), 0x0100000000000000000000000000000000000000000000000000000000000002); + } + + function testEquals() public { + bytes memory a = bytes("a"); + bytes memory b = bytes("a"); + + // !gasreport compare equal bytes + bool equals = Bytes.equals(a, b); + + assertTrue(equals); + } + + function testEqualsFalse() public { + bytes memory a = bytes("a"); + bytes memory b = bytes("b"); + + // !gasreport compare unequal bytes + bool equals = Bytes.equals(a, b); + + assertFalse(equals); + } + + function testEqualsFalseDiffLength() public { + bytes memory a = bytes("a"); + bytes memory b = bytes("aa"); + assertFalse(Bytes.equals(a, b)); + } + + // TODO: add tests for other sliceX functions + function testSlice3() public { + bytes memory a = new bytes(5); + a[0] = 0x01; + a[1] = 0x02; + a[2] = 0x03; + a[3] = 0x04; + a[4] = 0x05; + + // !gasreport slice bytes3 with offset 1 + bytes3 b = Bytes.slice3(a, 1); + + assertEq(b.length, 3); + assertEq(uint256(uint8(b[0])), 0x02); + assertEq(uint256(uint8(b[1])), 0x03); + assertEq(uint256(uint8(b[2])), 0x04); + } + + function testSlice32() public { + bytes32 original = keccak256("some data"); + bytes memory input = abi.encodePacked(bytes10(keccak256("irrelevant data")), original); + + // !gasreport slice bytes32 with offset 10 + bytes32 output = Bytes.slice32(input, 10); + + assertEq(output, original); + } + + function testSetBytes1() public { + bytes32 input = bytes32(0); + + // !gasreport set bytes1 in bytes32 + Bytes.setBytes1(input, 8, 0xff); + + assertEq(Bytes.setBytes1(input, 0, 0x01), bytes32(bytes1(0x01))); + assertEq(Bytes.setBytes1(input, 31, 0x01), bytes32(uint256(0x01))); + } + + function testSetBytes2() public { + bytes32 input = bytes32(0); + + // !gasreport set bytes2 in bytes32 + Bytes.setBytes2(input, 8, 0xffff); + + assertEq(Bytes.setBytes2(input, 0, 0xffff), bytes32(bytes2(0xffff))); + assertEq(Bytes.setBytes2(input, 30, 0xffff), bytes32(uint256(0xffff))); + } + + function testSetBytes4() public { + bytes32 input = bytes32(0); + + // !gasreport set bytes4 in bytes32 + Bytes.setBytes4(input, 8, 0xffffffff); + + assertEq(Bytes.setBytes4(input, 0, 0xffffffff), bytes32(bytes4(0xffffffff))); + assertEq(Bytes.setBytes4(input, 30, 0xffffffff), bytes32(uint256(0xffff))); + assertEq(Bytes.setBytes4(input, 28, 0xffffffff), bytes32(uint256(0xffffffff))); + + bytes32 input2 = bytes32(0x0000000a000a0000000000000000000000000000000000000000000000000000); + bytes4 overwrite = bytes4(0x0000006d); + + assertEq( + Bytes.setBytes4(input2, 0, overwrite), + bytes32(0x0000006d000a0000000000000000000000000000000000000000000000000000) + ); + } +} diff --git a/packages/store/test/Gas.t.sol b/packages/store/test/Gas.t.sol new file mode 100644 index 0000000000..ae5e0842b2 --- /dev/null +++ b/packages/store/test/Gas.t.sol @@ -0,0 +1,67 @@ +// SPDX-License-Identifier: MIT +pragma solidity >=0.8.0; + +import "forge-std/Test.sol"; +import { Bytes } from "../src/Bytes.sol"; +import { SliceLib } from "../src/Slice.sol"; +import { EncodeArray } from "../src/tightcoder/EncodeArray.sol"; + +struct Mixed { + uint32 u32; + uint128 u128; + uint32[] a32; + string s; +} + +contract SomeContract { + function doSomethingWithBytes(bytes memory data) public {} +} + +contract GasTest is Test { + SomeContract someContract = new SomeContract(); + + function testCompareAbiEncodeVsCustom() public { + Mixed memory mixed = Mixed({ u32: 1, u128: 2, a32: new uint32[](3), s: "hello" }); + mixed.a32[0] = 1; + mixed.a32[1] = 2; + mixed.a32[2] = 3; + + // !gasreport abi encode + bytes memory abiEncoded = abi.encode(mixed); + + // !gasreport abi decode + Mixed memory abiDecoded = abi.decode(abiEncoded, (Mixed)); + + // !gasreport custom encode + bytes memory customEncoded = customEncode(mixed); + + // !gasreport custom decode + Mixed memory customDecoded = customDecode(customEncoded); + + console.log("Length comparison: abi encode %s, custom %s", abiEncoded.length, customEncoded.length); + + // !gasreport pass abi encoded bytes to external contract + someContract.doSomethingWithBytes(abiEncoded); + + // !gasreport pass custom encoded bytes to external contract + someContract.doSomethingWithBytes(customEncoded); + + assertEq(keccak256(abi.encode(abiDecoded)), keccak256(abi.encode(customDecoded))); + } +} + +function customEncode(Mixed memory mixed) pure returns (bytes memory) { + return abi.encodePacked(mixed.u32, mixed.u128, EncodeArray.encode(mixed.a32), mixed.s); +} + +function customDecode(bytes memory input) view returns (Mixed memory) { + console.log(input.length); + + return + Mixed({ + u32: uint32(Bytes.slice4(input, 0)), + u128: uint128(Bytes.slice16(input, 4)), + a32: SliceLib.getSubslice(input, 20, 20 + 3 * 4).decodeArray_uint32(), + s: string(SliceLib.getSubslice(input, 20 + 3 * 4, input.length).toBytes()) + }); +} diff --git a/packages/store/test/Mixed.t.sol b/packages/store/test/Mixed.t.sol new file mode 100644 index 0000000000..1f331cfb61 --- /dev/null +++ b/packages/store/test/Mixed.t.sol @@ -0,0 +1,54 @@ +// SPDX-License-Identifier: MIT +pragma solidity >=0.8.0; + +import "forge-std/Test.sol"; +import { Mixed, MixedData, MixedTableId } from "../src/tables/Mixed.sol"; +import { StoreCore } from "../src/StoreCore.sol"; +import { SchemaType } from "../src/Types.sol"; +import { StoreView } from "../src/StoreView.sol"; +import { Schema } from "../src/Schema.sol"; + +contract MixedTest is Test, StoreView { + MixedData private testMixed; + + function testRegisterAndGetSchema() public { + // !gasreport register Mixed schema + Mixed.registerSchema(); + + Schema registeredSchema = StoreCore.getSchema(MixedTableId); + Schema declaredSchema = Mixed.getSchema(); + + assertEq(keccak256(abi.encode(registeredSchema)), keccak256(abi.encode(declaredSchema))); + } + + function testSetAndGet() public { + Mixed.registerSchema(); + bytes32 key = keccak256("somekey"); + + uint32[] memory a32 = new uint32[](2); + a32[0] = 3; + a32[1] = 4; + string memory s = "some string"; + + // !gasreport set record in Mixed + Mixed.set({ key: key, u32: 1, u128: 2, a32: a32, s: s }); + + // !gasreport get record from Mixed + MixedData memory mixed = Mixed.get(key); + + assertEq(mixed.u32, 1); + assertEq(mixed.u128, 2); + assertEq(mixed.a32[0], 3); + assertEq(mixed.a32[1], 4); + assertEq(mixed.s, s); + } + + function testCompareSolidity() public { + MixedData memory mixed = MixedData({ u32: 1, u128: 2, a32: new uint32[](2), s: "some string" }); + mixed.a32[0] = 3; + mixed.a32[1] = 4; + + // !gasreport store Mixed struct in storage (native solidity) + testMixed = mixed; + } +} diff --git a/packages/store/test/PackedCounter.t.sol b/packages/store/test/PackedCounter.t.sol new file mode 100644 index 0000000000..8ec1938f73 --- /dev/null +++ b/packages/store/test/PackedCounter.t.sol @@ -0,0 +1,60 @@ +// SPDX-License-Identifier: MIT +pragma solidity >=0.8.0; + +import "forge-std/Test.sol"; +import { PackedCounter, PackedCounterLib } from "../src/PackedCounter.sol"; + +contract PackedCounterTest is Test { + function testTotal() public { + uint16[] memory counters = new uint16[](4); + counters[0] = 1; + counters[1] = 2; + counters[2] = 3; + counters[3] = 4; + + // !gasreport pack uint16 array into PackedCounter + PackedCounter packedCounter = PackedCounterLib.pack(counters); + + // !gasreport get total of PackedCounter + packedCounter.total(); + + assertEq(packedCounter.total(), 10); + } + + function testAtIndex() public { + uint16[] memory counters = new uint16[](4); + counters[0] = 1; + counters[1] = 2; + counters[2] = 3; + counters[3] = 4; + + PackedCounter packedCounter = PackedCounterLib.pack(counters); + + // !gasreport get value at index of PackedCounter + packedCounter.atIndex(3); + + assertEq(packedCounter.atIndex(0), 1); + assertEq(packedCounter.atIndex(1), 2); + assertEq(packedCounter.atIndex(2), 3); + assertEq(packedCounter.atIndex(3), 4); + } + + function testSetAtIndex() public { + uint16[] memory counters = new uint16[](4); + counters[0] = 1; + counters[1] = 2; + counters[2] = 3; + counters[3] = 4; + + PackedCounter packedCounter = PackedCounterLib.pack(counters); + + // !gasreport set value at index of PackedCounter + packedCounter = packedCounter.setAtIndex(2, 5); + + assertEq(packedCounter.atIndex(0), 1); + assertEq(packedCounter.atIndex(1), 2); + assertEq(packedCounter.atIndex(2), 5); + assertEq(packedCounter.atIndex(3), 4); + assertEq(packedCounter.total(), 12); + } +} diff --git a/packages/store/test/Route.t.sol b/packages/store/test/Route.t.sol new file mode 100644 index 0000000000..01c1a5f852 --- /dev/null +++ b/packages/store/test/Route.t.sol @@ -0,0 +1,40 @@ +// SPDX-License-Identifier: MIT +pragma solidity >=0.8.0; + +import "forge-std/Test.sol"; +import { Route, RouteData, RouteTableId } from "../src/tables/Route.sol"; +import { StoreCore } from "../src/StoreCore.sol"; +import { SchemaType } from "../src/Types.sol"; +import { StoreView } from "../src/StoreView.sol"; +import { Schema } from "../src/Schema.sol"; + +contract RouteTest is Test, StoreView { + function testRegisterAndGetSchema() public { + // !gasreport register Route schema + Route.registerSchema(); + + Schema registeredSchema = StoreCore.getSchema(RouteTableId); + Schema declaredSchema = Route.getSchema(); + + assertEq(keccak256(abi.encode(registeredSchema)), keccak256(abi.encode(declaredSchema))); + } + + function testSetAndGet() public { + Route.registerSchema(); + bytes32 key = keccak256("somekey"); + + address addr = address(0x1234); + bytes4 selector = bytes4(0x12345678); + uint8 executionMode = 1; + + // !gasreport set Route record + Route.set(key, addr, selector, executionMode); + + // !gasreport get Route record + RouteData memory systemEntry = Route.get(key); + + assertEq(systemEntry.addr, addr); + assertEq(systemEntry.selector, selector); + assertEq(systemEntry.executionMode, executionMode); + } +} diff --git a/packages/store/test/Schema.t.sol b/packages/store/test/Schema.t.sol new file mode 100644 index 0000000000..3cedc4a613 --- /dev/null +++ b/packages/store/test/Schema.t.sol @@ -0,0 +1,254 @@ +// SPDX-License-Identifier: MIT +pragma solidity >=0.8.0; + +import "forge-std/Test.sol"; +import { Schema, SchemaLib } from "../src/Schema.sol"; +import { SchemaType } from "../src/Types.sol"; + +// TODO add tests for all schema types +contract SchemaTest is Test { + function testEncodeDecodeSchema() public { + uint256 gas = gasleft(); + Schema schema = SchemaLib.encode( + SchemaType.UINT8, // 1 byte + SchemaType.UINT16, // 2 bytes + SchemaType.UINT32, // 4 bytes + SchemaType.UINT128, // 16 bytes + SchemaType.UINT256, // 32 bytes + SchemaType.UINT32_ARRAY // 0 bytes (because it's dynamic) + ); + gas = gas - gasleft(); + console.log("GAS REPORT: encode schema with 6 entries [SchemaLib.encode]: %s", gas); + + // !gasreport get schema type at index + SchemaType schemaType1 = schema.atIndex(0); + + assertEq(uint8(schemaType1), uint8(SchemaType.UINT8)); + assertEq(uint8(schema.atIndex(1)), uint8(SchemaType.UINT16)); + assertEq(uint8(schema.atIndex(2)), uint8(SchemaType.UINT32)); + assertEq(uint8(schema.atIndex(3)), uint8(SchemaType.UINT128)); + assertEq(uint8(schema.atIndex(4)), uint8(SchemaType.UINT256)); + assertEq(uint8(schema.atIndex(5)), uint8(SchemaType.UINT32_ARRAY)); + } + + function testFailInvalidSchemaStaticAfterDynamic() public pure { + SchemaLib.encode(SchemaType.UINT8, SchemaType.UINT32_ARRAY, SchemaType.UINT16); + } + + function testEncodeMaxValidLength() public { + SchemaType[] memory schema = new SchemaType[](28); + schema[0] = SchemaType.UINT256; + schema[1] = SchemaType.UINT256; + schema[2] = SchemaType.UINT256; + schema[3] = SchemaType.UINT256; + schema[4] = SchemaType.UINT256; + schema[5] = SchemaType.UINT256; + schema[6] = SchemaType.UINT256; + schema[7] = SchemaType.UINT256; + schema[8] = SchemaType.UINT256; + schema[9] = SchemaType.UINT256; + schema[10] = SchemaType.UINT256; + schema[11] = SchemaType.UINT256; + schema[12] = SchemaType.UINT256; + schema[13] = SchemaType.UINT256; + schema[14] = SchemaType.UINT32_ARRAY; + schema[15] = SchemaType.UINT32_ARRAY; + schema[16] = SchemaType.UINT32_ARRAY; + schema[17] = SchemaType.UINT32_ARRAY; + schema[18] = SchemaType.UINT32_ARRAY; + schema[19] = SchemaType.UINT32_ARRAY; + schema[20] = SchemaType.UINT32_ARRAY; + schema[21] = SchemaType.UINT32_ARRAY; + schema[22] = SchemaType.UINT32_ARRAY; + schema[23] = SchemaType.UINT32_ARRAY; + schema[24] = SchemaType.UINT32_ARRAY; + schema[25] = SchemaType.UINT32_ARRAY; + schema[26] = SchemaType.UINT32_ARRAY; + schema[27] = SchemaType.UINT32_ARRAY; + Schema encodedSchema = SchemaLib.encode(schema); + + assertEq(encodedSchema.numStaticFields() + encodedSchema.numDynamicFields(), 28); + } + + function testFailEncodeTooLong() public pure { + SchemaType[] memory schema = new SchemaType[](29); + schema[0] = SchemaType.UINT256; + schema[1] = SchemaType.UINT256; + schema[2] = SchemaType.UINT256; + schema[3] = SchemaType.UINT256; + schema[4] = SchemaType.UINT256; + schema[5] = SchemaType.UINT256; + schema[6] = SchemaType.UINT256; + schema[7] = SchemaType.UINT256; + schema[8] = SchemaType.UINT256; + schema[9] = SchemaType.UINT256; + schema[10] = SchemaType.UINT256; + schema[11] = SchemaType.UINT256; + schema[12] = SchemaType.UINT256; + schema[13] = SchemaType.UINT256; + schema[14] = SchemaType.UINT256; + schema[15] = SchemaType.UINT256; + schema[16] = SchemaType.UINT256; + schema[17] = SchemaType.UINT32_ARRAY; + schema[18] = SchemaType.UINT32_ARRAY; + schema[19] = SchemaType.UINT32_ARRAY; + schema[20] = SchemaType.UINT32_ARRAY; + schema[21] = SchemaType.UINT32_ARRAY; + schema[22] = SchemaType.UINT32_ARRAY; + schema[23] = SchemaType.UINT32_ARRAY; + schema[24] = SchemaType.UINT32_ARRAY; + schema[25] = SchemaType.UINT32_ARRAY; + schema[26] = SchemaType.UINT32_ARRAY; + schema[27] = SchemaType.UINT32_ARRAY; + schema[28] = SchemaType.UINT32_ARRAY; + SchemaLib.encode(schema); + } + + function testEncodeMaxValidDynamic() public { + SchemaType[] memory schema = new SchemaType[](14); + schema[0] = SchemaType.UINT32_ARRAY; + schema[1] = SchemaType.UINT32_ARRAY; + schema[2] = SchemaType.UINT32_ARRAY; + schema[3] = SchemaType.UINT32_ARRAY; + schema[4] = SchemaType.UINT32_ARRAY; + schema[5] = SchemaType.UINT32_ARRAY; + schema[6] = SchemaType.UINT32_ARRAY; + schema[7] = SchemaType.UINT32_ARRAY; + schema[8] = SchemaType.UINT32_ARRAY; + schema[9] = SchemaType.UINT32_ARRAY; + schema[10] = SchemaType.UINT32_ARRAY; + schema[11] = SchemaType.UINT32_ARRAY; + schema[12] = SchemaType.UINT32_ARRAY; + schema[13] = SchemaType.UINT32_ARRAY; + Schema encodedSchema = SchemaLib.encode(schema); + + assertEq(encodedSchema.numDynamicFields(), 14); + } + + function testFailEncodeTooManyDynamic() public pure { + SchemaType[] memory schema = new SchemaType[](15); + schema[0] = SchemaType.UINT32_ARRAY; + schema[1] = SchemaType.UINT32_ARRAY; + schema[2] = SchemaType.UINT32_ARRAY; + schema[3] = SchemaType.UINT32_ARRAY; + schema[4] = SchemaType.UINT32_ARRAY; + schema[5] = SchemaType.UINT32_ARRAY; + schema[6] = SchemaType.UINT32_ARRAY; + schema[7] = SchemaType.UINT32_ARRAY; + schema[8] = SchemaType.UINT32_ARRAY; + schema[9] = SchemaType.UINT32_ARRAY; + schema[10] = SchemaType.UINT32_ARRAY; + schema[11] = SchemaType.UINT32_ARRAY; + schema[12] = SchemaType.UINT32_ARRAY; + schema[13] = SchemaType.UINT32_ARRAY; + schema[14] = SchemaType.UINT32_ARRAY; + SchemaLib.encode(schema); + } + + function testGetStaticSchemaLength() public { + Schema schema = SchemaLib.encode( + SchemaType.UINT8, // 1 byte + SchemaType.UINT16, // 2 bytes + SchemaType.UINT32, // 4 bytes + SchemaType.UINT128, // 16 bytes + SchemaType.UINT256, // 32 bytes + SchemaType.UINT32_ARRAY // 0 bytes (because it's dynamic) + ); + + // !gasreport get static data length from schema + uint256 length = schema.staticDataLength(); + + assertEq(length, 55); + } + + function testGetNumStaticFields() public { + Schema schema = SchemaLib.encode( + SchemaType.UINT8, // 1 byte + SchemaType.UINT16, // 2 bytes + SchemaType.UINT32, // 4 bytes + SchemaType.UINT128, // 16 bytes + SchemaType.UINT256, // 32 bytes + SchemaType.UINT32_ARRAY // 0 bytes (because it's dynamic) + ); + + // !gasreport get number of static fields from schema + uint256 num = schema.numStaticFields(); + + assertEq(num, 5); + } + + function testGetNumDynamicFields() public { + Schema schema = SchemaLib.encode( + SchemaType.UINT8, // 1 byte + SchemaType.UINT16, // 2 bytes + SchemaType.UINT32, // 4 bytes + SchemaType.UINT128, // 16 bytes + SchemaType.UINT256, // 32 bytes + SchemaType.UINT32_ARRAY // 0 bytes (because it's dynamic) + ); + + // !gasreport get number of dynamic fields from schema + uint256 num = schema.numDynamicFields(); + + assertEq(num, 1); + } + + function testValidate() public pure { + SchemaType[] memory schema = new SchemaType[](28); + schema[0] = SchemaType.UINT256; + schema[1] = SchemaType.UINT256; + schema[2] = SchemaType.UINT256; + schema[3] = SchemaType.UINT256; + schema[4] = SchemaType.UINT256; + schema[5] = SchemaType.UINT256; + schema[6] = SchemaType.UINT256; + schema[7] = SchemaType.UINT256; + schema[8] = SchemaType.UINT256; + schema[9] = SchemaType.UINT256; + schema[10] = SchemaType.UINT256; + schema[11] = SchemaType.UINT256; + schema[12] = SchemaType.UINT256; + schema[13] = SchemaType.UINT256; + schema[14] = SchemaType.UINT32_ARRAY; + schema[15] = SchemaType.UINT32_ARRAY; + schema[16] = SchemaType.UINT32_ARRAY; + schema[17] = SchemaType.UINT32_ARRAY; + schema[18] = SchemaType.UINT32_ARRAY; + schema[19] = SchemaType.UINT32_ARRAY; + schema[20] = SchemaType.UINT32_ARRAY; + schema[21] = SchemaType.UINT32_ARRAY; + schema[22] = SchemaType.UINT32_ARRAY; + schema[23] = SchemaType.UINT32_ARRAY; + schema[24] = SchemaType.UINT32_ARRAY; + schema[25] = SchemaType.UINT32_ARRAY; + schema[26] = SchemaType.UINT32_ARRAY; + schema[27] = SchemaType.UINT32_ARRAY; + Schema encodedSchema = SchemaLib.encode(schema); + + // !gasreport validate schema + encodedSchema.validate(); + } + + function testFailValidate() public pure { + Schema.wrap(keccak256("some invalid schema")).validate(); + } + + function testIsEmptyTrue() public { + SchemaType[] memory schema = new SchemaType[](0); + Schema encodedSchema = SchemaLib.encode(schema); + + // !gasreport check if schema is empty (empty schema) + bool empty = encodedSchema.isEmpty(); + + assertTrue(empty); + } + + function testIsEmptyFalse() public { + Schema encodedSchema = SchemaLib.encode(SchemaType.UINT256); + + // !gasreport check if schema is empty (non-empty schema) + bool empty = encodedSchema.isEmpty(); + + assertFalse(empty); + } +} diff --git a/packages/store/test/Slice.t.sol b/packages/store/test/Slice.t.sol new file mode 100644 index 0000000000..3535699dfc --- /dev/null +++ b/packages/store/test/Slice.t.sol @@ -0,0 +1,111 @@ +// SPDX-License-Identifier: MIT +pragma solidity >=0.8.0; + +import "forge-std/Test.sol"; +import { Memory } from "../src/Memory.sol"; +import { Slice, SliceLib } from "../src/Slice.sol"; + +contract SliceTest is Test { + function testFromBytes() public { + bytes memory data = abi.encodePacked(bytes8(0x0102030405060708)); + + // !gasreport make Slice from bytes + Slice slice = SliceLib.fromBytes(data); + + // !gasreport get Slice length + slice.length(); + + // !gasreport get Slice pointer + slice.pointer(); + + assertEq(slice.length(), 8); + assertEq(slice.pointer(), Memory.dataPointer(data)); + assertEq(slice.toBytes(), data); + } + + function testFromBytesFuzzy(bytes memory data) public { + Slice slice = SliceLib.fromBytes(data); + assertEq(slice.length(), data.length); + assertEq(slice.pointer(), Memory.dataPointer(data)); + assertEq(slice.toBytes(), data); + } + + function testToBytes32() public { + bytes memory input = new bytes(32); + input[0] = 0x01; + input[31] = 0x02; + Slice slice = SliceLib.fromBytes(input); + + // !gasreport Slice to bytes32 + bytes32 output = slice.toBytes32(); + + assertEq(uint256(output), 0x0100000000000000000000000000000000000000000000000000000000000002); + } + + function testToBytes() public { + Slice slice; + bytes memory data0 = hex""; + bytes memory data2 = hex"0102"; + bytes memory data32 = hex"0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f20"; + bytes memory data34 = hex"0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f202122"; + bytes memory data1024 = new bytes(1024); + bytes memory data1024x1024 = new bytes(1024 * 1024); + + slice = SliceLib.fromBytes(data0); + // !gasreport Slice (0 bytes) to bytes memory + bytes memory sliceData0 = slice.toBytes(); + + slice = SliceLib.fromBytes(data2); + // !gasreport Slice (2 bytes) to bytes memory + bytes memory sliceData2 = slice.toBytes(); + + slice = SliceLib.fromBytes(data32); + // !gasreport Slice (32 bytes) to bytes memory + bytes memory sliceData32 = slice.toBytes(); + + slice = SliceLib.fromBytes(data34); + // !gasreport Slice (34 bytes) to bytes memory + bytes memory sliceData34 = slice.toBytes(); + + slice = SliceLib.fromBytes(data1024); + // !gasreport Slice (1024 bytes) to bytes memory + bytes memory sliceData1024 = slice.toBytes(); + + slice = SliceLib.fromBytes(data1024x1024); + // !gasreport Slice (1024x1024 bytes) to bytes memory + bytes memory sliceData1024x1024 = slice.toBytes(); + + assertEq(sliceData0, data0); + assertEq(sliceData2, data2); + assertEq(sliceData32, data32); + assertEq(sliceData34, data34); + assertEq(sliceData1024, data1024); + assertEq(sliceData1024x1024, data1024x1024); + } + + function testSubslice() public { + bytes memory data1 = hex"010203"; + bytes memory data2 = hex"0405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f2021222324"; + bytes memory data = abi.encodePacked(hex"00", data1, data2); + + // !gasreport subslice bytes (no copy) [1:4] + Slice slice1 = SliceLib.getSubslice(data, 1, 1 + 3); + + // !gasreport subslice bytes (no copy) [4:37] + Slice slice2 = SliceLib.getSubslice(data, 4, 4 + 33); + + assertEq(slice1.length(), 3); + assertEq(slice2.length(), 33); + assertEq(slice1.toBytes(), data1); + assertEq(slice2.toBytes(), data2); + } + + function testSubsliceFuzzy(bytes calldata _b) public { + uint256 start = _b.length == 0 ? 0 : uint256(keccak256(abi.encode(_b, "start"))) % _b.length; + uint256 end = _b.length == 0 ? 0 : uint256(keccak256(abi.encode(_b, "end"))) % _b.length; + vm.assume(start <= end); + Slice subslice = SliceLib.getSubslice(_b, start, end); + // Compare getSubslice to calldata slicing + assertEq(subslice.toBytes(), _b[start:end]); + } +} diff --git a/packages/store/test/Storage.t.sol b/packages/store/test/Storage.t.sol new file mode 100644 index 0000000000..a64c9aa935 --- /dev/null +++ b/packages/store/test/Storage.t.sol @@ -0,0 +1,79 @@ +// SPDX-License-Identifier: MIT +pragma solidity >=0.8.0; + +import "forge-std/Test.sol"; +import { Storage } from "../src/Storage.sol"; +import { Utils } from "../src/Utils.sol"; +import { Bytes } from "../src/Bytes.sol"; + +contract StorageTest is Test { + function testStoreLoad() public { + bytes memory data1 = abi.encodePacked( + bytes1(0x01), + bytes32(0x0200000000000000000000000000000000000000000000000000000000000003), + bytes1(0x04) + ); + + bytes memory originalDataFirstSlot = abi.encodePacked( + bytes32(0x42000000000000000000000000000000000000000000000000000000000069FF) + ); + bytes memory originalDataLastSlot = abi.encodePacked( + bytes32(0xFF42000000000000000000000000000000000000000000000000000000000069) + ); + + uint256 storagePointer = uint256(keccak256("some location")); + uint256 storagePointerTwoSlotsAfter = storagePointer + 2; + + // First store some data to storage at the target slot and two slots after the target slot + + // !gasreport store 1 storage slot + Storage.store({ storagePointer: storagePointer, data: originalDataFirstSlot }); + + Storage.store({ storagePointer: storagePointerTwoSlotsAfter, data: originalDataLastSlot }); + + // Then set the target slot, partially overwriting the first and third slot, but using safeTrail and offset + + // !gasreport store 34 bytes over 3 storage slots (with offset and safeTrail)) + Storage.store({ storagePointer: storagePointer, offset: 31, data: data1 }); + + // Assert the first slot has the correct value + assertEq( + Storage.load({ storagePointer: storagePointer }), + bytes32(0x4200000000000000000000000000000000000000000000000000000000006901) + ); + + // Assert the second slot has the correct value + assertEq( + Storage.load({ storagePointer: storagePointer + 1 }), + bytes32(0x0200000000000000000000000000000000000000000000000000000000000003) + ); + + // Assert that the trailing slot has the correct value + assertEq( + Storage.load({ storagePointer: storagePointerTwoSlotsAfter }), + bytes32(0x0442000000000000000000000000000000000000000000000000000000000069) + ); + + // Assert we can load the correct partial value from storage + + // !gasreport load 34 bytes over 3 storage slots (with offset and safeTrail)) + bytes memory data = Storage.load({ storagePointer: storagePointer, length: 34, offset: 31 }); + + assertEq(Bytes.slice1(data, 0), bytes1(0x01)); + assertEq(Bytes.slice32(data, 1), bytes32(0x0200000000000000000000000000000000000000000000000000000000000003)); + assertEq(Bytes.slice1(data, 33), bytes1(0x04)); + assertEq(keccak256(data), keccak256(data1)); + } + + function testStoreLoadFuzzy( + bytes memory data, + bytes32 storagePointer, + uint8 offset + ) public { + // avoid clashes with DSTest, which uses a storage slot for `_failed` flag + vm.assume(storagePointer > 0); + + Storage.store({ storagePointer: uint256(storagePointer), offset: offset, data: data }); + assertEq(Storage.load({ storagePointer: uint256(storagePointer), length: data.length, offset: offset }), data); + } +} diff --git a/packages/store/test/StoreCore.t.sol b/packages/store/test/StoreCore.t.sol new file mode 100644 index 0000000000..3bf67d031f --- /dev/null +++ b/packages/store/test/StoreCore.t.sol @@ -0,0 +1,655 @@ +// SPDX-License-Identifier: MIT +pragma solidity >=0.8.0; + +import "forge-std/Test.sol"; +import { StoreCore, StoreCoreInternal } from "../src/StoreCore.sol"; +import { Utils } from "../src/Utils.sol"; +import { Bytes } from "../src/Bytes.sol"; +import { SchemaType } from "../src/Types.sol"; +import { SliceLib } from "../src/Slice.sol"; +import { EncodeArray } from "../src/tightcoder/EncodeArray.sol"; +import { Schema, SchemaLib } from "../src/Schema.sol"; +import { PackedCounter, PackedCounterLib } from "../src/PackedCounter.sol"; +import { StoreView } from "../src/StoreView.sol"; +import { IStore, IStoreHook } from "../src/IStore.sol"; +import { StoreSwitch } from "../src/StoreSwitch.sol"; + +struct TestStruct { + uint128 firstData; + uint32[] secondData; + uint32[] thirdData; +} + +contract StoreCoreTest is Test, StoreView { + TestStruct private testStruct; + + mapping(uint256 => bytes) private testMapping; + + // Expose an external setRecord function for testing purposes of indexers (see testHooks) + function setRecord( + uint256 table, + bytes32[] calldata key, + bytes calldata data + ) public override { + StoreCore.setRecord(table, key, data); + } + + // Expose an external setField function for testing purposes of indexers (see testHooks) + function setField( + uint256 table, + bytes32[] calldata key, + uint8 schemaIndex, + bytes calldata data + ) public override { + StoreCore.setField(table, key, schemaIndex, data); + } + + // Expose an external deleteRecord function for testing purposes of indexers (see testHooks) + function deleteRecord(uint256 table, bytes32[] calldata key) public override { + StoreCore.deleteRecord(table, key); + } + + // Expose an external registerSchema function for testing purposes of indexers (see testHooks) + function registerSchema(uint256 table, Schema schema) public override { + StoreCore.registerSchema(table, schema); + } + + function testRegisterAndGetSchema() public { + Schema schema = SchemaLib.encode(SchemaType.UINT8, SchemaType.UINT16, SchemaType.UINT8, SchemaType.UINT16); + + uint256 table = uint256(keccak256("some.table")); + + // Expect a StoreSetRecord event to be emitted + bytes32[] memory key = new bytes32[](1); + key[0] = bytes32(table); + vm.expectEmit(true, true, true, true); + emit StoreSetRecord(StoreCoreInternal.SCHEMA_TABLE, key, abi.encodePacked(schema.unwrap())); + + // !gasreport StoreCore: register schema + StoreCore.registerSchema(table, schema); + + // !gasreport StoreCore: get schema (warm) + Schema loadedSchema = StoreCore.getSchema(table); + + assertEq(schema.unwrap(), loadedSchema.unwrap()); + } + + function testFailRegisterInvalidSchema() public { + StoreCore.registerSchema(uint256(keccak256("table")), Schema.wrap(keccak256("random bytes as schema"))); + } + + function testHasSchema() public { + Schema schema = SchemaLib.encode(SchemaType.UINT8, SchemaType.UINT16, SchemaType.UINT8, SchemaType.UINT16); + uint256 table = uint256(keccak256("some.table")); + uint256 table2 = uint256(keccak256("other.table")); + StoreCore.registerSchema(table, schema); + + // !gasreport Check for existence of table (existent) + StoreCore.hasTable(table); + + // !gasreport check for existence of table (non-existent) + StoreCore.hasTable(table2); + + assertTrue(StoreCore.hasTable(table)); + assertFalse(StoreCore.hasTable(table2)); + } + + function testSetAndGetDynamicDataLength() public { + uint256 table = uint256(keccak256("some.table")); + + Schema schema = SchemaLib.encode( + SchemaType.UINT8, + SchemaType.UINT16, + SchemaType.UINT32, + SchemaType.UINT32_ARRAY, + SchemaType.UINT32_ARRAY + ); + + // Register schema + StoreCore.registerSchema(table, schema); + + // Create some key + bytes32[] memory key = new bytes32[](1); + key[0] = bytes32("some key"); + + // Set dynamic data length of dynamic index 0 + // !gasreport set dynamic length of dynamic index 0 + StoreCoreInternal._setDynamicDataLengthAtIndex(table, key, 0, 10); + + PackedCounter encodedLength = StoreCoreInternal._loadEncodedDynamicDataLength(table, key); + assertEq(encodedLength.atIndex(0), 10); + assertEq(encodedLength.atIndex(1), 0); + assertEq(encodedLength.total(), 10); + + // Set dynamic data length of dynamic index 1 + // !gasreport set dynamic length of dynamic index 1 + StoreCoreInternal._setDynamicDataLengthAtIndex(table, key, 1, 99); + + encodedLength = StoreCoreInternal._loadEncodedDynamicDataLength(table, key); + assertEq(encodedLength.atIndex(0), 10); + assertEq(encodedLength.atIndex(1), 99); + assertEq(encodedLength.total(), 109); + + // Reduce dynamic data length of dynamic index 0 again + // !gasreport reduce dynamic length of dynamic index 0 + StoreCoreInternal._setDynamicDataLengthAtIndex(table, key, 0, 5); + + encodedLength = StoreCoreInternal._loadEncodedDynamicDataLength(table, key); + assertEq(encodedLength.atIndex(0), 5); + assertEq(encodedLength.atIndex(1), 99); + assertEq(encodedLength.total(), 104); + } + + function testSetAndGetStaticData() public { + // Register table's schema + Schema schema = SchemaLib.encode(SchemaType.UINT8, SchemaType.UINT16, SchemaType.UINT8, SchemaType.UINT16); + + uint256 table = uint256(keccak256("some.table")); + StoreCore.registerSchema(table, schema); + + // Set data + bytes memory data = abi.encodePacked(bytes1(0x01), bytes2(0x0203), bytes1(0x04), bytes2(0x0506)); + + bytes32[] memory key = new bytes32[](1); + key[0] = keccak256("some.key"); + + // Expect a StoreSetRecord event to be emitted + vm.expectEmit(true, true, true, true); + emit StoreSetRecord(table, key, data); + + // !gasreport set static record (1 slot) + StoreCore.setRecord(table, key, data); + + // Get data + // !gasreport get static record (1 slot) + bytes memory loadedData = StoreCore.getRecord(table, key, schema); + + assertTrue(Bytes.equals(data, loadedData)); + } + + function testFailSetAndGetStaticData() public { + // Register table's schema + Schema schema = SchemaLib.encode(SchemaType.UINT8, SchemaType.UINT16, SchemaType.UINT8, SchemaType.UINT16); + uint256 table = uint256(keccak256("some.table")); + StoreCore.registerSchema(table, schema); + + // Set data + bytes memory data = abi.encodePacked(bytes1(0x01), bytes2(0x0203), bytes1(0x04)); + + bytes32[] memory key = new bytes32[](1); + key[0] = keccak256("some.key"); + + // This should fail because the data is not 6 bytes long + StoreCore.setRecord(table, key, data); + } + + function testSetAndGetStaticDataSpanningWords() public { + // Register table's schema + Schema schema = SchemaLib.encode(SchemaType.UINT128, SchemaType.UINT256); + uint256 table = uint256(keccak256("some.table")); + StoreCore.registerSchema(table, schema); + + // Set data + bytes memory data = abi.encodePacked( + bytes16(0x0102030405060708090a0b0c0d0e0f10), + bytes32(0x1112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f30) + ); + + bytes32[] memory key = new bytes32[](1); + key[0] = keccak256("some.key"); + + // Expect a StoreSetRecord event to be emitted + vm.expectEmit(true, true, true, true); + emit StoreSetRecord(table, key, data); + + // !gasreport set static record (2 slots) + StoreCore.setRecord(table, key, data); + + // Get data + // !gasreport get static record (2 slots) + bytes memory loadedData = StoreCore.getRecord(table, key, schema); + + assertTrue(Bytes.equals(data, loadedData)); + } + + function testSetAndGetDynamicData() public { + uint256 table = uint256(keccak256("some.table")); + + { + // Register table's schema + Schema schema = SchemaLib.encode(SchemaType.UINT128, SchemaType.UINT32_ARRAY, SchemaType.UINT32_ARRAY); + StoreCore.registerSchema(table, schema); + } + + bytes16 firstDataBytes = bytes16(0x0102030405060708090a0b0c0d0e0f10); + + bytes memory secondDataBytes; + { + uint32[] memory secondData = new uint32[](2); + secondData[0] = 0x11121314; + secondData[1] = 0x15161718; + secondDataBytes = EncodeArray.encode(secondData); + } + + bytes memory thirdDataBytes; + { + uint32[] memory thirdData = new uint32[](3); + thirdData[0] = 0x191a1b1c; + thirdData[1] = 0x1d1e1f20; + thirdData[2] = 0x21222324; + thirdDataBytes = EncodeArray.encode(thirdData); + } + + PackedCounter encodedDynamicLength; + { + uint16[] memory dynamicLengths = new uint16[](2); + dynamicLengths[0] = uint16(secondDataBytes.length); + dynamicLengths[1] = uint16(thirdDataBytes.length); + encodedDynamicLength = PackedCounterLib.pack(dynamicLengths); + } + + // Concat data + bytes memory data = abi.encodePacked( + firstDataBytes, + encodedDynamicLength.unwrap(), + secondDataBytes, + thirdDataBytes + ); + + // Create key + bytes32[] memory key = new bytes32[](1); + key[0] = bytes32("some.key"); + + // Expect a StoreSetRecord event to be emitted + vm.expectEmit(true, true, true, true); + emit StoreSetRecord(table, key, data); + + // Set data + // !gasreport set complex record with dynamic data (4 slots) + StoreCore.setRecord(table, key, data); + + // Get data + // !gasreport get complex record with dynamic data (4 slots) + bytes memory loadedData = StoreCore.getRecord(table, key); + + assertEq(loadedData.length, data.length); + assertEq(keccak256(loadedData), keccak256(data)); + + // Compare gas - setting the data as raw struct + TestStruct memory _testStruct = TestStruct(0, new uint32[](2), new uint32[](3)); + _testStruct.firstData = 0x0102030405060708090a0b0c0d0e0f10; + _testStruct.secondData[0] = 0x11121314; + _testStruct.secondData[1] = 0x15161718; + _testStruct.thirdData[0] = 0x191a1b1c; + _testStruct.thirdData[1] = 0x1d1e1f20; + _testStruct.thirdData[2] = 0x21222324; + + // !gasreport compare: Set complex record with dynamic data using native solidity + testStruct = _testStruct; + + // !gasreport compare: Set complex record with dynamic data using abi.encode + testMapping[1234] = abi.encode(_testStruct); + } + + function testSetAndGetField() public { + uint256 table = uint256(keccak256("some.table")); + + { + // Register table's schema + Schema schema = SchemaLib.encode( + SchemaType.UINT128, + SchemaType.UINT256, + SchemaType.UINT32_ARRAY, + SchemaType.UINT32_ARRAY + ); + StoreCore.registerSchema(table, schema); + } + + bytes16 firstDataBytes = bytes16(0x0102030405060708090a0b0c0d0e0f10); + + // Create key + bytes32[] memory key = new bytes32[](1); + key[0] = bytes32("some.key"); + + // Expect a StoreSetField event to be emitted + vm.expectEmit(true, true, true, true); + emit StoreSetField(table, key, 0, abi.encodePacked(firstDataBytes)); + + // Set first field + // !gasreport set static field (1 slot) + StoreCore.setField(table, key, 0, abi.encodePacked(firstDataBytes)); + + //////////////// + // Static data + //////////////// + + // Get first field + // !gasreport get static field (1 slot) + bytes memory loadedData = StoreCore.getField(table, key, 0); + + // Verify loaded data is correct + assertEq(loadedData.length, 16); + assertEq(bytes16(loadedData), bytes16(firstDataBytes)); + + // Verify the second index is not set yet + assertEq(uint256(bytes32(StoreCore.getField(table, key, 1))), 0); + + // Set second field + bytes32 secondDataBytes = keccak256("some data"); + + // Expect a StoreSetField event to be emitted + vm.expectEmit(true, true, true, true); + emit StoreSetField(table, key, 1, abi.encodePacked(secondDataBytes)); + + // !gasreport set static field (overlap 2 slot) + StoreCore.setField(table, key, 1, abi.encodePacked(secondDataBytes)); + + // Get second field + // !gasreport get static field (overlap 2 slot) + loadedData = StoreCore.getField(table, key, 1); + + // Verify loaded data is correct + assertEq(loadedData.length, 32); + assertEq(bytes32(loadedData), secondDataBytes); + + // Verify the first field didn't change + assertEq(bytes16(StoreCore.getField(table, key, 0)), bytes16(firstDataBytes)); + + // Verify the full static data is correct + assertEq(StoreCore.getSchema(table).staticDataLength(), 48); + assertEq(Bytes.slice16(StoreCore.getRecord(table, key), 0), firstDataBytes); + assertEq(Bytes.slice32(StoreCore.getRecord(table, key), 16), secondDataBytes); + assertEq( + keccak256(SliceLib.getSubslice(StoreCore.getRecord(table, key), 0, 48).toBytes()), + keccak256(abi.encodePacked(firstDataBytes, secondDataBytes)) + ); + + //////////////// + // Dynamic data + //////////////// + + bytes memory thirdDataBytes; + { + uint32[] memory thirdData = new uint32[](2); + thirdData[0] = 0x11121314; + thirdData[1] = 0x15161718; + thirdDataBytes = EncodeArray.encode(thirdData); + } + + bytes memory fourthDataBytes; + { + uint32[] memory fourthData = new uint32[](3); + fourthData[0] = 0x191a1b1c; + fourthData[1] = 0x1d1e1f20; + fourthData[2] = 0x21222324; + fourthDataBytes = EncodeArray.encode(fourthData); + } + + // Expect a StoreSetField event to be emitted + vm.expectEmit(true, true, true, true); + emit StoreSetField(table, key, 2, thirdDataBytes); + + // Set third field + // !gasreport set dynamic field (1 slot, first dynamic field) + StoreCore.setField(table, key, 2, thirdDataBytes); + + // Get third field + // !gasreport get dynamic field (1 slot, first dynamic field) + loadedData = StoreCore.getField(table, key, 2); + + // Verify loaded data is correct + assertEq(SliceLib.fromBytes(loadedData).decodeArray_uint32().length, 2); + assertEq(loadedData.length, thirdDataBytes.length); + assertEq(keccak256(loadedData), keccak256(thirdDataBytes)); + + // Verify the fourth field is not set yet + assertEq(StoreCore.getField(table, key, 3).length, 0); + + // Verify none of the previous fields were impacted + assertEq(bytes16(StoreCore.getField(table, key, 0)), bytes16(firstDataBytes)); + assertEq(bytes32(StoreCore.getField(table, key, 1)), bytes32(secondDataBytes)); + + // Expect a StoreSetField event to be emitted + vm.expectEmit(true, true, true, true); + emit StoreSetField(table, key, 3, fourthDataBytes); + + // Set fourth field + // !gasreport set dynamic field (1 slot, second dynamic field) + StoreCore.setField(table, key, 3, fourthDataBytes); + + // Get fourth field + // !gasreport get dynamic field (1 slot, second dynamic field) + loadedData = StoreCore.getField(table, key, 3); + + // Verify loaded data is correct + assertEq(loadedData.length, fourthDataBytes.length); + assertEq(keccak256(loadedData), keccak256(fourthDataBytes)); + + // Verify all fields are correct + PackedCounter encodedLengths = PackedCounterLib.pack(uint16(thirdDataBytes.length), uint16(fourthDataBytes.length)); + assertEq( + keccak256(StoreCore.getRecord(table, key)), + keccak256( + abi.encodePacked(firstDataBytes, secondDataBytes, encodedLengths.unwrap(), thirdDataBytes, fourthDataBytes) + ) + ); + } + + function testDeleteData() public { + uint256 table = uint256(keccak256("some.table")); + + // Register table's schema + Schema schema = SchemaLib.encode(SchemaType.UINT128, SchemaType.UINT32_ARRAY, SchemaType.UINT32_ARRAY); + StoreCore.registerSchema(table, schema); + + bytes16 firstDataBytes = bytes16(0x0102030405060708090a0b0c0d0e0f10); + + bytes memory secondDataBytes; + { + uint32[] memory secondData = new uint32[](2); + secondData[0] = 0x11121314; + secondData[1] = 0x15161718; + secondDataBytes = EncodeArray.encode(secondData); + } + + bytes memory thirdDataBytes; + { + uint32[] memory thirdData = new uint32[](3); + thirdData[0] = 0x191a1b1c; + thirdData[1] = 0x1d1e1f20; + thirdData[2] = 0x21222324; + thirdDataBytes = EncodeArray.encode(thirdData); + } + + PackedCounter encodedDynamicLength; + { + uint16[] memory dynamicLengths = new uint16[](2); + dynamicLengths[0] = uint16(secondDataBytes.length); + dynamicLengths[1] = uint16(thirdDataBytes.length); + encodedDynamicLength = PackedCounterLib.pack(dynamicLengths); + } + + // Concat data + bytes memory data = abi.encodePacked( + firstDataBytes, + encodedDynamicLength.unwrap(), + secondDataBytes, + thirdDataBytes + ); + + // Create key + bytes32[] memory key = new bytes32[](1); + key[0] = bytes32("some.key"); + + // Set data + StoreCore.setRecord(table, key, data); + + // Get data + bytes memory loadedData = StoreCore.getRecord(table, key); + + assertEq(loadedData.length, data.length); + assertEq(keccak256(loadedData), keccak256(data)); + + // Expect a StoreDeleteRecord event to be emitted + vm.expectEmit(true, true, true, true); + emit StoreDeleteRecord(table, key); + + // Delete data + // !gasreport delete record (complex data, 3 slots) + StoreCore.deleteRecord(table, key); + + // Verify data is deleted + loadedData = StoreCore.getRecord(table, key); + assertEq(keccak256(loadedData), keccak256(new bytes(schema.staticDataLength()))); + } + + function testAccessEmptyData() public { + uint256 table = uint256(keccak256("some.table")); + Schema schema = SchemaLib.encode(SchemaType.UINT32, SchemaType.UINT32_ARRAY); + + StoreCore.registerSchema(table, schema); + + // Create key + bytes32[] memory key = new bytes32[](1); + key[0] = bytes32("some.key"); + + // !gasreport access non-existing record + bytes memory data1 = StoreCore.getRecord(table, key); + assertEq(data1.length, schema.staticDataLength()); + + // !gasreport access static field of non-existing record + bytes memory data2 = StoreCore.getField(table, key, 0); + assertEq(data2.length, schema.staticDataLength()); + + // !gasreport access dynamic field of non-existing record + bytes memory data3 = StoreCore.getField(table, key, 1); + assertEq(data3.length, 0); + } + + function testHooks() public { + uint256 table = uint256(keccak256("some.table")); + bytes32[] memory key = new bytes32[](1); + key[0] = keccak256("some key"); + + // Register table's schema + Schema schema = SchemaLib.encode(SchemaType.UINT128); + StoreCore.registerSchema(table, schema); + + // Create subscriber + MirrorSubscriber subscriber = new MirrorSubscriber(table, schema); + + // !gasreport register subscriber + StoreCore.registerStoreHook(table, subscriber); + + bytes memory data = abi.encodePacked(bytes16(0x0102030405060708090a0b0c0d0e0f10)); + + // !gasreport set record on table with subscriber + StoreCore.setRecord(table, key, data); + + // Get data from indexed table - the indexer should have mirrored the data there + bytes memory indexedData = StoreCore.getRecord(indexerTableId, key); + assertEq(keccak256(data), keccak256(indexedData)); + + data = abi.encodePacked(bytes16(0x1112131415161718191a1b1c1d1e1f20)); + + // !gasreport set static field on table with subscriber + StoreCore.setField(table, key, 0, data); + + // Get data from indexed table - the indexer should have mirrored the data there + indexedData = StoreCore.getRecord(indexerTableId, key); + assertEq(keccak256(data), keccak256(indexedData)); + + // !gasreport delete record on table with subscriber + StoreCore.deleteRecord(table, key); + + // Get data from indexed table - the indexer should have mirrored the data there + indexedData = StoreCore.getRecord(indexerTableId, key); + assertEq(keccak256(indexedData), keccak256(abi.encodePacked(bytes16(0)))); + } + + function testHooksDynamicData() public { + uint256 table = uint256(keccak256("some.table")); + bytes32[] memory key = new bytes32[](1); + key[0] = keccak256("some key"); + + // Register table's schema + Schema schema = SchemaLib.encode(SchemaType.UINT128, SchemaType.UINT32_ARRAY); + StoreCore.registerSchema(table, schema); + + // Create subscriber + MirrorSubscriber subscriber = new MirrorSubscriber(table, schema); + + // !gasreport register subscriber + StoreCore.registerStoreHook(table, subscriber); + + uint32[] memory arrayData = new uint32[](1); + arrayData[0] = 0x01020304; + bytes memory arrayDataBytes = EncodeArray.encode(arrayData); + PackedCounter encodedArrayDataLength = PackedCounterLib.pack(uint16(arrayDataBytes.length)); + bytes memory dynamicData = abi.encodePacked(encodedArrayDataLength.unwrap(), arrayDataBytes); + bytes memory staticData = abi.encodePacked(bytes16(0x0102030405060708090a0b0c0d0e0f10)); + bytes memory data = abi.encodePacked(staticData, dynamicData); + + // !gasreport set (dynamic) record on table with subscriber + StoreCore.setRecord(table, key, data); + + // Get data from indexed table - the indexer should have mirrored the data there + bytes memory indexedData = StoreCore.getRecord(indexerTableId, key); + assertEq(keccak256(data), keccak256(indexedData)); + + // Update dynamic data + arrayData[0] = 0x11121314; + arrayDataBytes = EncodeArray.encode(arrayData); + dynamicData = abi.encodePacked(encodedArrayDataLength.unwrap(), arrayDataBytes); + data = abi.encodePacked(staticData, dynamicData); + + // !gasreport set (dynamic) field on table with subscriber + StoreCore.setField(table, key, 1, arrayDataBytes); + + // Get data from indexed table - the indexer should have mirrored the data there + indexedData = StoreCore.getRecord(indexerTableId, key); + assertEq(keccak256(data), keccak256(indexedData)); + + // !gasreport delete (dynamic) record on table with subscriber + StoreCore.deleteRecord(table, key); + + // Get data from indexed table - the indexer should have mirrored the data there + indexedData = StoreCore.getRecord(indexerTableId, key); + assertEq(keccak256(indexedData), keccak256(abi.encodePacked(bytes16(0)))); + } +} + +uint256 constant indexerTableId = uint256(keccak256("indexer.table")); + +contract MirrorSubscriber is IStoreHook { + uint256 _table; + + constructor(uint256 table, Schema schema) { + IStore(msg.sender).registerSchema(indexerTableId, schema); + _table = table; + } + + function onSetRecord( + uint256 table, + bytes32[] memory key, + bytes memory data + ) public { + if (table != table) revert("invalid table"); + StoreSwitch.setRecord(indexerTableId, key, data); + } + + function onSetField( + uint256 table, + bytes32[] memory key, + uint8 schemaIndex, + bytes memory data + ) public { + if (table != table) revert("invalid table"); + StoreSwitch.setField(indexerTableId, key, schemaIndex, data); + } + + function onDeleteRecord(uint256 table, bytes32[] memory key) public { + if (table != table) revert("invalid table"); + StoreSwitch.deleteRecord(indexerTableId, key); + } +} diff --git a/packages/store/test/StoreSwitch.t.sol b/packages/store/test/StoreSwitch.t.sol new file mode 100644 index 0000000000..2943f52ac8 --- /dev/null +++ b/packages/store/test/StoreSwitch.t.sol @@ -0,0 +1,53 @@ +// SPDX-License-Identifier: MIT +pragma solidity >=0.8.0; + +import "forge-std/Test.sol"; +import { SchemaType } from "../src/Types.sol"; +import { StoreCore } from "../src/StoreCore.sol"; +import { StoreView } from "../src/StoreView.sol"; +import { StoreSwitch } from "../src/StoreSwitch.sol"; + +// Mock Store to call MockSystem +contract StoreSwitchTestStore is StoreView { + MockSystem mockSystem = new MockSystem(); + + function callViaDelegateCall() public returns (bool isDelegate) { + (bool success, bytes memory data) = address(mockSystem).delegatecall(abi.encodeWithSignature("isDelegateCall()")); + if (!success) revert("delegatecall failed"); + isDelegate = abi.decode(data, (bool)); + } + + function callViaCall() public returns (bool isDelegate) { + (bool success, bytes memory data) = address(mockSystem).call(abi.encodeWithSignature("isDelegateCall()")); + if (!success) revert("delegatecall failed"); + isDelegate = abi.decode(data, (bool)); + } +} + +// Mock system to wrap StoreSwitch.isDelegateCall() +contract MockSystem { + function isDelegateCall() public view returns (bool isDelegate) { + // !gasreport check if delegatecall + isDelegate = StoreSwitch.isDelegateCall(); + } +} + +contract StoreSwitchTest is Test { + StoreSwitchTestStore store; + + function setUp() public { + store = new StoreSwitchTestStore(); + } + + function testIsDelegatecall() public { + bool isDelegate = store.callViaDelegateCall(); + assertTrue(isDelegate); + } + + function testIsNoDelegatecall() public { + bool isDelegate = store.callViaCall(); + assertFalse(isDelegate); + } + + // TODO: tests for setting data on self vs msg.sender +} diff --git a/packages/store/test/Vector2.t.sol b/packages/store/test/Vector2.t.sol new file mode 100644 index 0000000000..ad0dc9c81d --- /dev/null +++ b/packages/store/test/Vector2.t.sol @@ -0,0 +1,35 @@ +// SPDX-License-Identifier: MIT +pragma solidity >=0.8.0; + +import "forge-std/Test.sol"; +import { Vector2, Vector2Data, Vector2TableId } from "../src/tables/Vector2.sol"; +import { StoreCore } from "../src/StoreCore.sol"; +import { SchemaType } from "../src/Types.sol"; +import { StoreView } from "../src/StoreView.sol"; +import { Schema } from "../src/Schema.sol"; + +contract Vector2Test is Test, StoreView { + function testRegisterAndGetSchema() public { + // !gasreport register Vector2 schema + Vector2.registerSchema(); + + Schema registeredSchema = StoreCore.getSchema(Vector2TableId); + Schema declaredSchema = Vector2.getSchema(); + + assertEq(keccak256(abi.encode(registeredSchema)), keccak256(abi.encode(declaredSchema))); + } + + function testSetAndGet() public { + Vector2.registerSchema(); + bytes32 key = keccak256("somekey"); + + // !gasreport set Vector2 record + Vector2.set({ key: key, x: 1, y: 2 }); + + // !gasreport get Vector2 record + Vector2Data memory vector = Vector2.get(key); + + assertEq(vector.x, 1); + assertEq(vector.y, 2); + } +} diff --git a/packages/store/test/tables/Callbacks.t.sol b/packages/store/test/tables/Callbacks.t.sol new file mode 100644 index 0000000000..50d9e3f2dc --- /dev/null +++ b/packages/store/test/tables/Callbacks.t.sol @@ -0,0 +1,33 @@ +// SPDX-License-Identifier: MIT +pragma solidity >=0.8.0; + +import "forge-std/Test.sol"; +import { StoreView } from "../../src/StoreView.sol"; +import { Callbacks } from "../../src/tables/Callbacks.sol"; + +contract CallbacksTest is Test, StoreView { + function testSetAndGet() public { + Callbacks.registerSchema(); + bytes32 key = keccak256("somekey"); + + bytes24[] memory callbacks = new bytes24[](1); + callbacks[0] = bytes24(abi.encode(this.testSetAndGet)); + + // !gasreport set field in Callbacks + Callbacks.set(key, callbacks); + + // !gasreport get field from Callbacks (warm) + bytes24[] memory returnedCallbacks = Callbacks.get(key); + + assertEq(returnedCallbacks.length, callbacks.length); + assertEq(returnedCallbacks[0], callbacks[0]); + + // !gasreport push field to Callbacks + Callbacks.push(key, callbacks[0]); + + returnedCallbacks = Callbacks.get(key); + + assertEq(returnedCallbacks.length, 2); + assertEq(returnedCallbacks[1], callbacks[0]); + } +} diff --git a/packages/store/test/tables/Hooks.t.sol b/packages/store/test/tables/Hooks.t.sol new file mode 100644 index 0000000000..7b5ceb0e42 --- /dev/null +++ b/packages/store/test/tables/Hooks.t.sol @@ -0,0 +1,33 @@ +// SPDX-License-Identifier: MIT +pragma solidity >=0.8.0; + +import "forge-std/Test.sol"; +import { StoreView } from "../../src/StoreView.sol"; +import { Hooks } from "../../src/tables/Hooks.sol"; + +contract HooksTest is Test, StoreView { + function testSetAndGet() public { + // Hooks schema is already registered by StoreCore + bytes32 key = keccak256("somekey"); + + address[] memory addresses = new address[](1); + addresses[0] = address(this); + + // !gasreport set field in Hooks + Hooks.set(key, addresses); + + // !gasreport get field from Hooks (warm) + address[] memory returnedAddresses = Hooks.get(key); + + assertEq(returnedAddresses.length, addresses.length); + assertEq(returnedAddresses[0], addresses[0]); + + // !gasreport push field to Hooks + Hooks.push(key, addresses[0]); + + returnedAddresses = Hooks.get(key); + + assertEq(returnedAddresses.length, 2); + assertEq(returnedAddresses[1], addresses[0]); + } +} diff --git a/packages/store/test/tightcoder/DecodeSlice.t.sol b/packages/store/test/tightcoder/DecodeSlice.t.sol new file mode 100644 index 0000000000..96e42fb387 --- /dev/null +++ b/packages/store/test/tightcoder/DecodeSlice.t.sol @@ -0,0 +1,54 @@ +// SPDX-License-Identifier: MIT +pragma solidity >=0.8.0; + +import "forge-std/Test.sol"; +import { SliceLib } from "../../src/Slice.sol"; + +contract DecodeSliceTest is Test { + function testToBytes32Array() public { + bytes memory input = new bytes(64); + input[0] = 0x01; + input[31] = 0x02; + input[32] = 0x03; + input[63] = 0x04; + + // !gasreport decode packed bytes32[] + bytes32[] memory output = SliceLib.fromBytes(input).decodeArray_bytes32(); + + assertEq(output.length, 2); + assertEq(uint256(output[0]), 0x0100000000000000000000000000000000000000000000000000000000000002); + assertEq(uint256(output[1]), 0x0300000000000000000000000000000000000000000000000000000000000004); + } + + function testToBytes32ArrayUneven() public { + bytes memory input = new bytes(65); + input[0] = 0x01; + input[31] = 0x02; + input[32] = 0x03; + input[63] = 0x04; + input[64] = 0x05; + + vm.expectRevert("unpackToArray: packedLength must be a multiple of elementSize"); + SliceLib.fromBytes(input).decodeArray_bytes32(); + } + + function testToArrayUint32() public { + uint32 num1 = 0x01020304; + uint32 num2 = 0x05060708; + bytes memory input = abi.encodePacked(num1, num2); + + // !gasreport decode packed uint32[] + uint32[] memory arr = SliceLib.fromBytes(input).decodeArray_uint32(); + + assertEq(arr.length, 2); + assertEq(arr[0], num1); + assertEq(arr[1], num2); + } + + function testToArrayUint32Uneven() public { + bytes memory input = abi.encodePacked(uint32(1), uint32(2), uint8(3)); + + vm.expectRevert("unpackToArray: packedLength must be a multiple of elementSize"); + SliceLib.fromBytes(input).decodeArray_uint32(); + } +} diff --git a/packages/store/test/tightcoder/EncodeArray.t.sol b/packages/store/test/tightcoder/EncodeArray.t.sol new file mode 100644 index 0000000000..7457a6c9a8 --- /dev/null +++ b/packages/store/test/tightcoder/EncodeArray.t.sol @@ -0,0 +1,66 @@ +// SPDX-License-Identifier: MIT +pragma solidity >=0.8.0; + +import "forge-std/Test.sol"; +import { Bytes } from "../../src/Bytes.sol"; +import { EncodeArray } from "../../src/tightcoder/EncodeArray.sol"; + +contract EncodeArrayTest is Test { + function testEncodeBytesArray() public { + bytes[] memory input = new bytes[](2); + input[0] = new bytes(32); + input[0][0] = 0x01; + input[0][31] = 0x02; + input[1] = new bytes(32); + input[1][0] = 0x03; + input[1][31] = 0x04; + + // !gasreport encode packed bytes[] + bytes memory output = EncodeArray.encode(input); + + assertEq(output.length, 64); + assertEq(uint256(Bytes.toBytes32(output, 0)), 0x0100000000000000000000000000000000000000000000000000000000000002); + assertEq(uint256(Bytes.toBytes32(output, 32)), 0x0300000000000000000000000000000000000000000000000000000000000004); + } + + function testEncodeUint8Array() public { + uint8 val0 = 0x01; + uint8 val1 = 0x02; + uint8[] memory input = new uint8[](2); + input[0] = val0; + input[1] = val1; + + // !gasreport encode packed uint8[] + bytes memory output = EncodeArray.encode(input); + + assertEq(output, abi.encodePacked(val0, val1)); + } + + function testEncodeUint16Array() public { + uint16 val0 = 0x0102; + uint16 val1 = 0x0304; + uint16 val2 = 0x0506; + uint16[] memory input = new uint16[](3); + input[0] = val0; + input[1] = val1; + input[2] = val2; + + // !gasreport encode packed uint16[] + bytes memory output = EncodeArray.encode(input); + + assertEq(output, abi.encodePacked(val0, val1, val2)); + } + + function testEncodeUint32Array() public { + uint32 val0 = 0x01020304; + uint32 val1 = 0x05060708; + uint32[] memory input = new uint32[](2); + input[0] = val0; + input[1] = val1; + + // !gasreport encode packed uint32[] + bytes memory output = EncodeArray.encode(input); + + assertEq(output, abi.encodePacked(val0, val1)); + } +} diff --git a/packages/store/test/tightcoder/TightCoder.t.sol b/packages/store/test/tightcoder/TightCoder.t.sol new file mode 100644 index 0000000000..1dd7c071ae --- /dev/null +++ b/packages/store/test/tightcoder/TightCoder.t.sol @@ -0,0 +1,103 @@ +// SPDX-License-Identifier: MIT +pragma solidity >=0.8.0; + +import "forge-std/Test.sol"; +import { SliceLib } from "../../src/Slice.sol"; +import { EncodeArray } from "../../src/tightcoder/EncodeArray.sol"; +import { SchemaType } from "../../src/Types.sol"; + +contract TightCoderTest is Test { + function testFromAndToUint32Array() public { + uint32[] memory input = new uint32[](2); + input[0] = 0x01020304; + input[1] = 0x05060708; + + bytes memory packed = EncodeArray.encode(input); + assertEq(packed.length, 8); + + // !gasreport decode packed uint32[] + uint32[] memory output = SliceLib.fromBytes(packed).decodeArray_uint32(); + + assertEq(output.length, 2); + assertEq(output[0], 0x01020304); + assertEq(output[1], 0x05060708); + } + + function testToAndFromBytes24Array() public { + bytes24[] memory input = new bytes24[](2); + input[0] = bytes24(0x0102030405060708090a0b0c0d0e0f101112131415161718); + input[1] = bytes24(0x19202122232425262728292a2b2c2d2e2f30313233343536); + + // !gasreport encode packed bytes24[] + bytes memory packed = EncodeArray.encode(input); + + assertEq(packed.length, 48); + + // !gasreport decode packed uint32[] + bytes24[] memory output = SliceLib.fromBytes(packed).decodeArray_bytes24(); + + assertEq(output.length, 2); + assertEq(output[0], input[0]); + assertEq(output[1], input[1]); + } + + /************************************************************************ + * + * Other types + * + ************************************************************************/ + + function testEncodeDecodeArray__address( + address val0, + address val1, + address val2 + ) public { + address[] memory input = new address[](3); + input[0] = val0; + input[1] = val1; + input[2] = val2; + + bytes memory output = EncodeArray.encode(input); + + assertEq(output, abi.encodePacked(val0, val1, val2)); + } + + function testEncodeDecodeArray__bool( + bool val0, + bool val1, + bool val2 + ) public { + bool[] memory input = new bool[](3); + input[0] = val0; + input[1] = val1; + input[2] = val2; + + bytes memory encoded = EncodeArray.encode(input); + assertEq(encoded, abi.encodePacked(val0, val1, val2)); + + bool[] memory decoded = SliceLib.fromBytes(encoded).decodeArray_bool(); + assertEq(decoded.length, 3); + assertEq(decoded[0], val0); + assertEq(decoded[1], val1); + assertEq(decoded[2], val2); + } + + function testEncodeDecodeArray__SchemaType() public { + SchemaType val0 = SchemaType.UINT8; + SchemaType val1 = SchemaType.INT128; + SchemaType val2 = SchemaType.STRING; + SchemaType[] memory input = new SchemaType[](3); + input[0] = val0; + input[1] = val1; + input[2] = val2; + + bytes memory encoded = EncodeArray.encode(input); + assertEq(encoded, abi.encodePacked(val0, val1, val2)); + + SchemaType[] memory decoded = SliceLib.fromBytes(encoded).decodeArray_SchemaType(); + assertEq(decoded.length, 3); + assertEq(uint8(decoded[0]), uint8(val0)); + assertEq(uint8(decoded[1]), uint8(val1)); + assertEq(uint8(decoded[2]), uint8(val2)); + } +} diff --git a/packages/store/test/tightcoder/TightCoderAuto.t.ejs b/packages/store/test/tightcoder/TightCoderAuto.t.ejs new file mode 100644 index 0000000000..a06ec307f6 --- /dev/null +++ b/packages/store/test/tightcoder/TightCoderAuto.t.ejs @@ -0,0 +1,44 @@ +// SPDX-License-Identifier: MIT +pragma solidity >=0.8.0; + +/* Autogenerated via `yarn codegen`. Do not edit the `.sol` file manually. */ + +import "forge-std/Test.sol"; +import { Bytes } from "../../src/Bytes.sol"; +import { EncodeArray } from "../../src/tightcoder/EncodeArray.sol"; +import { SliceLib } from "../../src/Slice.sol"; + +contract TightCoderAutoTest is Test { +<% for (const prefix of ["uint", "int", "bytes"]) { -%> +<% const [start, end, step] = prefix === "bytes" ? [1, 32, 1] : [8, 256, 8]; -%> +<%= prefix === "uint" ? "" : "\n" -%> + /************************************************************************ + * + * <%= prefix %><%= start %> - <%= prefix %><%= end %> + * + ************************************************************************/ +<% for (let i = start; i <= end; i += step) { -%> +<% const T = `${prefix}${i}`; -%> + + function testEncodeDecodeArray_<%= `${prefix}${i}` %>( + <%= T %> val0, + <%= T %> val1, + <%= T %> val2 + ) public { + <%= T %>[] memory input = new <%= T %>[](3); + input[0] = val0; + input[1] = val1; + input[2] = val2; + + bytes memory encoded = EncodeArray.encode(input); + assertEq(encoded, abi.encodePacked(val0, val1, val2)); + + <%= T %>[] memory decoded = SliceLib.fromBytes(encoded).decodeArray_<%= T %>(); + assertEq(decoded.length, 3); + assertEq(decoded[0], val0); + assertEq(decoded[1], val1); + assertEq(decoded[2], val2); + } +<% } -%> +<% } -%> +} diff --git a/packages/store/test/tightcoder/TightCoderAuto.t.sol b/packages/store/test/tightcoder/TightCoderAuto.t.sol new file mode 100644 index 0000000000..90fd0ecf45 --- /dev/null +++ b/packages/store/test/tightcoder/TightCoderAuto.t.sol @@ -0,0 +1,1949 @@ +// SPDX-License-Identifier: MIT +pragma solidity >=0.8.0; + +/* Autogenerated via `yarn codegen`. Do not edit the `.sol` file manually. */ + +import "forge-std/Test.sol"; +import { Bytes } from "../../src/Bytes.sol"; +import { EncodeArray } from "../../src/tightcoder/EncodeArray.sol"; +import { SliceLib } from "../../src/Slice.sol"; + +contract TightCoderAutoTest is Test { + /************************************************************************ + * + * uint8 - uint256 + * + ************************************************************************/ + + function testEncodeDecodeArray_uint8( + uint8 val0, + uint8 val1, + uint8 val2 + ) public { + uint8[] memory input = new uint8[](3); + input[0] = val0; + input[1] = val1; + input[2] = val2; + + bytes memory encoded = EncodeArray.encode(input); + assertEq(encoded, abi.encodePacked(val0, val1, val2)); + + uint8[] memory decoded = SliceLib.fromBytes(encoded).decodeArray_uint8(); + assertEq(decoded.length, 3); + assertEq(decoded[0], val0); + assertEq(decoded[1], val1); + assertEq(decoded[2], val2); + } + + function testEncodeDecodeArray_uint16( + uint16 val0, + uint16 val1, + uint16 val2 + ) public { + uint16[] memory input = new uint16[](3); + input[0] = val0; + input[1] = val1; + input[2] = val2; + + bytes memory encoded = EncodeArray.encode(input); + assertEq(encoded, abi.encodePacked(val0, val1, val2)); + + uint16[] memory decoded = SliceLib.fromBytes(encoded).decodeArray_uint16(); + assertEq(decoded.length, 3); + assertEq(decoded[0], val0); + assertEq(decoded[1], val1); + assertEq(decoded[2], val2); + } + + function testEncodeDecodeArray_uint24( + uint24 val0, + uint24 val1, + uint24 val2 + ) public { + uint24[] memory input = new uint24[](3); + input[0] = val0; + input[1] = val1; + input[2] = val2; + + bytes memory encoded = EncodeArray.encode(input); + assertEq(encoded, abi.encodePacked(val0, val1, val2)); + + uint24[] memory decoded = SliceLib.fromBytes(encoded).decodeArray_uint24(); + assertEq(decoded.length, 3); + assertEq(decoded[0], val0); + assertEq(decoded[1], val1); + assertEq(decoded[2], val2); + } + + function testEncodeDecodeArray_uint32( + uint32 val0, + uint32 val1, + uint32 val2 + ) public { + uint32[] memory input = new uint32[](3); + input[0] = val0; + input[1] = val1; + input[2] = val2; + + bytes memory encoded = EncodeArray.encode(input); + assertEq(encoded, abi.encodePacked(val0, val1, val2)); + + uint32[] memory decoded = SliceLib.fromBytes(encoded).decodeArray_uint32(); + assertEq(decoded.length, 3); + assertEq(decoded[0], val0); + assertEq(decoded[1], val1); + assertEq(decoded[2], val2); + } + + function testEncodeDecodeArray_uint40( + uint40 val0, + uint40 val1, + uint40 val2 + ) public { + uint40[] memory input = new uint40[](3); + input[0] = val0; + input[1] = val1; + input[2] = val2; + + bytes memory encoded = EncodeArray.encode(input); + assertEq(encoded, abi.encodePacked(val0, val1, val2)); + + uint40[] memory decoded = SliceLib.fromBytes(encoded).decodeArray_uint40(); + assertEq(decoded.length, 3); + assertEq(decoded[0], val0); + assertEq(decoded[1], val1); + assertEq(decoded[2], val2); + } + + function testEncodeDecodeArray_uint48( + uint48 val0, + uint48 val1, + uint48 val2 + ) public { + uint48[] memory input = new uint48[](3); + input[0] = val0; + input[1] = val1; + input[2] = val2; + + bytes memory encoded = EncodeArray.encode(input); + assertEq(encoded, abi.encodePacked(val0, val1, val2)); + + uint48[] memory decoded = SliceLib.fromBytes(encoded).decodeArray_uint48(); + assertEq(decoded.length, 3); + assertEq(decoded[0], val0); + assertEq(decoded[1], val1); + assertEq(decoded[2], val2); + } + + function testEncodeDecodeArray_uint56( + uint56 val0, + uint56 val1, + uint56 val2 + ) public { + uint56[] memory input = new uint56[](3); + input[0] = val0; + input[1] = val1; + input[2] = val2; + + bytes memory encoded = EncodeArray.encode(input); + assertEq(encoded, abi.encodePacked(val0, val1, val2)); + + uint56[] memory decoded = SliceLib.fromBytes(encoded).decodeArray_uint56(); + assertEq(decoded.length, 3); + assertEq(decoded[0], val0); + assertEq(decoded[1], val1); + assertEq(decoded[2], val2); + } + + function testEncodeDecodeArray_uint64( + uint64 val0, + uint64 val1, + uint64 val2 + ) public { + uint64[] memory input = new uint64[](3); + input[0] = val0; + input[1] = val1; + input[2] = val2; + + bytes memory encoded = EncodeArray.encode(input); + assertEq(encoded, abi.encodePacked(val0, val1, val2)); + + uint64[] memory decoded = SliceLib.fromBytes(encoded).decodeArray_uint64(); + assertEq(decoded.length, 3); + assertEq(decoded[0], val0); + assertEq(decoded[1], val1); + assertEq(decoded[2], val2); + } + + function testEncodeDecodeArray_uint72( + uint72 val0, + uint72 val1, + uint72 val2 + ) public { + uint72[] memory input = new uint72[](3); + input[0] = val0; + input[1] = val1; + input[2] = val2; + + bytes memory encoded = EncodeArray.encode(input); + assertEq(encoded, abi.encodePacked(val0, val1, val2)); + + uint72[] memory decoded = SliceLib.fromBytes(encoded).decodeArray_uint72(); + assertEq(decoded.length, 3); + assertEq(decoded[0], val0); + assertEq(decoded[1], val1); + assertEq(decoded[2], val2); + } + + function testEncodeDecodeArray_uint80( + uint80 val0, + uint80 val1, + uint80 val2 + ) public { + uint80[] memory input = new uint80[](3); + input[0] = val0; + input[1] = val1; + input[2] = val2; + + bytes memory encoded = EncodeArray.encode(input); + assertEq(encoded, abi.encodePacked(val0, val1, val2)); + + uint80[] memory decoded = SliceLib.fromBytes(encoded).decodeArray_uint80(); + assertEq(decoded.length, 3); + assertEq(decoded[0], val0); + assertEq(decoded[1], val1); + assertEq(decoded[2], val2); + } + + function testEncodeDecodeArray_uint88( + uint88 val0, + uint88 val1, + uint88 val2 + ) public { + uint88[] memory input = new uint88[](3); + input[0] = val0; + input[1] = val1; + input[2] = val2; + + bytes memory encoded = EncodeArray.encode(input); + assertEq(encoded, abi.encodePacked(val0, val1, val2)); + + uint88[] memory decoded = SliceLib.fromBytes(encoded).decodeArray_uint88(); + assertEq(decoded.length, 3); + assertEq(decoded[0], val0); + assertEq(decoded[1], val1); + assertEq(decoded[2], val2); + } + + function testEncodeDecodeArray_uint96( + uint96 val0, + uint96 val1, + uint96 val2 + ) public { + uint96[] memory input = new uint96[](3); + input[0] = val0; + input[1] = val1; + input[2] = val2; + + bytes memory encoded = EncodeArray.encode(input); + assertEq(encoded, abi.encodePacked(val0, val1, val2)); + + uint96[] memory decoded = SliceLib.fromBytes(encoded).decodeArray_uint96(); + assertEq(decoded.length, 3); + assertEq(decoded[0], val0); + assertEq(decoded[1], val1); + assertEq(decoded[2], val2); + } + + function testEncodeDecodeArray_uint104( + uint104 val0, + uint104 val1, + uint104 val2 + ) public { + uint104[] memory input = new uint104[](3); + input[0] = val0; + input[1] = val1; + input[2] = val2; + + bytes memory encoded = EncodeArray.encode(input); + assertEq(encoded, abi.encodePacked(val0, val1, val2)); + + uint104[] memory decoded = SliceLib.fromBytes(encoded).decodeArray_uint104(); + assertEq(decoded.length, 3); + assertEq(decoded[0], val0); + assertEq(decoded[1], val1); + assertEq(decoded[2], val2); + } + + function testEncodeDecodeArray_uint112( + uint112 val0, + uint112 val1, + uint112 val2 + ) public { + uint112[] memory input = new uint112[](3); + input[0] = val0; + input[1] = val1; + input[2] = val2; + + bytes memory encoded = EncodeArray.encode(input); + assertEq(encoded, abi.encodePacked(val0, val1, val2)); + + uint112[] memory decoded = SliceLib.fromBytes(encoded).decodeArray_uint112(); + assertEq(decoded.length, 3); + assertEq(decoded[0], val0); + assertEq(decoded[1], val1); + assertEq(decoded[2], val2); + } + + function testEncodeDecodeArray_uint120( + uint120 val0, + uint120 val1, + uint120 val2 + ) public { + uint120[] memory input = new uint120[](3); + input[0] = val0; + input[1] = val1; + input[2] = val2; + + bytes memory encoded = EncodeArray.encode(input); + assertEq(encoded, abi.encodePacked(val0, val1, val2)); + + uint120[] memory decoded = SliceLib.fromBytes(encoded).decodeArray_uint120(); + assertEq(decoded.length, 3); + assertEq(decoded[0], val0); + assertEq(decoded[1], val1); + assertEq(decoded[2], val2); + } + + function testEncodeDecodeArray_uint128( + uint128 val0, + uint128 val1, + uint128 val2 + ) public { + uint128[] memory input = new uint128[](3); + input[0] = val0; + input[1] = val1; + input[2] = val2; + + bytes memory encoded = EncodeArray.encode(input); + assertEq(encoded, abi.encodePacked(val0, val1, val2)); + + uint128[] memory decoded = SliceLib.fromBytes(encoded).decodeArray_uint128(); + assertEq(decoded.length, 3); + assertEq(decoded[0], val0); + assertEq(decoded[1], val1); + assertEq(decoded[2], val2); + } + + function testEncodeDecodeArray_uint136( + uint136 val0, + uint136 val1, + uint136 val2 + ) public { + uint136[] memory input = new uint136[](3); + input[0] = val0; + input[1] = val1; + input[2] = val2; + + bytes memory encoded = EncodeArray.encode(input); + assertEq(encoded, abi.encodePacked(val0, val1, val2)); + + uint136[] memory decoded = SliceLib.fromBytes(encoded).decodeArray_uint136(); + assertEq(decoded.length, 3); + assertEq(decoded[0], val0); + assertEq(decoded[1], val1); + assertEq(decoded[2], val2); + } + + function testEncodeDecodeArray_uint144( + uint144 val0, + uint144 val1, + uint144 val2 + ) public { + uint144[] memory input = new uint144[](3); + input[0] = val0; + input[1] = val1; + input[2] = val2; + + bytes memory encoded = EncodeArray.encode(input); + assertEq(encoded, abi.encodePacked(val0, val1, val2)); + + uint144[] memory decoded = SliceLib.fromBytes(encoded).decodeArray_uint144(); + assertEq(decoded.length, 3); + assertEq(decoded[0], val0); + assertEq(decoded[1], val1); + assertEq(decoded[2], val2); + } + + function testEncodeDecodeArray_uint152( + uint152 val0, + uint152 val1, + uint152 val2 + ) public { + uint152[] memory input = new uint152[](3); + input[0] = val0; + input[1] = val1; + input[2] = val2; + + bytes memory encoded = EncodeArray.encode(input); + assertEq(encoded, abi.encodePacked(val0, val1, val2)); + + uint152[] memory decoded = SliceLib.fromBytes(encoded).decodeArray_uint152(); + assertEq(decoded.length, 3); + assertEq(decoded[0], val0); + assertEq(decoded[1], val1); + assertEq(decoded[2], val2); + } + + function testEncodeDecodeArray_uint160( + uint160 val0, + uint160 val1, + uint160 val2 + ) public { + uint160[] memory input = new uint160[](3); + input[0] = val0; + input[1] = val1; + input[2] = val2; + + bytes memory encoded = EncodeArray.encode(input); + assertEq(encoded, abi.encodePacked(val0, val1, val2)); + + uint160[] memory decoded = SliceLib.fromBytes(encoded).decodeArray_uint160(); + assertEq(decoded.length, 3); + assertEq(decoded[0], val0); + assertEq(decoded[1], val1); + assertEq(decoded[2], val2); + } + + function testEncodeDecodeArray_uint168( + uint168 val0, + uint168 val1, + uint168 val2 + ) public { + uint168[] memory input = new uint168[](3); + input[0] = val0; + input[1] = val1; + input[2] = val2; + + bytes memory encoded = EncodeArray.encode(input); + assertEq(encoded, abi.encodePacked(val0, val1, val2)); + + uint168[] memory decoded = SliceLib.fromBytes(encoded).decodeArray_uint168(); + assertEq(decoded.length, 3); + assertEq(decoded[0], val0); + assertEq(decoded[1], val1); + assertEq(decoded[2], val2); + } + + function testEncodeDecodeArray_uint176( + uint176 val0, + uint176 val1, + uint176 val2 + ) public { + uint176[] memory input = new uint176[](3); + input[0] = val0; + input[1] = val1; + input[2] = val2; + + bytes memory encoded = EncodeArray.encode(input); + assertEq(encoded, abi.encodePacked(val0, val1, val2)); + + uint176[] memory decoded = SliceLib.fromBytes(encoded).decodeArray_uint176(); + assertEq(decoded.length, 3); + assertEq(decoded[0], val0); + assertEq(decoded[1], val1); + assertEq(decoded[2], val2); + } + + function testEncodeDecodeArray_uint184( + uint184 val0, + uint184 val1, + uint184 val2 + ) public { + uint184[] memory input = new uint184[](3); + input[0] = val0; + input[1] = val1; + input[2] = val2; + + bytes memory encoded = EncodeArray.encode(input); + assertEq(encoded, abi.encodePacked(val0, val1, val2)); + + uint184[] memory decoded = SliceLib.fromBytes(encoded).decodeArray_uint184(); + assertEq(decoded.length, 3); + assertEq(decoded[0], val0); + assertEq(decoded[1], val1); + assertEq(decoded[2], val2); + } + + function testEncodeDecodeArray_uint192( + uint192 val0, + uint192 val1, + uint192 val2 + ) public { + uint192[] memory input = new uint192[](3); + input[0] = val0; + input[1] = val1; + input[2] = val2; + + bytes memory encoded = EncodeArray.encode(input); + assertEq(encoded, abi.encodePacked(val0, val1, val2)); + + uint192[] memory decoded = SliceLib.fromBytes(encoded).decodeArray_uint192(); + assertEq(decoded.length, 3); + assertEq(decoded[0], val0); + assertEq(decoded[1], val1); + assertEq(decoded[2], val2); + } + + function testEncodeDecodeArray_uint200( + uint200 val0, + uint200 val1, + uint200 val2 + ) public { + uint200[] memory input = new uint200[](3); + input[0] = val0; + input[1] = val1; + input[2] = val2; + + bytes memory encoded = EncodeArray.encode(input); + assertEq(encoded, abi.encodePacked(val0, val1, val2)); + + uint200[] memory decoded = SliceLib.fromBytes(encoded).decodeArray_uint200(); + assertEq(decoded.length, 3); + assertEq(decoded[0], val0); + assertEq(decoded[1], val1); + assertEq(decoded[2], val2); + } + + function testEncodeDecodeArray_uint208( + uint208 val0, + uint208 val1, + uint208 val2 + ) public { + uint208[] memory input = new uint208[](3); + input[0] = val0; + input[1] = val1; + input[2] = val2; + + bytes memory encoded = EncodeArray.encode(input); + assertEq(encoded, abi.encodePacked(val0, val1, val2)); + + uint208[] memory decoded = SliceLib.fromBytes(encoded).decodeArray_uint208(); + assertEq(decoded.length, 3); + assertEq(decoded[0], val0); + assertEq(decoded[1], val1); + assertEq(decoded[2], val2); + } + + function testEncodeDecodeArray_uint216( + uint216 val0, + uint216 val1, + uint216 val2 + ) public { + uint216[] memory input = new uint216[](3); + input[0] = val0; + input[1] = val1; + input[2] = val2; + + bytes memory encoded = EncodeArray.encode(input); + assertEq(encoded, abi.encodePacked(val0, val1, val2)); + + uint216[] memory decoded = SliceLib.fromBytes(encoded).decodeArray_uint216(); + assertEq(decoded.length, 3); + assertEq(decoded[0], val0); + assertEq(decoded[1], val1); + assertEq(decoded[2], val2); + } + + function testEncodeDecodeArray_uint224( + uint224 val0, + uint224 val1, + uint224 val2 + ) public { + uint224[] memory input = new uint224[](3); + input[0] = val0; + input[1] = val1; + input[2] = val2; + + bytes memory encoded = EncodeArray.encode(input); + assertEq(encoded, abi.encodePacked(val0, val1, val2)); + + uint224[] memory decoded = SliceLib.fromBytes(encoded).decodeArray_uint224(); + assertEq(decoded.length, 3); + assertEq(decoded[0], val0); + assertEq(decoded[1], val1); + assertEq(decoded[2], val2); + } + + function testEncodeDecodeArray_uint232( + uint232 val0, + uint232 val1, + uint232 val2 + ) public { + uint232[] memory input = new uint232[](3); + input[0] = val0; + input[1] = val1; + input[2] = val2; + + bytes memory encoded = EncodeArray.encode(input); + assertEq(encoded, abi.encodePacked(val0, val1, val2)); + + uint232[] memory decoded = SliceLib.fromBytes(encoded).decodeArray_uint232(); + assertEq(decoded.length, 3); + assertEq(decoded[0], val0); + assertEq(decoded[1], val1); + assertEq(decoded[2], val2); + } + + function testEncodeDecodeArray_uint240( + uint240 val0, + uint240 val1, + uint240 val2 + ) public { + uint240[] memory input = new uint240[](3); + input[0] = val0; + input[1] = val1; + input[2] = val2; + + bytes memory encoded = EncodeArray.encode(input); + assertEq(encoded, abi.encodePacked(val0, val1, val2)); + + uint240[] memory decoded = SliceLib.fromBytes(encoded).decodeArray_uint240(); + assertEq(decoded.length, 3); + assertEq(decoded[0], val0); + assertEq(decoded[1], val1); + assertEq(decoded[2], val2); + } + + function testEncodeDecodeArray_uint248( + uint248 val0, + uint248 val1, + uint248 val2 + ) public { + uint248[] memory input = new uint248[](3); + input[0] = val0; + input[1] = val1; + input[2] = val2; + + bytes memory encoded = EncodeArray.encode(input); + assertEq(encoded, abi.encodePacked(val0, val1, val2)); + + uint248[] memory decoded = SliceLib.fromBytes(encoded).decodeArray_uint248(); + assertEq(decoded.length, 3); + assertEq(decoded[0], val0); + assertEq(decoded[1], val1); + assertEq(decoded[2], val2); + } + + function testEncodeDecodeArray_uint256( + uint256 val0, + uint256 val1, + uint256 val2 + ) public { + uint256[] memory input = new uint256[](3); + input[0] = val0; + input[1] = val1; + input[2] = val2; + + bytes memory encoded = EncodeArray.encode(input); + assertEq(encoded, abi.encodePacked(val0, val1, val2)); + + uint256[] memory decoded = SliceLib.fromBytes(encoded).decodeArray_uint256(); + assertEq(decoded.length, 3); + assertEq(decoded[0], val0); + assertEq(decoded[1], val1); + assertEq(decoded[2], val2); + } + + /************************************************************************ + * + * int8 - int256 + * + ************************************************************************/ + + function testEncodeDecodeArray_int8( + int8 val0, + int8 val1, + int8 val2 + ) public { + int8[] memory input = new int8[](3); + input[0] = val0; + input[1] = val1; + input[2] = val2; + + bytes memory encoded = EncodeArray.encode(input); + assertEq(encoded, abi.encodePacked(val0, val1, val2)); + + int8[] memory decoded = SliceLib.fromBytes(encoded).decodeArray_int8(); + assertEq(decoded.length, 3); + assertEq(decoded[0], val0); + assertEq(decoded[1], val1); + assertEq(decoded[2], val2); + } + + function testEncodeDecodeArray_int16( + int16 val0, + int16 val1, + int16 val2 + ) public { + int16[] memory input = new int16[](3); + input[0] = val0; + input[1] = val1; + input[2] = val2; + + bytes memory encoded = EncodeArray.encode(input); + assertEq(encoded, abi.encodePacked(val0, val1, val2)); + + int16[] memory decoded = SliceLib.fromBytes(encoded).decodeArray_int16(); + assertEq(decoded.length, 3); + assertEq(decoded[0], val0); + assertEq(decoded[1], val1); + assertEq(decoded[2], val2); + } + + function testEncodeDecodeArray_int24( + int24 val0, + int24 val1, + int24 val2 + ) public { + int24[] memory input = new int24[](3); + input[0] = val0; + input[1] = val1; + input[2] = val2; + + bytes memory encoded = EncodeArray.encode(input); + assertEq(encoded, abi.encodePacked(val0, val1, val2)); + + int24[] memory decoded = SliceLib.fromBytes(encoded).decodeArray_int24(); + assertEq(decoded.length, 3); + assertEq(decoded[0], val0); + assertEq(decoded[1], val1); + assertEq(decoded[2], val2); + } + + function testEncodeDecodeArray_int32( + int32 val0, + int32 val1, + int32 val2 + ) public { + int32[] memory input = new int32[](3); + input[0] = val0; + input[1] = val1; + input[2] = val2; + + bytes memory encoded = EncodeArray.encode(input); + assertEq(encoded, abi.encodePacked(val0, val1, val2)); + + int32[] memory decoded = SliceLib.fromBytes(encoded).decodeArray_int32(); + assertEq(decoded.length, 3); + assertEq(decoded[0], val0); + assertEq(decoded[1], val1); + assertEq(decoded[2], val2); + } + + function testEncodeDecodeArray_int40( + int40 val0, + int40 val1, + int40 val2 + ) public { + int40[] memory input = new int40[](3); + input[0] = val0; + input[1] = val1; + input[2] = val2; + + bytes memory encoded = EncodeArray.encode(input); + assertEq(encoded, abi.encodePacked(val0, val1, val2)); + + int40[] memory decoded = SliceLib.fromBytes(encoded).decodeArray_int40(); + assertEq(decoded.length, 3); + assertEq(decoded[0], val0); + assertEq(decoded[1], val1); + assertEq(decoded[2], val2); + } + + function testEncodeDecodeArray_int48( + int48 val0, + int48 val1, + int48 val2 + ) public { + int48[] memory input = new int48[](3); + input[0] = val0; + input[1] = val1; + input[2] = val2; + + bytes memory encoded = EncodeArray.encode(input); + assertEq(encoded, abi.encodePacked(val0, val1, val2)); + + int48[] memory decoded = SliceLib.fromBytes(encoded).decodeArray_int48(); + assertEq(decoded.length, 3); + assertEq(decoded[0], val0); + assertEq(decoded[1], val1); + assertEq(decoded[2], val2); + } + + function testEncodeDecodeArray_int56( + int56 val0, + int56 val1, + int56 val2 + ) public { + int56[] memory input = new int56[](3); + input[0] = val0; + input[1] = val1; + input[2] = val2; + + bytes memory encoded = EncodeArray.encode(input); + assertEq(encoded, abi.encodePacked(val0, val1, val2)); + + int56[] memory decoded = SliceLib.fromBytes(encoded).decodeArray_int56(); + assertEq(decoded.length, 3); + assertEq(decoded[0], val0); + assertEq(decoded[1], val1); + assertEq(decoded[2], val2); + } + + function testEncodeDecodeArray_int64( + int64 val0, + int64 val1, + int64 val2 + ) public { + int64[] memory input = new int64[](3); + input[0] = val0; + input[1] = val1; + input[2] = val2; + + bytes memory encoded = EncodeArray.encode(input); + assertEq(encoded, abi.encodePacked(val0, val1, val2)); + + int64[] memory decoded = SliceLib.fromBytes(encoded).decodeArray_int64(); + assertEq(decoded.length, 3); + assertEq(decoded[0], val0); + assertEq(decoded[1], val1); + assertEq(decoded[2], val2); + } + + function testEncodeDecodeArray_int72( + int72 val0, + int72 val1, + int72 val2 + ) public { + int72[] memory input = new int72[](3); + input[0] = val0; + input[1] = val1; + input[2] = val2; + + bytes memory encoded = EncodeArray.encode(input); + assertEq(encoded, abi.encodePacked(val0, val1, val2)); + + int72[] memory decoded = SliceLib.fromBytes(encoded).decodeArray_int72(); + assertEq(decoded.length, 3); + assertEq(decoded[0], val0); + assertEq(decoded[1], val1); + assertEq(decoded[2], val2); + } + + function testEncodeDecodeArray_int80( + int80 val0, + int80 val1, + int80 val2 + ) public { + int80[] memory input = new int80[](3); + input[0] = val0; + input[1] = val1; + input[2] = val2; + + bytes memory encoded = EncodeArray.encode(input); + assertEq(encoded, abi.encodePacked(val0, val1, val2)); + + int80[] memory decoded = SliceLib.fromBytes(encoded).decodeArray_int80(); + assertEq(decoded.length, 3); + assertEq(decoded[0], val0); + assertEq(decoded[1], val1); + assertEq(decoded[2], val2); + } + + function testEncodeDecodeArray_int88( + int88 val0, + int88 val1, + int88 val2 + ) public { + int88[] memory input = new int88[](3); + input[0] = val0; + input[1] = val1; + input[2] = val2; + + bytes memory encoded = EncodeArray.encode(input); + assertEq(encoded, abi.encodePacked(val0, val1, val2)); + + int88[] memory decoded = SliceLib.fromBytes(encoded).decodeArray_int88(); + assertEq(decoded.length, 3); + assertEq(decoded[0], val0); + assertEq(decoded[1], val1); + assertEq(decoded[2], val2); + } + + function testEncodeDecodeArray_int96( + int96 val0, + int96 val1, + int96 val2 + ) public { + int96[] memory input = new int96[](3); + input[0] = val0; + input[1] = val1; + input[2] = val2; + + bytes memory encoded = EncodeArray.encode(input); + assertEq(encoded, abi.encodePacked(val0, val1, val2)); + + int96[] memory decoded = SliceLib.fromBytes(encoded).decodeArray_int96(); + assertEq(decoded.length, 3); + assertEq(decoded[0], val0); + assertEq(decoded[1], val1); + assertEq(decoded[2], val2); + } + + function testEncodeDecodeArray_int104( + int104 val0, + int104 val1, + int104 val2 + ) public { + int104[] memory input = new int104[](3); + input[0] = val0; + input[1] = val1; + input[2] = val2; + + bytes memory encoded = EncodeArray.encode(input); + assertEq(encoded, abi.encodePacked(val0, val1, val2)); + + int104[] memory decoded = SliceLib.fromBytes(encoded).decodeArray_int104(); + assertEq(decoded.length, 3); + assertEq(decoded[0], val0); + assertEq(decoded[1], val1); + assertEq(decoded[2], val2); + } + + function testEncodeDecodeArray_int112( + int112 val0, + int112 val1, + int112 val2 + ) public { + int112[] memory input = new int112[](3); + input[0] = val0; + input[1] = val1; + input[2] = val2; + + bytes memory encoded = EncodeArray.encode(input); + assertEq(encoded, abi.encodePacked(val0, val1, val2)); + + int112[] memory decoded = SliceLib.fromBytes(encoded).decodeArray_int112(); + assertEq(decoded.length, 3); + assertEq(decoded[0], val0); + assertEq(decoded[1], val1); + assertEq(decoded[2], val2); + } + + function testEncodeDecodeArray_int120( + int120 val0, + int120 val1, + int120 val2 + ) public { + int120[] memory input = new int120[](3); + input[0] = val0; + input[1] = val1; + input[2] = val2; + + bytes memory encoded = EncodeArray.encode(input); + assertEq(encoded, abi.encodePacked(val0, val1, val2)); + + int120[] memory decoded = SliceLib.fromBytes(encoded).decodeArray_int120(); + assertEq(decoded.length, 3); + assertEq(decoded[0], val0); + assertEq(decoded[1], val1); + assertEq(decoded[2], val2); + } + + function testEncodeDecodeArray_int128( + int128 val0, + int128 val1, + int128 val2 + ) public { + int128[] memory input = new int128[](3); + input[0] = val0; + input[1] = val1; + input[2] = val2; + + bytes memory encoded = EncodeArray.encode(input); + assertEq(encoded, abi.encodePacked(val0, val1, val2)); + + int128[] memory decoded = SliceLib.fromBytes(encoded).decodeArray_int128(); + assertEq(decoded.length, 3); + assertEq(decoded[0], val0); + assertEq(decoded[1], val1); + assertEq(decoded[2], val2); + } + + function testEncodeDecodeArray_int136( + int136 val0, + int136 val1, + int136 val2 + ) public { + int136[] memory input = new int136[](3); + input[0] = val0; + input[1] = val1; + input[2] = val2; + + bytes memory encoded = EncodeArray.encode(input); + assertEq(encoded, abi.encodePacked(val0, val1, val2)); + + int136[] memory decoded = SliceLib.fromBytes(encoded).decodeArray_int136(); + assertEq(decoded.length, 3); + assertEq(decoded[0], val0); + assertEq(decoded[1], val1); + assertEq(decoded[2], val2); + } + + function testEncodeDecodeArray_int144( + int144 val0, + int144 val1, + int144 val2 + ) public { + int144[] memory input = new int144[](3); + input[0] = val0; + input[1] = val1; + input[2] = val2; + + bytes memory encoded = EncodeArray.encode(input); + assertEq(encoded, abi.encodePacked(val0, val1, val2)); + + int144[] memory decoded = SliceLib.fromBytes(encoded).decodeArray_int144(); + assertEq(decoded.length, 3); + assertEq(decoded[0], val0); + assertEq(decoded[1], val1); + assertEq(decoded[2], val2); + } + + function testEncodeDecodeArray_int152( + int152 val0, + int152 val1, + int152 val2 + ) public { + int152[] memory input = new int152[](3); + input[0] = val0; + input[1] = val1; + input[2] = val2; + + bytes memory encoded = EncodeArray.encode(input); + assertEq(encoded, abi.encodePacked(val0, val1, val2)); + + int152[] memory decoded = SliceLib.fromBytes(encoded).decodeArray_int152(); + assertEq(decoded.length, 3); + assertEq(decoded[0], val0); + assertEq(decoded[1], val1); + assertEq(decoded[2], val2); + } + + function testEncodeDecodeArray_int160( + int160 val0, + int160 val1, + int160 val2 + ) public { + int160[] memory input = new int160[](3); + input[0] = val0; + input[1] = val1; + input[2] = val2; + + bytes memory encoded = EncodeArray.encode(input); + assertEq(encoded, abi.encodePacked(val0, val1, val2)); + + int160[] memory decoded = SliceLib.fromBytes(encoded).decodeArray_int160(); + assertEq(decoded.length, 3); + assertEq(decoded[0], val0); + assertEq(decoded[1], val1); + assertEq(decoded[2], val2); + } + + function testEncodeDecodeArray_int168( + int168 val0, + int168 val1, + int168 val2 + ) public { + int168[] memory input = new int168[](3); + input[0] = val0; + input[1] = val1; + input[2] = val2; + + bytes memory encoded = EncodeArray.encode(input); + assertEq(encoded, abi.encodePacked(val0, val1, val2)); + + int168[] memory decoded = SliceLib.fromBytes(encoded).decodeArray_int168(); + assertEq(decoded.length, 3); + assertEq(decoded[0], val0); + assertEq(decoded[1], val1); + assertEq(decoded[2], val2); + } + + function testEncodeDecodeArray_int176( + int176 val0, + int176 val1, + int176 val2 + ) public { + int176[] memory input = new int176[](3); + input[0] = val0; + input[1] = val1; + input[2] = val2; + + bytes memory encoded = EncodeArray.encode(input); + assertEq(encoded, abi.encodePacked(val0, val1, val2)); + + int176[] memory decoded = SliceLib.fromBytes(encoded).decodeArray_int176(); + assertEq(decoded.length, 3); + assertEq(decoded[0], val0); + assertEq(decoded[1], val1); + assertEq(decoded[2], val2); + } + + function testEncodeDecodeArray_int184( + int184 val0, + int184 val1, + int184 val2 + ) public { + int184[] memory input = new int184[](3); + input[0] = val0; + input[1] = val1; + input[2] = val2; + + bytes memory encoded = EncodeArray.encode(input); + assertEq(encoded, abi.encodePacked(val0, val1, val2)); + + int184[] memory decoded = SliceLib.fromBytes(encoded).decodeArray_int184(); + assertEq(decoded.length, 3); + assertEq(decoded[0], val0); + assertEq(decoded[1], val1); + assertEq(decoded[2], val2); + } + + function testEncodeDecodeArray_int192( + int192 val0, + int192 val1, + int192 val2 + ) public { + int192[] memory input = new int192[](3); + input[0] = val0; + input[1] = val1; + input[2] = val2; + + bytes memory encoded = EncodeArray.encode(input); + assertEq(encoded, abi.encodePacked(val0, val1, val2)); + + int192[] memory decoded = SliceLib.fromBytes(encoded).decodeArray_int192(); + assertEq(decoded.length, 3); + assertEq(decoded[0], val0); + assertEq(decoded[1], val1); + assertEq(decoded[2], val2); + } + + function testEncodeDecodeArray_int200( + int200 val0, + int200 val1, + int200 val2 + ) public { + int200[] memory input = new int200[](3); + input[0] = val0; + input[1] = val1; + input[2] = val2; + + bytes memory encoded = EncodeArray.encode(input); + assertEq(encoded, abi.encodePacked(val0, val1, val2)); + + int200[] memory decoded = SliceLib.fromBytes(encoded).decodeArray_int200(); + assertEq(decoded.length, 3); + assertEq(decoded[0], val0); + assertEq(decoded[1], val1); + assertEq(decoded[2], val2); + } + + function testEncodeDecodeArray_int208( + int208 val0, + int208 val1, + int208 val2 + ) public { + int208[] memory input = new int208[](3); + input[0] = val0; + input[1] = val1; + input[2] = val2; + + bytes memory encoded = EncodeArray.encode(input); + assertEq(encoded, abi.encodePacked(val0, val1, val2)); + + int208[] memory decoded = SliceLib.fromBytes(encoded).decodeArray_int208(); + assertEq(decoded.length, 3); + assertEq(decoded[0], val0); + assertEq(decoded[1], val1); + assertEq(decoded[2], val2); + } + + function testEncodeDecodeArray_int216( + int216 val0, + int216 val1, + int216 val2 + ) public { + int216[] memory input = new int216[](3); + input[0] = val0; + input[1] = val1; + input[2] = val2; + + bytes memory encoded = EncodeArray.encode(input); + assertEq(encoded, abi.encodePacked(val0, val1, val2)); + + int216[] memory decoded = SliceLib.fromBytes(encoded).decodeArray_int216(); + assertEq(decoded.length, 3); + assertEq(decoded[0], val0); + assertEq(decoded[1], val1); + assertEq(decoded[2], val2); + } + + function testEncodeDecodeArray_int224( + int224 val0, + int224 val1, + int224 val2 + ) public { + int224[] memory input = new int224[](3); + input[0] = val0; + input[1] = val1; + input[2] = val2; + + bytes memory encoded = EncodeArray.encode(input); + assertEq(encoded, abi.encodePacked(val0, val1, val2)); + + int224[] memory decoded = SliceLib.fromBytes(encoded).decodeArray_int224(); + assertEq(decoded.length, 3); + assertEq(decoded[0], val0); + assertEq(decoded[1], val1); + assertEq(decoded[2], val2); + } + + function testEncodeDecodeArray_int232( + int232 val0, + int232 val1, + int232 val2 + ) public { + int232[] memory input = new int232[](3); + input[0] = val0; + input[1] = val1; + input[2] = val2; + + bytes memory encoded = EncodeArray.encode(input); + assertEq(encoded, abi.encodePacked(val0, val1, val2)); + + int232[] memory decoded = SliceLib.fromBytes(encoded).decodeArray_int232(); + assertEq(decoded.length, 3); + assertEq(decoded[0], val0); + assertEq(decoded[1], val1); + assertEq(decoded[2], val2); + } + + function testEncodeDecodeArray_int240( + int240 val0, + int240 val1, + int240 val2 + ) public { + int240[] memory input = new int240[](3); + input[0] = val0; + input[1] = val1; + input[2] = val2; + + bytes memory encoded = EncodeArray.encode(input); + assertEq(encoded, abi.encodePacked(val0, val1, val2)); + + int240[] memory decoded = SliceLib.fromBytes(encoded).decodeArray_int240(); + assertEq(decoded.length, 3); + assertEq(decoded[0], val0); + assertEq(decoded[1], val1); + assertEq(decoded[2], val2); + } + + function testEncodeDecodeArray_int248( + int248 val0, + int248 val1, + int248 val2 + ) public { + int248[] memory input = new int248[](3); + input[0] = val0; + input[1] = val1; + input[2] = val2; + + bytes memory encoded = EncodeArray.encode(input); + assertEq(encoded, abi.encodePacked(val0, val1, val2)); + + int248[] memory decoded = SliceLib.fromBytes(encoded).decodeArray_int248(); + assertEq(decoded.length, 3); + assertEq(decoded[0], val0); + assertEq(decoded[1], val1); + assertEq(decoded[2], val2); + } + + function testEncodeDecodeArray_int256( + int256 val0, + int256 val1, + int256 val2 + ) public { + int256[] memory input = new int256[](3); + input[0] = val0; + input[1] = val1; + input[2] = val2; + + bytes memory encoded = EncodeArray.encode(input); + assertEq(encoded, abi.encodePacked(val0, val1, val2)); + + int256[] memory decoded = SliceLib.fromBytes(encoded).decodeArray_int256(); + assertEq(decoded.length, 3); + assertEq(decoded[0], val0); + assertEq(decoded[1], val1); + assertEq(decoded[2], val2); + } + + /************************************************************************ + * + * bytes1 - bytes32 + * + ************************************************************************/ + + function testEncodeDecodeArray_bytes1( + bytes1 val0, + bytes1 val1, + bytes1 val2 + ) public { + bytes1[] memory input = new bytes1[](3); + input[0] = val0; + input[1] = val1; + input[2] = val2; + + bytes memory encoded = EncodeArray.encode(input); + assertEq(encoded, abi.encodePacked(val0, val1, val2)); + + bytes1[] memory decoded = SliceLib.fromBytes(encoded).decodeArray_bytes1(); + assertEq(decoded.length, 3); + assertEq(decoded[0], val0); + assertEq(decoded[1], val1); + assertEq(decoded[2], val2); + } + + function testEncodeDecodeArray_bytes2( + bytes2 val0, + bytes2 val1, + bytes2 val2 + ) public { + bytes2[] memory input = new bytes2[](3); + input[0] = val0; + input[1] = val1; + input[2] = val2; + + bytes memory encoded = EncodeArray.encode(input); + assertEq(encoded, abi.encodePacked(val0, val1, val2)); + + bytes2[] memory decoded = SliceLib.fromBytes(encoded).decodeArray_bytes2(); + assertEq(decoded.length, 3); + assertEq(decoded[0], val0); + assertEq(decoded[1], val1); + assertEq(decoded[2], val2); + } + + function testEncodeDecodeArray_bytes3( + bytes3 val0, + bytes3 val1, + bytes3 val2 + ) public { + bytes3[] memory input = new bytes3[](3); + input[0] = val0; + input[1] = val1; + input[2] = val2; + + bytes memory encoded = EncodeArray.encode(input); + assertEq(encoded, abi.encodePacked(val0, val1, val2)); + + bytes3[] memory decoded = SliceLib.fromBytes(encoded).decodeArray_bytes3(); + assertEq(decoded.length, 3); + assertEq(decoded[0], val0); + assertEq(decoded[1], val1); + assertEq(decoded[2], val2); + } + + function testEncodeDecodeArray_bytes4( + bytes4 val0, + bytes4 val1, + bytes4 val2 + ) public { + bytes4[] memory input = new bytes4[](3); + input[0] = val0; + input[1] = val1; + input[2] = val2; + + bytes memory encoded = EncodeArray.encode(input); + assertEq(encoded, abi.encodePacked(val0, val1, val2)); + + bytes4[] memory decoded = SliceLib.fromBytes(encoded).decodeArray_bytes4(); + assertEq(decoded.length, 3); + assertEq(decoded[0], val0); + assertEq(decoded[1], val1); + assertEq(decoded[2], val2); + } + + function testEncodeDecodeArray_bytes5( + bytes5 val0, + bytes5 val1, + bytes5 val2 + ) public { + bytes5[] memory input = new bytes5[](3); + input[0] = val0; + input[1] = val1; + input[2] = val2; + + bytes memory encoded = EncodeArray.encode(input); + assertEq(encoded, abi.encodePacked(val0, val1, val2)); + + bytes5[] memory decoded = SliceLib.fromBytes(encoded).decodeArray_bytes5(); + assertEq(decoded.length, 3); + assertEq(decoded[0], val0); + assertEq(decoded[1], val1); + assertEq(decoded[2], val2); + } + + function testEncodeDecodeArray_bytes6( + bytes6 val0, + bytes6 val1, + bytes6 val2 + ) public { + bytes6[] memory input = new bytes6[](3); + input[0] = val0; + input[1] = val1; + input[2] = val2; + + bytes memory encoded = EncodeArray.encode(input); + assertEq(encoded, abi.encodePacked(val0, val1, val2)); + + bytes6[] memory decoded = SliceLib.fromBytes(encoded).decodeArray_bytes6(); + assertEq(decoded.length, 3); + assertEq(decoded[0], val0); + assertEq(decoded[1], val1); + assertEq(decoded[2], val2); + } + + function testEncodeDecodeArray_bytes7( + bytes7 val0, + bytes7 val1, + bytes7 val2 + ) public { + bytes7[] memory input = new bytes7[](3); + input[0] = val0; + input[1] = val1; + input[2] = val2; + + bytes memory encoded = EncodeArray.encode(input); + assertEq(encoded, abi.encodePacked(val0, val1, val2)); + + bytes7[] memory decoded = SliceLib.fromBytes(encoded).decodeArray_bytes7(); + assertEq(decoded.length, 3); + assertEq(decoded[0], val0); + assertEq(decoded[1], val1); + assertEq(decoded[2], val2); + } + + function testEncodeDecodeArray_bytes8( + bytes8 val0, + bytes8 val1, + bytes8 val2 + ) public { + bytes8[] memory input = new bytes8[](3); + input[0] = val0; + input[1] = val1; + input[2] = val2; + + bytes memory encoded = EncodeArray.encode(input); + assertEq(encoded, abi.encodePacked(val0, val1, val2)); + + bytes8[] memory decoded = SliceLib.fromBytes(encoded).decodeArray_bytes8(); + assertEq(decoded.length, 3); + assertEq(decoded[0], val0); + assertEq(decoded[1], val1); + assertEq(decoded[2], val2); + } + + function testEncodeDecodeArray_bytes9( + bytes9 val0, + bytes9 val1, + bytes9 val2 + ) public { + bytes9[] memory input = new bytes9[](3); + input[0] = val0; + input[1] = val1; + input[2] = val2; + + bytes memory encoded = EncodeArray.encode(input); + assertEq(encoded, abi.encodePacked(val0, val1, val2)); + + bytes9[] memory decoded = SliceLib.fromBytes(encoded).decodeArray_bytes9(); + assertEq(decoded.length, 3); + assertEq(decoded[0], val0); + assertEq(decoded[1], val1); + assertEq(decoded[2], val2); + } + + function testEncodeDecodeArray_bytes10( + bytes10 val0, + bytes10 val1, + bytes10 val2 + ) public { + bytes10[] memory input = new bytes10[](3); + input[0] = val0; + input[1] = val1; + input[2] = val2; + + bytes memory encoded = EncodeArray.encode(input); + assertEq(encoded, abi.encodePacked(val0, val1, val2)); + + bytes10[] memory decoded = SliceLib.fromBytes(encoded).decodeArray_bytes10(); + assertEq(decoded.length, 3); + assertEq(decoded[0], val0); + assertEq(decoded[1], val1); + assertEq(decoded[2], val2); + } + + function testEncodeDecodeArray_bytes11( + bytes11 val0, + bytes11 val1, + bytes11 val2 + ) public { + bytes11[] memory input = new bytes11[](3); + input[0] = val0; + input[1] = val1; + input[2] = val2; + + bytes memory encoded = EncodeArray.encode(input); + assertEq(encoded, abi.encodePacked(val0, val1, val2)); + + bytes11[] memory decoded = SliceLib.fromBytes(encoded).decodeArray_bytes11(); + assertEq(decoded.length, 3); + assertEq(decoded[0], val0); + assertEq(decoded[1], val1); + assertEq(decoded[2], val2); + } + + function testEncodeDecodeArray_bytes12( + bytes12 val0, + bytes12 val1, + bytes12 val2 + ) public { + bytes12[] memory input = new bytes12[](3); + input[0] = val0; + input[1] = val1; + input[2] = val2; + + bytes memory encoded = EncodeArray.encode(input); + assertEq(encoded, abi.encodePacked(val0, val1, val2)); + + bytes12[] memory decoded = SliceLib.fromBytes(encoded).decodeArray_bytes12(); + assertEq(decoded.length, 3); + assertEq(decoded[0], val0); + assertEq(decoded[1], val1); + assertEq(decoded[2], val2); + } + + function testEncodeDecodeArray_bytes13( + bytes13 val0, + bytes13 val1, + bytes13 val2 + ) public { + bytes13[] memory input = new bytes13[](3); + input[0] = val0; + input[1] = val1; + input[2] = val2; + + bytes memory encoded = EncodeArray.encode(input); + assertEq(encoded, abi.encodePacked(val0, val1, val2)); + + bytes13[] memory decoded = SliceLib.fromBytes(encoded).decodeArray_bytes13(); + assertEq(decoded.length, 3); + assertEq(decoded[0], val0); + assertEq(decoded[1], val1); + assertEq(decoded[2], val2); + } + + function testEncodeDecodeArray_bytes14( + bytes14 val0, + bytes14 val1, + bytes14 val2 + ) public { + bytes14[] memory input = new bytes14[](3); + input[0] = val0; + input[1] = val1; + input[2] = val2; + + bytes memory encoded = EncodeArray.encode(input); + assertEq(encoded, abi.encodePacked(val0, val1, val2)); + + bytes14[] memory decoded = SliceLib.fromBytes(encoded).decodeArray_bytes14(); + assertEq(decoded.length, 3); + assertEq(decoded[0], val0); + assertEq(decoded[1], val1); + assertEq(decoded[2], val2); + } + + function testEncodeDecodeArray_bytes15( + bytes15 val0, + bytes15 val1, + bytes15 val2 + ) public { + bytes15[] memory input = new bytes15[](3); + input[0] = val0; + input[1] = val1; + input[2] = val2; + + bytes memory encoded = EncodeArray.encode(input); + assertEq(encoded, abi.encodePacked(val0, val1, val2)); + + bytes15[] memory decoded = SliceLib.fromBytes(encoded).decodeArray_bytes15(); + assertEq(decoded.length, 3); + assertEq(decoded[0], val0); + assertEq(decoded[1], val1); + assertEq(decoded[2], val2); + } + + function testEncodeDecodeArray_bytes16( + bytes16 val0, + bytes16 val1, + bytes16 val2 + ) public { + bytes16[] memory input = new bytes16[](3); + input[0] = val0; + input[1] = val1; + input[2] = val2; + + bytes memory encoded = EncodeArray.encode(input); + assertEq(encoded, abi.encodePacked(val0, val1, val2)); + + bytes16[] memory decoded = SliceLib.fromBytes(encoded).decodeArray_bytes16(); + assertEq(decoded.length, 3); + assertEq(decoded[0], val0); + assertEq(decoded[1], val1); + assertEq(decoded[2], val2); + } + + function testEncodeDecodeArray_bytes17( + bytes17 val0, + bytes17 val1, + bytes17 val2 + ) public { + bytes17[] memory input = new bytes17[](3); + input[0] = val0; + input[1] = val1; + input[2] = val2; + + bytes memory encoded = EncodeArray.encode(input); + assertEq(encoded, abi.encodePacked(val0, val1, val2)); + + bytes17[] memory decoded = SliceLib.fromBytes(encoded).decodeArray_bytes17(); + assertEq(decoded.length, 3); + assertEq(decoded[0], val0); + assertEq(decoded[1], val1); + assertEq(decoded[2], val2); + } + + function testEncodeDecodeArray_bytes18( + bytes18 val0, + bytes18 val1, + bytes18 val2 + ) public { + bytes18[] memory input = new bytes18[](3); + input[0] = val0; + input[1] = val1; + input[2] = val2; + + bytes memory encoded = EncodeArray.encode(input); + assertEq(encoded, abi.encodePacked(val0, val1, val2)); + + bytes18[] memory decoded = SliceLib.fromBytes(encoded).decodeArray_bytes18(); + assertEq(decoded.length, 3); + assertEq(decoded[0], val0); + assertEq(decoded[1], val1); + assertEq(decoded[2], val2); + } + + function testEncodeDecodeArray_bytes19( + bytes19 val0, + bytes19 val1, + bytes19 val2 + ) public { + bytes19[] memory input = new bytes19[](3); + input[0] = val0; + input[1] = val1; + input[2] = val2; + + bytes memory encoded = EncodeArray.encode(input); + assertEq(encoded, abi.encodePacked(val0, val1, val2)); + + bytes19[] memory decoded = SliceLib.fromBytes(encoded).decodeArray_bytes19(); + assertEq(decoded.length, 3); + assertEq(decoded[0], val0); + assertEq(decoded[1], val1); + assertEq(decoded[2], val2); + } + + function testEncodeDecodeArray_bytes20( + bytes20 val0, + bytes20 val1, + bytes20 val2 + ) public { + bytes20[] memory input = new bytes20[](3); + input[0] = val0; + input[1] = val1; + input[2] = val2; + + bytes memory encoded = EncodeArray.encode(input); + assertEq(encoded, abi.encodePacked(val0, val1, val2)); + + bytes20[] memory decoded = SliceLib.fromBytes(encoded).decodeArray_bytes20(); + assertEq(decoded.length, 3); + assertEq(decoded[0], val0); + assertEq(decoded[1], val1); + assertEq(decoded[2], val2); + } + + function testEncodeDecodeArray_bytes21( + bytes21 val0, + bytes21 val1, + bytes21 val2 + ) public { + bytes21[] memory input = new bytes21[](3); + input[0] = val0; + input[1] = val1; + input[2] = val2; + + bytes memory encoded = EncodeArray.encode(input); + assertEq(encoded, abi.encodePacked(val0, val1, val2)); + + bytes21[] memory decoded = SliceLib.fromBytes(encoded).decodeArray_bytes21(); + assertEq(decoded.length, 3); + assertEq(decoded[0], val0); + assertEq(decoded[1], val1); + assertEq(decoded[2], val2); + } + + function testEncodeDecodeArray_bytes22( + bytes22 val0, + bytes22 val1, + bytes22 val2 + ) public { + bytes22[] memory input = new bytes22[](3); + input[0] = val0; + input[1] = val1; + input[2] = val2; + + bytes memory encoded = EncodeArray.encode(input); + assertEq(encoded, abi.encodePacked(val0, val1, val2)); + + bytes22[] memory decoded = SliceLib.fromBytes(encoded).decodeArray_bytes22(); + assertEq(decoded.length, 3); + assertEq(decoded[0], val0); + assertEq(decoded[1], val1); + assertEq(decoded[2], val2); + } + + function testEncodeDecodeArray_bytes23( + bytes23 val0, + bytes23 val1, + bytes23 val2 + ) public { + bytes23[] memory input = new bytes23[](3); + input[0] = val0; + input[1] = val1; + input[2] = val2; + + bytes memory encoded = EncodeArray.encode(input); + assertEq(encoded, abi.encodePacked(val0, val1, val2)); + + bytes23[] memory decoded = SliceLib.fromBytes(encoded).decodeArray_bytes23(); + assertEq(decoded.length, 3); + assertEq(decoded[0], val0); + assertEq(decoded[1], val1); + assertEq(decoded[2], val2); + } + + function testEncodeDecodeArray_bytes24( + bytes24 val0, + bytes24 val1, + bytes24 val2 + ) public { + bytes24[] memory input = new bytes24[](3); + input[0] = val0; + input[1] = val1; + input[2] = val2; + + bytes memory encoded = EncodeArray.encode(input); + assertEq(encoded, abi.encodePacked(val0, val1, val2)); + + bytes24[] memory decoded = SliceLib.fromBytes(encoded).decodeArray_bytes24(); + assertEq(decoded.length, 3); + assertEq(decoded[0], val0); + assertEq(decoded[1], val1); + assertEq(decoded[2], val2); + } + + function testEncodeDecodeArray_bytes25( + bytes25 val0, + bytes25 val1, + bytes25 val2 + ) public { + bytes25[] memory input = new bytes25[](3); + input[0] = val0; + input[1] = val1; + input[2] = val2; + + bytes memory encoded = EncodeArray.encode(input); + assertEq(encoded, abi.encodePacked(val0, val1, val2)); + + bytes25[] memory decoded = SliceLib.fromBytes(encoded).decodeArray_bytes25(); + assertEq(decoded.length, 3); + assertEq(decoded[0], val0); + assertEq(decoded[1], val1); + assertEq(decoded[2], val2); + } + + function testEncodeDecodeArray_bytes26( + bytes26 val0, + bytes26 val1, + bytes26 val2 + ) public { + bytes26[] memory input = new bytes26[](3); + input[0] = val0; + input[1] = val1; + input[2] = val2; + + bytes memory encoded = EncodeArray.encode(input); + assertEq(encoded, abi.encodePacked(val0, val1, val2)); + + bytes26[] memory decoded = SliceLib.fromBytes(encoded).decodeArray_bytes26(); + assertEq(decoded.length, 3); + assertEq(decoded[0], val0); + assertEq(decoded[1], val1); + assertEq(decoded[2], val2); + } + + function testEncodeDecodeArray_bytes27( + bytes27 val0, + bytes27 val1, + bytes27 val2 + ) public { + bytes27[] memory input = new bytes27[](3); + input[0] = val0; + input[1] = val1; + input[2] = val2; + + bytes memory encoded = EncodeArray.encode(input); + assertEq(encoded, abi.encodePacked(val0, val1, val2)); + + bytes27[] memory decoded = SliceLib.fromBytes(encoded).decodeArray_bytes27(); + assertEq(decoded.length, 3); + assertEq(decoded[0], val0); + assertEq(decoded[1], val1); + assertEq(decoded[2], val2); + } + + function testEncodeDecodeArray_bytes28( + bytes28 val0, + bytes28 val1, + bytes28 val2 + ) public { + bytes28[] memory input = new bytes28[](3); + input[0] = val0; + input[1] = val1; + input[2] = val2; + + bytes memory encoded = EncodeArray.encode(input); + assertEq(encoded, abi.encodePacked(val0, val1, val2)); + + bytes28[] memory decoded = SliceLib.fromBytes(encoded).decodeArray_bytes28(); + assertEq(decoded.length, 3); + assertEq(decoded[0], val0); + assertEq(decoded[1], val1); + assertEq(decoded[2], val2); + } + + function testEncodeDecodeArray_bytes29( + bytes29 val0, + bytes29 val1, + bytes29 val2 + ) public { + bytes29[] memory input = new bytes29[](3); + input[0] = val0; + input[1] = val1; + input[2] = val2; + + bytes memory encoded = EncodeArray.encode(input); + assertEq(encoded, abi.encodePacked(val0, val1, val2)); + + bytes29[] memory decoded = SliceLib.fromBytes(encoded).decodeArray_bytes29(); + assertEq(decoded.length, 3); + assertEq(decoded[0], val0); + assertEq(decoded[1], val1); + assertEq(decoded[2], val2); + } + + function testEncodeDecodeArray_bytes30( + bytes30 val0, + bytes30 val1, + bytes30 val2 + ) public { + bytes30[] memory input = new bytes30[](3); + input[0] = val0; + input[1] = val1; + input[2] = val2; + + bytes memory encoded = EncodeArray.encode(input); + assertEq(encoded, abi.encodePacked(val0, val1, val2)); + + bytes30[] memory decoded = SliceLib.fromBytes(encoded).decodeArray_bytes30(); + assertEq(decoded.length, 3); + assertEq(decoded[0], val0); + assertEq(decoded[1], val1); + assertEq(decoded[2], val2); + } + + function testEncodeDecodeArray_bytes31( + bytes31 val0, + bytes31 val1, + bytes31 val2 + ) public { + bytes31[] memory input = new bytes31[](3); + input[0] = val0; + input[1] = val1; + input[2] = val2; + + bytes memory encoded = EncodeArray.encode(input); + assertEq(encoded, abi.encodePacked(val0, val1, val2)); + + bytes31[] memory decoded = SliceLib.fromBytes(encoded).decodeArray_bytes31(); + assertEq(decoded.length, 3); + assertEq(decoded[0], val0); + assertEq(decoded[1], val1); + assertEq(decoded[2], val2); + } + + function testEncodeDecodeArray_bytes32( + bytes32 val0, + bytes32 val1, + bytes32 val2 + ) public { + bytes32[] memory input = new bytes32[](3); + input[0] = val0; + input[1] = val1; + input[2] = val2; + + bytes memory encoded = EncodeArray.encode(input); + assertEq(encoded, abi.encodePacked(val0, val1, val2)); + + bytes32[] memory decoded = SliceLib.fromBytes(encoded).decodeArray_bytes32(); + assertEq(decoded.length, 3); + assertEq(decoded[0], val0); + assertEq(decoded[1], val1); + assertEq(decoded[2], val2); + } +} diff --git a/packages/store/tsconfig.json b/packages/store/tsconfig.json new file mode 100644 index 0000000000..415b6eddb6 --- /dev/null +++ b/packages/store/tsconfig.json @@ -0,0 +1,9 @@ +{ + "compilerOptions": { + /* Visit https://aka.ms/tsconfig.json to read more about this file */ + "target": "es2019", + "moduleResolution": "node", + "types": ["node", "mocha"], + "esModuleInterop": true + } +} diff --git a/packages/store/yarn.lock b/packages/store/yarn.lock new file mode 100644 index 0000000000..59f8b2244e --- /dev/null +++ b/packages/store/yarn.lock @@ -0,0 +1,3309 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@babel/code-frame@^7.0.0": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.18.6.tgz#3b25d38c89600baa2dcc219edfa88a74eb2c427a" + integrity sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q== + dependencies: + "@babel/highlight" "^7.18.6" + +"@babel/helper-validator-identifier@^7.18.6": + version "7.19.1" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.19.1.tgz#7eea834cf32901ffdc1a7ee555e2f9c27e249ca2" + integrity sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w== + +"@babel/highlight@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.18.6.tgz#81158601e93e2563795adcbfbdf5d64be3f2ecdf" + integrity sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g== + dependencies: + "@babel/helper-validator-identifier" "^7.18.6" + chalk "^2.0.0" + js-tokens "^4.0.0" + +"@cspotcode/source-map-consumer@0.8.0": + version "0.8.0" + resolved "https://registry.yarnpkg.com/@cspotcode/source-map-consumer/-/source-map-consumer-0.8.0.tgz#33bf4b7b39c178821606f669bbc447a6a629786b" + integrity sha512-41qniHzTU8yAGbCp04ohlmSrZf8bkf/iJsl3V0dRGsQN/5GFfx+LbCSsCpp2gqrqjTVg/K6O8ycoV35JIwAzAg== + +"@cspotcode/source-map-support@0.7.0": + version "0.7.0" + resolved "https://registry.yarnpkg.com/@cspotcode/source-map-support/-/source-map-support-0.7.0.tgz#4789840aa859e46d2f3173727ab707c66bf344f5" + integrity sha512-X4xqRHqN8ACt2aHVe51OxeA2HjbcL4MqFqXkrmQszJ1NOUuUu5u6Vqx/0lZSVNku7velL5FC/s5uEAj1lsBMhA== + dependencies: + "@cspotcode/source-map-consumer" "0.8.0" + +"@ethersproject/abi@^5.1.2": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/abi/-/abi-5.7.0.tgz#b3f3e045bbbeed1af3947335c247ad625a44e449" + integrity sha512-351ktp42TiRcYB3H1OP8yajPeAQstMW/yCFokj/AthP9bLHzQFPlOrxOcwYEDkUAICmOHljvN4K39OMTMUa9RA== + dependencies: + "@ethersproject/address" "^5.7.0" + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/constants" "^5.7.0" + "@ethersproject/hash" "^5.7.0" + "@ethersproject/keccak256" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + "@ethersproject/strings" "^5.7.0" + +"@ethersproject/abstract-provider@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/abstract-provider/-/abstract-provider-5.7.0.tgz#b0a8550f88b6bf9d51f90e4795d48294630cb9ef" + integrity sha512-R41c9UkchKCpAqStMYUpdunjo3pkEvZC3FAwZn5S5MGbXoMQOHIdHItezTETxAO5bevtMApSyEhn9+CHcDsWBw== + dependencies: + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/networks" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + "@ethersproject/transactions" "^5.7.0" + "@ethersproject/web" "^5.7.0" + +"@ethersproject/abstract-signer@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/abstract-signer/-/abstract-signer-5.7.0.tgz#13f4f32117868452191a4649723cb086d2b596b2" + integrity sha512-a16V8bq1/Cz+TGCkE2OPMTOUDLS3grCpdjoJCYNnVBbdYEMSgKrU0+B90s8b6H+ByYTBZN7a3g76jdIJi7UfKQ== + dependencies: + "@ethersproject/abstract-provider" "^5.7.0" + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + +"@ethersproject/address@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/address/-/address-5.7.0.tgz#19b56c4d74a3b0a46bfdbb6cfcc0a153fc697f37" + integrity sha512-9wYhYt7aghVGo758POM5nqcOMaE168Q6aRLJZwUmiqSrAungkG74gSSeKEIR7ukixesdRZGPgVqme6vmxs1fkA== + dependencies: + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/keccak256" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/rlp" "^5.7.0" + +"@ethersproject/base64@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/base64/-/base64-5.7.0.tgz#ac4ee92aa36c1628173e221d0d01f53692059e1c" + integrity sha512-Dr8tcHt2mEbsZr/mwTPIQAf3Ai0Bks/7gTw9dSqk1mQvhW3XvRlmDJr/4n+wg1JmCl16NZue17CDh8xb/vZ0sQ== + dependencies: + "@ethersproject/bytes" "^5.7.0" + +"@ethersproject/bignumber@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/bignumber/-/bignumber-5.7.0.tgz#e2f03837f268ba655ffba03a57853e18a18dc9c2" + integrity sha512-n1CAdIHRWjSucQO3MC1zPSVgV/6dy/fjL9pMrPP9peL+QxEg9wOsVqwD4+818B6LUEtaXzVHQiuivzRoxPxUGw== + dependencies: + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + bn.js "^5.2.1" + +"@ethersproject/bytes@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/bytes/-/bytes-5.7.0.tgz#a00f6ea8d7e7534d6d87f47188af1148d71f155d" + integrity sha512-nsbxwgFXWh9NyYWo+U8atvmMsSdKJprTcICAkvbBffT75qDocbuggBU0SJiVK2MuTrp0q+xvLkTnGMPK1+uA9A== + dependencies: + "@ethersproject/logger" "^5.7.0" + +"@ethersproject/constants@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/constants/-/constants-5.7.0.tgz#df80a9705a7e08984161f09014ea012d1c75295e" + integrity sha512-DHI+y5dBNvkpYUMiRQyxRBYBefZkJfo70VUkUAsRjcPs47muV9evftfZ0PJVCXYbAiCgght0DtcF9srFQmIgWA== + dependencies: + "@ethersproject/bignumber" "^5.7.0" + +"@ethersproject/hash@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/hash/-/hash-5.7.0.tgz#eb7aca84a588508369562e16e514b539ba5240a7" + integrity sha512-qX5WrQfnah1EFnO5zJv1v46a8HW0+E5xuBBDTwMFZLuVTx0tbU2kkx15NqdjxecrLGatQN9FGQKpb1FKdHCt+g== + dependencies: + "@ethersproject/abstract-signer" "^5.7.0" + "@ethersproject/address" "^5.7.0" + "@ethersproject/base64" "^5.7.0" + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/keccak256" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + "@ethersproject/strings" "^5.7.0" + +"@ethersproject/keccak256@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/keccak256/-/keccak256-5.7.0.tgz#3186350c6e1cd6aba7940384ec7d6d9db01f335a" + integrity sha512-2UcPboeL/iW+pSg6vZ6ydF8tCnv3Iu/8tUmLLzWWGzxWKFFqOBQFLo6uLUv6BDrLgCDfN28RJ/wtByx+jZ4KBg== + dependencies: + "@ethersproject/bytes" "^5.7.0" + js-sha3 "0.8.0" + +"@ethersproject/logger@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/logger/-/logger-5.7.0.tgz#6ce9ae168e74fecf287be17062b590852c311892" + integrity sha512-0odtFdXu/XHtjQXJYA3u9G0G8btm0ND5Cu8M7i5vhEcE8/HmF4Lbdqanwyv4uQTr2tx6b7fQRmgLrsnpQlmnig== + +"@ethersproject/networks@^5.7.0": + version "5.7.1" + resolved "https://registry.yarnpkg.com/@ethersproject/networks/-/networks-5.7.1.tgz#118e1a981d757d45ccea6bb58d9fd3d9db14ead6" + integrity sha512-n/MufjFYv3yFcUyfhnXotyDlNdFb7onmkSy8aQERi2PjNcnWQ66xXxa3XlS8nCcA8aJKJjIIMNJTC7tu80GwpQ== + dependencies: + "@ethersproject/logger" "^5.7.0" + +"@ethersproject/properties@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/properties/-/properties-5.7.0.tgz#a6e12cb0439b878aaf470f1902a176033067ed30" + integrity sha512-J87jy8suntrAkIZtecpxEPxY//szqr1mlBaYlQ0r4RCaiD2hjheqF9s1LVE8vVuJCXisjIP+JgtK/Do54ej4Sw== + dependencies: + "@ethersproject/logger" "^5.7.0" + +"@ethersproject/rlp@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/rlp/-/rlp-5.7.0.tgz#de39e4d5918b9d74d46de93af80b7685a9c21304" + integrity sha512-rBxzX2vK8mVF7b0Tol44t5Tb8gomOHkj5guL+HhzQ1yBh/ydjGnpw6at+X6Iw0Kp3OzzzkcKp8N9r0W4kYSs9w== + dependencies: + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + +"@ethersproject/signing-key@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/signing-key/-/signing-key-5.7.0.tgz#06b2df39411b00bc57c7c09b01d1e41cf1b16ab3" + integrity sha512-MZdy2nL3wO0u7gkB4nA/pEf8lu1TlFswPNmy8AiYkfKTdO6eXBJyUdmHO/ehm/htHw9K/qF8ujnTyUAD+Ry54Q== + dependencies: + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + bn.js "^5.2.1" + elliptic "6.5.4" + hash.js "1.1.7" + +"@ethersproject/strings@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/strings/-/strings-5.7.0.tgz#54c9d2a7c57ae8f1205c88a9d3a56471e14d5ed2" + integrity sha512-/9nu+lj0YswRNSH0NXYqrh8775XNyEdUQAuf3f+SmOrnVewcJ5SBNAjF7lpgehKi4abvNNXyf+HX86czCdJ8Mg== + dependencies: + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/constants" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + +"@ethersproject/transactions@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/transactions/-/transactions-5.7.0.tgz#91318fc24063e057885a6af13fdb703e1f993d3b" + integrity sha512-kmcNicCp1lp8qanMTC3RIikGgoJ80ztTyvtsFvCYpSCfkjhD0jZ2LOrnbcuxuToLIUYYf+4XwD1rP+B/erDIhQ== + dependencies: + "@ethersproject/address" "^5.7.0" + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/constants" "^5.7.0" + "@ethersproject/keccak256" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + "@ethersproject/rlp" "^5.7.0" + "@ethersproject/signing-key" "^5.7.0" + +"@ethersproject/web@^5.7.0": + version "5.7.1" + resolved "https://registry.yarnpkg.com/@ethersproject/web/-/web-5.7.1.tgz#de1f285b373149bee5928f4eb7bcb87ee5fbb4ae" + integrity sha512-Gueu8lSvyjBWL4cYsWsjh6MtMwM0+H4HvqFPZfB6dV8ctbP9zFAO73VG1cMWae0FLPCtz0peKPpZY8/ugJJX2w== + dependencies: + "@ethersproject/base64" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + "@ethersproject/strings" "^5.7.0" + +"@metamask/eth-sig-util@^4.0.0": + version "4.0.1" + resolved "https://registry.yarnpkg.com/@metamask/eth-sig-util/-/eth-sig-util-4.0.1.tgz#3ad61f6ea9ad73ba5b19db780d40d9aae5157088" + integrity sha512-tghyZKLHZjcdlDqCA3gNZmLeR0XvOE9U1qoQO9ohyAZT6Pya+H9vkBPcsyXytmYLNgVoin7CKCmweo/R43V+tQ== + dependencies: + ethereumjs-abi "^0.6.8" + ethereumjs-util "^6.2.1" + ethjs-util "^0.1.6" + tweetnacl "^1.0.3" + tweetnacl-util "^0.15.1" + +"@morgan-stanley/ts-mocking-bird@^0.6.2": + version "0.6.4" + resolved "https://registry.yarnpkg.com/@morgan-stanley/ts-mocking-bird/-/ts-mocking-bird-0.6.4.tgz#2e4b60d42957bab3b50b67dbf14c3da2f62a39f7" + integrity sha512-57VJIflP8eR2xXa9cD1LUawh+Gh+BVQfVu0n6GALyg/AqV/Nz25kDRvws3i9kIe1PTrbsZZOYpsYp6bXPd6nVA== + dependencies: + lodash "^4.17.16" + uuid "^7.0.3" + +"@noble/hashes@1.1.2": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.1.2.tgz#e9e035b9b166ca0af657a7848eb2718f0f22f183" + integrity sha512-KYRCASVTv6aeUi1tsF8/vpyR7zpfs3FUzy2Jqm+MU+LmUKhQ0y2FpfwqkCcxSg2ua4GALJd8k2R76WxwZGbQpA== + +"@noble/hashes@~1.1.1": + version "1.1.5" + resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.1.5.tgz#1a0377f3b9020efe2fae03290bd2a12140c95c11" + integrity sha512-LTMZiiLc+V4v1Yi16TD6aX2gmtKszNye0pQgbaLqkvhIqP7nVsSaJsWloGQjJfJ8offaoP5GtX3yY5swbcJxxQ== + +"@noble/secp256k1@1.6.3", "@noble/secp256k1@~1.6.0": + version "1.6.3" + resolved "https://registry.yarnpkg.com/@noble/secp256k1/-/secp256k1-1.6.3.tgz#7eed12d9f4404b416999d0c87686836c4c5c9b94" + integrity sha512-T04e4iTurVy7I8Sw4+c5OSN9/RkPlo1uKxAomtxQNLq8j1uPAqnsqG1bqvY3Jv7c13gyr6dui0zmh/I3+f/JaQ== + +"@nomicfoundation/ethereumjs-block@^4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-block/-/ethereumjs-block-4.0.0.tgz#fdd5c045e7baa5169abeed0e1202bf94e4481c49" + integrity sha512-bk8uP8VuexLgyIZAHExH1QEovqx0Lzhc9Ntm63nCRKLHXIZkobaFaeCVwTESV7YkPKUk7NiK11s8ryed4CS9yA== + dependencies: + "@nomicfoundation/ethereumjs-common" "^3.0.0" + "@nomicfoundation/ethereumjs-rlp" "^4.0.0" + "@nomicfoundation/ethereumjs-trie" "^5.0.0" + "@nomicfoundation/ethereumjs-tx" "^4.0.0" + "@nomicfoundation/ethereumjs-util" "^8.0.0" + ethereum-cryptography "0.1.3" + +"@nomicfoundation/ethereumjs-blockchain@^6.0.0": + version "6.0.0" + resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-blockchain/-/ethereumjs-blockchain-6.0.0.tgz#1a8c243a46d4d3691631f139bfb3a4a157187b0c" + integrity sha512-pLFEoea6MWd81QQYSReLlLfH7N9v7lH66JC/NMPN848ySPPQA5renWnE7wPByfQFzNrPBuDDRFFULMDmj1C0xw== + dependencies: + "@nomicfoundation/ethereumjs-block" "^4.0.0" + "@nomicfoundation/ethereumjs-common" "^3.0.0" + "@nomicfoundation/ethereumjs-ethash" "^2.0.0" + "@nomicfoundation/ethereumjs-rlp" "^4.0.0" + "@nomicfoundation/ethereumjs-trie" "^5.0.0" + "@nomicfoundation/ethereumjs-util" "^8.0.0" + abstract-level "^1.0.3" + debug "^4.3.3" + ethereum-cryptography "0.1.3" + level "^8.0.0" + lru-cache "^5.1.1" + memory-level "^1.0.0" + +"@nomicfoundation/ethereumjs-common@^3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-common/-/ethereumjs-common-3.0.0.tgz#f6bcc7753994555e49ab3aa517fc8bcf89c280b9" + integrity sha512-WS7qSshQfxoZOpHG/XqlHEGRG1zmyjYrvmATvc4c62+gZXgre1ymYP8ZNgx/3FyZY0TWe9OjFlKOfLqmgOeYwA== + dependencies: + "@nomicfoundation/ethereumjs-util" "^8.0.0" + crc-32 "^1.2.0" + +"@nomicfoundation/ethereumjs-ethash@^2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-ethash/-/ethereumjs-ethash-2.0.0.tgz#11539c32fe0990e1122ff987d1b84cfa34774e81" + integrity sha512-WpDvnRncfDUuXdsAXlI4lXbqUDOA+adYRQaEezIkxqDkc+LDyYDbd/xairmY98GnQzo1zIqsIL6GB5MoMSJDew== + dependencies: + "@nomicfoundation/ethereumjs-block" "^4.0.0" + "@nomicfoundation/ethereumjs-rlp" "^4.0.0" + "@nomicfoundation/ethereumjs-util" "^8.0.0" + abstract-level "^1.0.3" + bigint-crypto-utils "^3.0.23" + ethereum-cryptography "0.1.3" + +"@nomicfoundation/ethereumjs-evm@^1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-evm/-/ethereumjs-evm-1.0.0.tgz#99cd173c03b59107c156a69c5e215409098a370b" + integrity sha512-hVS6qRo3V1PLKCO210UfcEQHvlG7GqR8iFzp0yyjTg2TmJQizcChKgWo8KFsdMw6AyoLgLhHGHw4HdlP8a4i+Q== + dependencies: + "@nomicfoundation/ethereumjs-common" "^3.0.0" + "@nomicfoundation/ethereumjs-util" "^8.0.0" + "@types/async-eventemitter" "^0.2.1" + async-eventemitter "^0.2.4" + debug "^4.3.3" + ethereum-cryptography "0.1.3" + mcl-wasm "^0.7.1" + rustbn.js "~0.2.0" + +"@nomicfoundation/ethereumjs-rlp@^4.0.0", "@nomicfoundation/ethereumjs-rlp@^4.0.0-beta.2": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-rlp/-/ethereumjs-rlp-4.0.0.tgz#d9a9c5f0f10310c8849b6525101de455a53e771d" + integrity sha512-GaSOGk5QbUk4eBP5qFbpXoZoZUj/NrW7MRa0tKY4Ew4c2HAS0GXArEMAamtFrkazp0BO4K5p2ZCG3b2FmbShmw== + +"@nomicfoundation/ethereumjs-statemanager@^1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-statemanager/-/ethereumjs-statemanager-1.0.0.tgz#14a9d4e1c828230368f7ab520c144c34d8721e4b" + integrity sha512-jCtqFjcd2QejtuAMjQzbil/4NHf5aAWxUc+CvS0JclQpl+7M0bxMofR2AJdtz+P3u0ke2euhYREDiE7iSO31vQ== + dependencies: + "@nomicfoundation/ethereumjs-common" "^3.0.0" + "@nomicfoundation/ethereumjs-rlp" "^4.0.0" + "@nomicfoundation/ethereumjs-trie" "^5.0.0" + "@nomicfoundation/ethereumjs-util" "^8.0.0" + debug "^4.3.3" + ethereum-cryptography "0.1.3" + functional-red-black-tree "^1.0.1" + +"@nomicfoundation/ethereumjs-trie@^5.0.0": + version "5.0.0" + resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-trie/-/ethereumjs-trie-5.0.0.tgz#dcfbe3be53a94bc061c9767a396c16702bc2f5b7" + integrity sha512-LIj5XdE+s+t6WSuq/ttegJzZ1vliwg6wlb+Y9f4RlBpuK35B9K02bO7xU+E6Rgg9RGptkWd6TVLdedTI4eNc2A== + dependencies: + "@nomicfoundation/ethereumjs-rlp" "^4.0.0" + "@nomicfoundation/ethereumjs-util" "^8.0.0" + ethereum-cryptography "0.1.3" + readable-stream "^3.6.0" + +"@nomicfoundation/ethereumjs-tx@^4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-tx/-/ethereumjs-tx-4.0.0.tgz#59dc7452b0862b30342966f7052ab9a1f7802f52" + integrity sha512-Gg3Lir2lNUck43Kp/3x6TfBNwcWC9Z1wYue9Nz3v4xjdcv6oDW9QSMJxqsKw9QEGoBBZ+gqwpW7+F05/rs/g1w== + dependencies: + "@nomicfoundation/ethereumjs-common" "^3.0.0" + "@nomicfoundation/ethereumjs-rlp" "^4.0.0" + "@nomicfoundation/ethereumjs-util" "^8.0.0" + ethereum-cryptography "0.1.3" + +"@nomicfoundation/ethereumjs-util@^8.0.0": + version "8.0.0" + resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-util/-/ethereumjs-util-8.0.0.tgz#deb2b15d2c308a731e82977aefc4e61ca0ece6c5" + integrity sha512-2emi0NJ/HmTG+CGY58fa+DQuAoroFeSH9gKu9O6JnwTtlzJtgfTixuoOqLEgyyzZVvwfIpRueuePb8TonL1y+A== + dependencies: + "@nomicfoundation/ethereumjs-rlp" "^4.0.0-beta.2" + ethereum-cryptography "0.1.3" + +"@nomicfoundation/ethereumjs-vm@^6.0.0": + version "6.0.0" + resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-vm/-/ethereumjs-vm-6.0.0.tgz#2bb50d332bf41790b01a3767ffec3987585d1de6" + integrity sha512-JMPxvPQ3fzD063Sg3Tp+UdwUkVxMoo1uML6KSzFhMH3hoQi/LMuXBoEHAoW83/vyNS9BxEe6jm6LmT5xdeEJ6w== + dependencies: + "@nomicfoundation/ethereumjs-block" "^4.0.0" + "@nomicfoundation/ethereumjs-blockchain" "^6.0.0" + "@nomicfoundation/ethereumjs-common" "^3.0.0" + "@nomicfoundation/ethereumjs-evm" "^1.0.0" + "@nomicfoundation/ethereumjs-rlp" "^4.0.0" + "@nomicfoundation/ethereumjs-statemanager" "^1.0.0" + "@nomicfoundation/ethereumjs-trie" "^5.0.0" + "@nomicfoundation/ethereumjs-tx" "^4.0.0" + "@nomicfoundation/ethereumjs-util" "^8.0.0" + "@types/async-eventemitter" "^0.2.1" + async-eventemitter "^0.2.4" + debug "^4.3.3" + ethereum-cryptography "0.1.3" + functional-red-black-tree "^1.0.1" + mcl-wasm "^0.7.1" + rustbn.js "~0.2.0" + +"@nomicfoundation/solidity-analyzer-darwin-arm64@0.1.0": + version "0.1.0" + resolved "https://registry.yarnpkg.com/@nomicfoundation/solidity-analyzer-darwin-arm64/-/solidity-analyzer-darwin-arm64-0.1.0.tgz#83a7367342bd053a76d04bbcf4f373fef07cf760" + integrity sha512-vEF3yKuuzfMHsZecHQcnkUrqm8mnTWfJeEVFHpg+cO+le96xQA4lAJYdUan8pXZohQxv1fSReQsn4QGNuBNuCw== + +"@nomicfoundation/solidity-analyzer-darwin-x64@0.1.0": + version "0.1.0" + resolved "https://registry.yarnpkg.com/@nomicfoundation/solidity-analyzer-darwin-x64/-/solidity-analyzer-darwin-x64-0.1.0.tgz#1225f7da647ae1ad25a87125664704ecc0af6ccc" + integrity sha512-dlHeIg0pTL4dB1l9JDwbi/JG6dHQaU1xpDK+ugYO8eJ1kxx9Dh2isEUtA4d02cQAl22cjOHTvifAk96A+ItEHA== + +"@nomicfoundation/solidity-analyzer-freebsd-x64@0.1.0": + version "0.1.0" + resolved "https://registry.yarnpkg.com/@nomicfoundation/solidity-analyzer-freebsd-x64/-/solidity-analyzer-freebsd-x64-0.1.0.tgz#dbc052dcdfd50ae50fd5ae1788b69b4e0fa40040" + integrity sha512-WFCZYMv86WowDA4GiJKnebMQRt3kCcFqHeIomW6NMyqiKqhK1kIZCxSLDYsxqlx396kKLPN1713Q1S8tu68GKg== + +"@nomicfoundation/solidity-analyzer-linux-arm64-gnu@0.1.0": + version "0.1.0" + resolved "https://registry.yarnpkg.com/@nomicfoundation/solidity-analyzer-linux-arm64-gnu/-/solidity-analyzer-linux-arm64-gnu-0.1.0.tgz#e6b2eea633995b557e74e881d2a43eab4760903d" + integrity sha512-DTw6MNQWWlCgc71Pq7CEhEqkb7fZnS7oly13pujs4cMH1sR0JzNk90Mp1zpSCsCs4oKan2ClhMlLKtNat/XRKQ== + +"@nomicfoundation/solidity-analyzer-linux-arm64-musl@0.1.0": + version "0.1.0" + resolved "https://registry.yarnpkg.com/@nomicfoundation/solidity-analyzer-linux-arm64-musl/-/solidity-analyzer-linux-arm64-musl-0.1.0.tgz#af81107f5afa794f19988a368647727806e18dc4" + integrity sha512-wUpUnR/3GV5Da88MhrxXh/lhb9kxh9V3Jya2NpBEhKDIRCDmtXMSqPMXHZmOR9DfCwCvG6vLFPr/+YrPCnUN0w== + +"@nomicfoundation/solidity-analyzer-linux-x64-gnu@0.1.0": + version "0.1.0" + resolved "https://registry.yarnpkg.com/@nomicfoundation/solidity-analyzer-linux-x64-gnu/-/solidity-analyzer-linux-x64-gnu-0.1.0.tgz#6877e1da1a06a9f08446070ab6e0a5347109f868" + integrity sha512-lR0AxK1x/MeKQ/3Pt923kPvwigmGX3OxeU5qNtQ9pj9iucgk4PzhbS3ruUeSpYhUxG50jN4RkIGwUMoev5lguw== + +"@nomicfoundation/solidity-analyzer-linux-x64-musl@0.1.0": + version "0.1.0" + resolved "https://registry.yarnpkg.com/@nomicfoundation/solidity-analyzer-linux-x64-musl/-/solidity-analyzer-linux-x64-musl-0.1.0.tgz#bb6cd83a0c259eccef4183796b6329a66cf7ebd9" + integrity sha512-A1he/8gy/JeBD3FKvmI6WUJrGrI5uWJNr5Xb9WdV+DK0F8msuOqpEByLlnTdLkXMwW7nSl3awvLezOs9xBHJEg== + +"@nomicfoundation/solidity-analyzer-win32-arm64-msvc@0.1.0": + version "0.1.0" + resolved "https://registry.yarnpkg.com/@nomicfoundation/solidity-analyzer-win32-arm64-msvc/-/solidity-analyzer-win32-arm64-msvc-0.1.0.tgz#9d4bca1cc9a1333fde985675083b0b7d165f6076" + integrity sha512-7x5SXZ9R9H4SluJZZP8XPN+ju7Mx+XeUMWZw7ZAqkdhP5mK19I4vz3x0zIWygmfE8RT7uQ5xMap0/9NPsO+ykw== + +"@nomicfoundation/solidity-analyzer-win32-ia32-msvc@0.1.0": + version "0.1.0" + resolved "https://registry.yarnpkg.com/@nomicfoundation/solidity-analyzer-win32-ia32-msvc/-/solidity-analyzer-win32-ia32-msvc-0.1.0.tgz#0db5bfc6aa952bea4098d8d2c8947b4e5c4337ee" + integrity sha512-m7w3xf+hnE774YRXu+2mGV7RiF3QJtUoiYU61FascCkQhX3QMQavh7saH/vzb2jN5D24nT/jwvaHYX/MAM9zUw== + +"@nomicfoundation/solidity-analyzer-win32-x64-msvc@0.1.0": + version "0.1.0" + resolved "https://registry.yarnpkg.com/@nomicfoundation/solidity-analyzer-win32-x64-msvc/-/solidity-analyzer-win32-x64-msvc-0.1.0.tgz#2e0f39a2924dcd77db6b419828595e984fabcb33" + integrity sha512-xCuybjY0sLJQnJhupiFAXaek2EqF0AP0eBjgzaalPXSNvCEN6ZYHvUzdA50ENDVeSYFXcUsYf3+FsD3XKaeptA== + +"@nomicfoundation/solidity-analyzer@^0.1.0": + version "0.1.0" + resolved "https://registry.yarnpkg.com/@nomicfoundation/solidity-analyzer/-/solidity-analyzer-0.1.0.tgz#e5ddc43ad5c0aab96e5054520d8e16212e125f50" + integrity sha512-xGWAiVCGOycvGiP/qrlf9f9eOn7fpNbyJygcB0P21a1MDuVPlKt0Srp7rvtBEutYQ48ouYnRXm33zlRnlTOPHg== + optionalDependencies: + "@nomicfoundation/solidity-analyzer-darwin-arm64" "0.1.0" + "@nomicfoundation/solidity-analyzer-darwin-x64" "0.1.0" + "@nomicfoundation/solidity-analyzer-freebsd-x64" "0.1.0" + "@nomicfoundation/solidity-analyzer-linux-arm64-gnu" "0.1.0" + "@nomicfoundation/solidity-analyzer-linux-arm64-musl" "0.1.0" + "@nomicfoundation/solidity-analyzer-linux-x64-gnu" "0.1.0" + "@nomicfoundation/solidity-analyzer-linux-x64-musl" "0.1.0" + "@nomicfoundation/solidity-analyzer-win32-arm64-msvc" "0.1.0" + "@nomicfoundation/solidity-analyzer-win32-ia32-msvc" "0.1.0" + "@nomicfoundation/solidity-analyzer-win32-x64-msvc" "0.1.0" + +"@scure/base@~1.1.0": + version "1.1.1" + resolved "https://registry.yarnpkg.com/@scure/base/-/base-1.1.1.tgz#ebb651ee52ff84f420097055f4bf46cfba403938" + integrity sha512-ZxOhsSyxYwLJj3pLZCefNitxsj093tb2vq90mp2txoYeBqbcjDjqFhyM8eUjq/uFm6zJ+mUuqxlS2FkuSY1MTA== + +"@scure/bip32@1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@scure/bip32/-/bip32-1.1.0.tgz#dea45875e7fbc720c2b4560325f1cf5d2246d95b" + integrity sha512-ftTW3kKX54YXLCxH6BB7oEEoJfoE2pIgw7MINKAs5PsS6nqKPuKk1haTF/EuHmYqG330t5GSrdmtRuHaY1a62Q== + dependencies: + "@noble/hashes" "~1.1.1" + "@noble/secp256k1" "~1.6.0" + "@scure/base" "~1.1.0" + +"@scure/bip39@1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@scure/bip39/-/bip39-1.1.0.tgz#92f11d095bae025f166bef3defcc5bf4945d419a" + integrity sha512-pwrPOS16VeTKg98dYXQyIjJEcWfz7/1YJIwxUEPFfQPtc86Ym/1sVgQ2RLoD43AazMk2l/unK4ITySSpW2+82w== + dependencies: + "@noble/hashes" "~1.1.1" + "@scure/base" "~1.1.0" + +"@sentry/core@5.30.0": + version "5.30.0" + resolved "https://registry.yarnpkg.com/@sentry/core/-/core-5.30.0.tgz#6b203664f69e75106ee8b5a2fe1d717379b331f3" + integrity sha512-TmfrII8w1PQZSZgPpUESqjB+jC6MvZJZdLtE/0hZ+SrnKhW3x5WlYLvTXZpcWePYBku7rl2wn1RZu6uT0qCTeg== + dependencies: + "@sentry/hub" "5.30.0" + "@sentry/minimal" "5.30.0" + "@sentry/types" "5.30.0" + "@sentry/utils" "5.30.0" + tslib "^1.9.3" + +"@sentry/hub@5.30.0": + version "5.30.0" + resolved "https://registry.yarnpkg.com/@sentry/hub/-/hub-5.30.0.tgz#2453be9b9cb903404366e198bd30c7ca74cdc100" + integrity sha512-2tYrGnzb1gKz2EkMDQcfLrDTvmGcQPuWxLnJKXJvYTQDGLlEvi2tWz1VIHjunmOvJrB5aIQLhm+dcMRwFZDCqQ== + dependencies: + "@sentry/types" "5.30.0" + "@sentry/utils" "5.30.0" + tslib "^1.9.3" + +"@sentry/minimal@5.30.0": + version "5.30.0" + resolved "https://registry.yarnpkg.com/@sentry/minimal/-/minimal-5.30.0.tgz#ce3d3a6a273428e0084adcb800bc12e72d34637b" + integrity sha512-BwWb/owZKtkDX+Sc4zCSTNcvZUq7YcH3uAVlmh/gtR9rmUvbzAA3ewLuB3myi4wWRAMEtny6+J/FN/x+2wn9Xw== + dependencies: + "@sentry/hub" "5.30.0" + "@sentry/types" "5.30.0" + tslib "^1.9.3" + +"@sentry/node@^5.18.1": + version "5.30.0" + resolved "https://registry.yarnpkg.com/@sentry/node/-/node-5.30.0.tgz#4ca479e799b1021285d7fe12ac0858951c11cd48" + integrity sha512-Br5oyVBF0fZo6ZS9bxbJZG4ApAjRqAnqFFurMVJJdunNb80brh7a5Qva2kjhm+U6r9NJAB5OmDyPkA1Qnt+QVg== + dependencies: + "@sentry/core" "5.30.0" + "@sentry/hub" "5.30.0" + "@sentry/tracing" "5.30.0" + "@sentry/types" "5.30.0" + "@sentry/utils" "5.30.0" + cookie "^0.4.1" + https-proxy-agent "^5.0.0" + lru_map "^0.3.3" + tslib "^1.9.3" + +"@sentry/tracing@5.30.0": + version "5.30.0" + resolved "https://registry.yarnpkg.com/@sentry/tracing/-/tracing-5.30.0.tgz#501d21f00c3f3be7f7635d8710da70d9419d4e1f" + integrity sha512-dUFowCr0AIMwiLD7Fs314Mdzcug+gBVo/+NCMyDw8tFxJkwWAKl7Qa2OZxLQ0ZHjakcj1hNKfCQJ9rhyfOl4Aw== + dependencies: + "@sentry/hub" "5.30.0" + "@sentry/minimal" "5.30.0" + "@sentry/types" "5.30.0" + "@sentry/utils" "5.30.0" + tslib "^1.9.3" + +"@sentry/types@5.30.0": + version "5.30.0" + resolved "https://registry.yarnpkg.com/@sentry/types/-/types-5.30.0.tgz#19709bbe12a1a0115bc790b8942917da5636f402" + integrity sha512-R8xOqlSTZ+htqrfteCWU5Nk0CDN5ApUTvrlvBuiH1DyP6czDZ4ktbZB0hAgBlVcK0U+qpD3ag3Tqqpa5Q67rPw== + +"@sentry/utils@5.30.0": + version "5.30.0" + resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-5.30.0.tgz#9a5bd7ccff85ccfe7856d493bffa64cabc41e980" + integrity sha512-zaYmoH0NWWtvnJjC9/CBseXMtKHm/tm40sz3YfJRxeQjyzRqNQPgivpd9R/oDJCYj999mzdW382p/qi2ypjLww== + dependencies: + "@sentry/types" "5.30.0" + tslib "^1.9.3" + +"@solidity-parser/parser@^0.14.5": + version "0.14.5" + resolved "https://registry.yarnpkg.com/@solidity-parser/parser/-/parser-0.14.5.tgz#87bc3cc7b068e08195c219c91cd8ddff5ef1a804" + integrity sha512-6dKnHZn7fg/iQATVEzqyUOyEidbn05q7YA2mQ9hC0MMXhhV3/JrsxmFSYZAcr7j1yUP700LLhTruvJ3MiQmjJg== + dependencies: + antlr4ts "^0.5.0-alpha.4" + +"@tsconfig/node10@^1.0.7": + version "1.0.9" + resolved "https://registry.yarnpkg.com/@tsconfig/node10/-/node10-1.0.9.tgz#df4907fc07a886922637b15e02d4cebc4c0021b2" + integrity sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA== + +"@tsconfig/node12@^1.0.7": + version "1.0.11" + resolved "https://registry.yarnpkg.com/@tsconfig/node12/-/node12-1.0.11.tgz#ee3def1f27d9ed66dac6e46a295cffb0152e058d" + integrity sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag== + +"@tsconfig/node14@^1.0.0": + version "1.0.3" + resolved "https://registry.yarnpkg.com/@tsconfig/node14/-/node14-1.0.3.tgz#e4386316284f00b98435bf40f72f75a09dabf6c1" + integrity sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow== + +"@tsconfig/node16@^1.0.2": + version "1.0.3" + resolved "https://registry.yarnpkg.com/@tsconfig/node16/-/node16-1.0.3.tgz#472eaab5f15c1ffdd7f8628bd4c4f753995ec79e" + integrity sha512-yOlFc+7UtL/89t2ZhjPvvB/DeAr3r+Dq58IgzsFkOAvVC6NMJXmCGjbptdXdR9qsX7pKcTL+s87FtYREi2dEEQ== + +"@typechain/ethers-v5@^9.0.0": + version "9.0.0" + resolved "https://registry.yarnpkg.com/@typechain/ethers-v5/-/ethers-v5-9.0.0.tgz#6aa93bea7425c0463bd8a61eea3643540ef851bd" + integrity sha512-bAanuPl1L2itaUdMvor/QvwnIH+TM/CmG00q17Ilv3ZZMeJ2j8HcarhgJUZ9pBY1teBb85P8cC03dz3mSSx+tQ== + dependencies: + lodash "^4.17.15" + ts-essentials "^7.0.1" + +"@types/async-eventemitter@^0.2.1": + version "0.2.1" + resolved "https://registry.yarnpkg.com/@types/async-eventemitter/-/async-eventemitter-0.2.1.tgz#f8e6280e87e8c60b2b938624b0a3530fb3e24712" + integrity sha512-M2P4Ng26QbAeITiH7w1d7OxtldgfAe0wobpyJzVK/XOb0cUGKU2R4pfAhqcJBXAe2ife5ZOhSv4wk7p+ffURtg== + +"@types/bn.js@^4.11.3": + version "4.11.6" + resolved "https://registry.yarnpkg.com/@types/bn.js/-/bn.js-4.11.6.tgz#c306c70d9358aaea33cd4eda092a742b9505967c" + integrity sha512-pqr857jrp2kPuO9uRjZ3PwnJTjoQy+fcdxvBTvHm6dkmEL9q+hDD/2j/0ELOBPtPnS8LjCX0gI9nbl8lVkadpg== + dependencies: + "@types/node" "*" + +"@types/bn.js@^5.1.0": + version "5.1.1" + resolved "https://registry.yarnpkg.com/@types/bn.js/-/bn.js-5.1.1.tgz#b51e1b55920a4ca26e9285ff79936bbdec910682" + integrity sha512-qNrYbZqMx0uJAfKnKclPh+dTwK33KfLHYqtyODwd5HnXOjnkhc4qgn3BrK6RWyGZm5+sIFE7Q7Vz6QQtJB7w7g== + dependencies: + "@types/node" "*" + +"@types/lru-cache@^5.1.0": + version "5.1.1" + resolved "https://registry.yarnpkg.com/@types/lru-cache/-/lru-cache-5.1.1.tgz#c48c2e27b65d2a153b19bfc1a317e30872e01eef" + integrity sha512-ssE3Vlrys7sdIzs5LOxCzTVMsU7i9oa/IaW92wF32JFb3CVczqOkru2xspuKczHEbG3nvmPY7IFqVmGGHdNbYw== + +"@types/mocha@^9.1.1": + version "9.1.1" + resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-9.1.1.tgz#e7c4f1001eefa4b8afbd1eee27a237fee3bf29c4" + integrity sha512-Z61JK7DKDtdKTWwLeElSEBcWGRLY8g95ic5FoQqI9CMx0ns/Ghep3B4DfcEimiKMvtamNVULVNKEsiwV3aQmXw== + +"@types/node@*": + version "18.11.18" + resolved "https://registry.yarnpkg.com/@types/node/-/node-18.11.18.tgz#8dfb97f0da23c2293e554c5a50d61ef134d7697f" + integrity sha512-DHQpWGjyQKSHj3ebjFI/wRKcqQcdR+MoFBygntYOZytCqNfkd2ZC4ARDJ2DQqhjH5p85Nnd3jhUJIXrszFX/JA== + +"@types/pbkdf2@^3.0.0": + version "3.1.0" + resolved "https://registry.yarnpkg.com/@types/pbkdf2/-/pbkdf2-3.1.0.tgz#039a0e9b67da0cdc4ee5dab865caa6b267bb66b1" + integrity sha512-Cf63Rv7jCQ0LaL8tNXmEyqTHuIJxRdlS5vMh1mj5voN4+QFhVZnlZruezqpWYDiJ8UTzhP0VmeLXCmBk66YrMQ== + dependencies: + "@types/node" "*" + +"@types/prettier@^2.1.1": + version "2.7.2" + resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.7.2.tgz#6c2324641cc4ba050a8c710b2b251b377581fbf0" + integrity sha512-KufADq8uQqo1pYKVIYzfKbJfBAc0sOeXqGbFaSpv8MRmC/zXgowNZmFcbngndGk922QDmOASEXUZCaY48gs4cg== + +"@types/secp256k1@^4.0.1": + version "4.0.3" + resolved "https://registry.yarnpkg.com/@types/secp256k1/-/secp256k1-4.0.3.tgz#1b8e55d8e00f08ee7220b4d59a6abe89c37a901c" + integrity sha512-Da66lEIFeIz9ltsdMZcpQvmrmmoqrfju8pm1BH8WbYjZSwUgCwXLb9C+9XYogwBITnbsSaMdVPb2ekf7TV+03w== + dependencies: + "@types/node" "*" + +abort-controller@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/abort-controller/-/abort-controller-3.0.0.tgz#eaf54d53b62bae4138e809ca225c8439a6efb392" + integrity sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg== + dependencies: + event-target-shim "^5.0.0" + +abstract-level@^1.0.0, abstract-level@^1.0.2, abstract-level@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/abstract-level/-/abstract-level-1.0.3.tgz#78a67d3d84da55ee15201486ab44c09560070741" + integrity sha512-t6jv+xHy+VYwc4xqZMn2Pa9DjcdzvzZmQGRjTFc8spIbRGHgBrEKbPq+rYXc7CCo0lxgYvSgKVg9qZAhpVQSjA== + dependencies: + buffer "^6.0.3" + catering "^2.1.0" + is-buffer "^2.0.5" + level-supports "^4.0.0" + level-transcoder "^1.0.1" + module-error "^1.0.1" + queue-microtask "^1.2.3" + +acorn-jsx@^5.0.0: + version "5.3.2" + resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937" + integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== + +acorn-walk@^8.1.1: + version "8.2.0" + resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.2.0.tgz#741210f2e2426454508853a2f44d0ab83b7f69c1" + integrity sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA== + +acorn@^6.0.7: + version "6.4.2" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.4.2.tgz#35866fd710528e92de10cf06016498e47e39e1e6" + integrity sha512-XtGIhXwF8YM8bJhGxG5kXgjkEuNGLTkoYqVE+KMR+aspr4KGYmKYg7yUe3KghyQ9yheNwLnjmzh/7+gfDBmHCQ== + +acorn@^8.4.1: + version "8.8.2" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.8.2.tgz#1b2f25db02af965399b9776b0c2c391276d37c4a" + integrity sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw== + +adm-zip@^0.4.16: + version "0.4.16" + resolved "https://registry.yarnpkg.com/adm-zip/-/adm-zip-0.4.16.tgz#cf4c508fdffab02c269cbc7f471a875f05570365" + integrity sha512-TFi4HBKSGfIKsK5YCkKaaFG2m4PEDyViZmEwof3MTIgzimHLto6muaHVpbrljdIvIrFZzEq/p4nafOeLcYegrg== + +agent-base@6: + version "6.0.2" + resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-6.0.2.tgz#49fff58577cfee3f37176feab4c22e00f86d7f77" + integrity sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ== + dependencies: + debug "4" + +aggregate-error@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/aggregate-error/-/aggregate-error-3.1.0.tgz#92670ff50f5359bdb7a3e0d40d0ec30c5737687a" + integrity sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA== + dependencies: + clean-stack "^2.0.0" + indent-string "^4.0.0" + +ajv@^6.10.2, ajv@^6.6.1, ajv@^6.9.1: + version "6.12.6" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" + integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== + dependencies: + fast-deep-equal "^3.1.1" + fast-json-stable-stringify "^2.0.0" + json-schema-traverse "^0.4.1" + uri-js "^4.2.2" + +ansi-colors@4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.1.tgz#cbb9ae256bf750af1eab344f229aa27fe94ba348" + integrity sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA== + +ansi-colors@^4.1.1: + version "4.1.3" + resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.3.tgz#37611340eb2243e70cc604cad35d63270d48781b" + integrity sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw== + +ansi-escapes@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-3.2.0.tgz#8780b98ff9dbf5638152d1f1fe5c1d7b4442976b" + integrity sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ== + +ansi-escapes@^4.3.0: + version "4.3.2" + resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-4.3.2.tgz#6b2291d1db7d98b6521d5f1efa42d0f3a9feb65e" + integrity sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ== + dependencies: + type-fest "^0.21.3" + +ansi-regex@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.1.tgz#123d6479e92ad45ad897d4054e3c7ca7db4944e1" + integrity sha512-+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw== + +ansi-regex@^4.1.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-4.1.1.tgz#164daac87ab2d6f6db3a29875e2d1766582dabed" + integrity sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g== + +ansi-regex@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" + integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== + +ansi-styles@^3.2.0, ansi-styles@^3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" + integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== + dependencies: + color-convert "^1.9.0" + +ansi-styles@^4.0.0, ansi-styles@^4.1.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" + integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== + dependencies: + color-convert "^2.0.1" + +antlr4@4.7.1: + version "4.7.1" + resolved "https://registry.yarnpkg.com/antlr4/-/antlr4-4.7.1.tgz#69984014f096e9e775f53dd9744bf994d8959773" + integrity sha512-haHyTW7Y9joE5MVs37P2lNYfU2RWBLfcRDD8OWldcdZm5TiCE91B5Xl1oWSwiDUSd4rlExpt2pu1fksYQjRBYQ== + +antlr4ts@^0.5.0-alpha.4: + version "0.5.0-alpha.4" + resolved "https://registry.yarnpkg.com/antlr4ts/-/antlr4ts-0.5.0-alpha.4.tgz#71702865a87478ed0b40c0709f422cf14d51652a" + integrity sha512-WPQDt1B74OfPv/IMS2ekXAKkTZIHl88uMetg6q3OTqgFxZ/dxDXI0EWLyZid/1Pe6hTftyg5N7gel5wNAGxXyQ== + +anymatch@~3.1.2: + version "3.1.3" + resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.3.tgz#790c58b19ba1720a84205b57c618d5ad8524973e" + integrity sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw== + dependencies: + normalize-path "^3.0.0" + picomatch "^2.0.4" + +arg@^4.1.0: + version "4.1.3" + resolved "https://registry.yarnpkg.com/arg/-/arg-4.1.3.tgz#269fc7ad5b8e42cb63c896d5666017261c144089" + integrity sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA== + +argparse@^1.0.7: + version "1.0.10" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" + integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg== + dependencies: + sprintf-js "~1.0.2" + +argparse@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" + integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== + +array-back@^3.0.1, array-back@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/array-back/-/array-back-3.1.0.tgz#b8859d7a508871c9a7b2cf42f99428f65e96bfb0" + integrity sha512-TkuxA4UCOvxuDK6NZYXCalszEzj+TLszyASooky+i742l9TqsOdYCMJJupxRic61hwquNtppB3hgcuq9SVSH1Q== + +array-back@^4.0.1, array-back@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/array-back/-/array-back-4.0.2.tgz#8004e999a6274586beeb27342168652fdb89fa1e" + integrity sha512-NbdMezxqf94cnNfWLL7V/im0Ub+Anbb0IoZhvzie8+4HJ4nMQuzHuy49FkGYCJK2yAloZ3meiB6AVMClbrI1vg== + +ast-parents@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/ast-parents/-/ast-parents-0.0.1.tgz#508fd0f05d0c48775d9eccda2e174423261e8dd3" + integrity sha512-XHusKxKz3zoYk1ic8Un640joHbFMhbqneyoZfoKnEGtf2ey9Uh/IdpcQplODdO/kENaMIWsD0nJm4+wX3UNLHA== + +astral-regex@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-1.0.0.tgz#6c8c3fb827dd43ee3918f27b82782ab7658a6fd9" + integrity sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg== + +async-eventemitter@^0.2.4: + version "0.2.4" + resolved "https://registry.yarnpkg.com/async-eventemitter/-/async-eventemitter-0.2.4.tgz#f5e7c8ca7d3e46aab9ec40a292baf686a0bafaca" + integrity sha512-pd20BwL7Yt1zwDFy+8MX8F1+WCT8aQeKj0kQnTrH9WaeRETlRamVhD0JtRPmrV4GfOJ2F9CvdQkZeZhnh2TuHw== + dependencies: + async "^2.4.0" + +async@^2.4.0: + version "2.6.4" + resolved "https://registry.yarnpkg.com/async/-/async-2.6.4.tgz#706b7ff6084664cd7eae713f6f965433b5504221" + integrity sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA== + dependencies: + lodash "^4.17.14" + +balanced-match@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" + integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== + +base-x@^3.0.2: + version "3.0.9" + resolved "https://registry.yarnpkg.com/base-x/-/base-x-3.0.9.tgz#6349aaabb58526332de9f60995e548a53fe21320" + integrity sha512-H7JU6iBHTal1gp56aKoaa//YUxEaAOUiydvrV/pILqIHXTtqxSkATOnDA2u+jZ/61sD+L/412+7kzXRtWukhpQ== + dependencies: + safe-buffer "^5.0.1" + +base64-js@^1.3.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" + integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== + +bigint-crypto-utils@^3.0.23: + version "3.1.8" + resolved "https://registry.yarnpkg.com/bigint-crypto-utils/-/bigint-crypto-utils-3.1.8.tgz#e2e0f40cf45488f9d7f0e32ff84152aa73819d5d" + integrity sha512-+VMV9Laq8pXLBKKKK49nOoq9bfR3j7NNQAtbA617a4nw9bVLo8rsqkKMBgM2AJWlNX9fEIyYaYX+d0laqYV4tw== + dependencies: + bigint-mod-arith "^3.1.0" + +bigint-mod-arith@^3.1.0: + version "3.1.2" + resolved "https://registry.yarnpkg.com/bigint-mod-arith/-/bigint-mod-arith-3.1.2.tgz#658e416bc593a463d97b59766226d0a3021a76b1" + integrity sha512-nx8J8bBeiRR+NlsROFH9jHswW5HO8mgfOSqW0AmjicMMvaONDa8AO+5ViKDUUNytBPWiwfvZP4/Bj4Y3lUfvgQ== + +binary-extensions@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d" + integrity sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA== + +blakejs@^1.1.0: + version "1.2.1" + resolved "https://registry.yarnpkg.com/blakejs/-/blakejs-1.2.1.tgz#5057e4206eadb4a97f7c0b6e197a505042fc3814" + integrity sha512-QXUSXI3QVc/gJME0dBpXrag1kbzOqCjCX8/b54ntNyW6sjtoqxqRk3LTmXzaJoh71zMsDCjM+47jS7XiwN/+fQ== + +bn.js@^4.11.0, bn.js@^4.11.8, bn.js@^4.11.9: + version "4.12.0" + resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.12.0.tgz#775b3f278efbb9718eec7361f483fb36fbbfea88" + integrity sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA== + +bn.js@^5.2.0, bn.js@^5.2.1: + version "5.2.1" + resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.2.1.tgz#0bc527a6a0d18d0aa8d5b0538ce4a77dccfa7b70" + integrity sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ== + +brace-expansion@^1.1.7: + version "1.1.11" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" + integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== + dependencies: + balanced-match "^1.0.0" + concat-map "0.0.1" + +brace-expansion@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-2.0.1.tgz#1edc459e0f0c548486ecf9fc99f2221364b9a0ae" + integrity sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA== + dependencies: + balanced-match "^1.0.0" + +braces@~3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" + integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== + dependencies: + fill-range "^7.0.1" + +brorand@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f" + integrity sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w== + +browser-level@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/browser-level/-/browser-level-1.0.1.tgz#36e8c3183d0fe1c405239792faaab5f315871011" + integrity sha512-XECYKJ+Dbzw0lbydyQuJzwNXtOpbMSq737qxJN11sIRTErOMShvDpbzTlgju7orJKvx4epULolZAuJGLzCmWRQ== + dependencies: + abstract-level "^1.0.2" + catering "^2.1.1" + module-error "^1.0.2" + run-parallel-limit "^1.1.0" + +browser-stdout@1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.1.tgz#baa559ee14ced73452229bad7326467c61fabd60" + integrity sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw== + +browserify-aes@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/browserify-aes/-/browserify-aes-1.2.0.tgz#326734642f403dabc3003209853bb70ad428ef48" + integrity sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA== + dependencies: + buffer-xor "^1.0.3" + cipher-base "^1.0.0" + create-hash "^1.1.0" + evp_bytestokey "^1.0.3" + inherits "^2.0.1" + safe-buffer "^5.0.1" + +bs58@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/bs58/-/bs58-4.0.1.tgz#be161e76c354f6f788ae4071f63f34e8c4f0a42a" + integrity sha512-Ok3Wdf5vOIlBrgCvTq96gBkJw+JUEzdBgyaza5HLtPm7yTHkjRy8+JzNyHF7BHa0bNWOQIp3m5YF0nnFcOIKLw== + dependencies: + base-x "^3.0.2" + +bs58check@^2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/bs58check/-/bs58check-2.1.2.tgz#53b018291228d82a5aa08e7d796fdafda54aebfc" + integrity sha512-0TS1jicxdU09dwJMNZtVAfzPi6Q6QeN0pM1Fkzrjn+XYHvzMKPU3pHVpva+769iNVSfIYWf7LJ6WR+BuuMf8cA== + dependencies: + bs58 "^4.0.0" + create-hash "^1.1.0" + safe-buffer "^5.1.2" + +buffer-from@^1.0.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5" + integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== + +buffer-xor@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/buffer-xor/-/buffer-xor-1.0.3.tgz#26e61ed1422fb70dd42e6e36729ed51d855fe8d9" + integrity sha512-571s0T7nZWK6vB67HI5dyUF7wXiNcfaPPPTl6zYCNApANjIvYJTg7hlud/+cJpdAhS7dVzqMLmfhfHR3rAcOjQ== + +buffer@^6.0.3: + version "6.0.3" + resolved "https://registry.yarnpkg.com/buffer/-/buffer-6.0.3.tgz#2ace578459cc8fbe2a70aaa8f52ee63b6a74c6c6" + integrity sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA== + dependencies: + base64-js "^1.3.1" + ieee754 "^1.2.1" + +busboy@^1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/busboy/-/busboy-1.6.0.tgz#966ea36a9502e43cdb9146962523b92f531f6893" + integrity sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA== + dependencies: + streamsearch "^1.1.0" + +bytes@3.1.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.2.tgz#8b0beeb98605adf1b128fa4386403c009e0221a5" + integrity sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg== + +call-bind@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.2.tgz#b1d4e89e688119c3c9a903ad30abb2f6a919be3c" + integrity sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA== + dependencies: + function-bind "^1.1.1" + get-intrinsic "^1.0.2" + +caller-callsite@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/caller-callsite/-/caller-callsite-2.0.0.tgz#847e0fce0a223750a9a027c54b33731ad3154134" + integrity sha512-JuG3qI4QOftFsZyOn1qq87fq5grLIyk1JYd5lJmdA+fG7aQ9pA/i3JIJGcO3q0MrRcHlOt1U+ZeHW8Dq9axALQ== + dependencies: + callsites "^2.0.0" + +caller-path@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/caller-path/-/caller-path-2.0.0.tgz#468f83044e369ab2010fac5f06ceee15bb2cb1f4" + integrity sha512-MCL3sf6nCSXOwCTzvPKhN18TU7AHTvdtam8DAogxcrJ8Rjfbbg7Lgng64H9Iy+vUV6VGFClN/TyxBkAebLRR4A== + dependencies: + caller-callsite "^2.0.0" + +callsites@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/callsites/-/callsites-2.0.0.tgz#06eb84f00eea413da86affefacbffb36093b3c50" + integrity sha512-ksWePWBloaWPxJYQ8TL0JHvtci6G5QTKwQ95RcWAa/lzoAKuAOflGdAK92hpHXjkwb8zLxoLNUoNYZgVsaJzvQ== + +callsites@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" + integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== + +camelcase@^6.0.0: + version "6.3.0" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.3.0.tgz#5685b95eb209ac9c0c177467778c9c84df58ba9a" + integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== + +catering@^2.1.0, catering@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/catering/-/catering-2.1.1.tgz#66acba06ed5ee28d5286133982a927de9a04b510" + integrity sha512-K7Qy8O9p76sL3/3m7/zLKbRkyOlSZAgzEaLhyj2mXS8PsCud2Eo4hAb8aLtZqHh0QGqLcb9dlJSu6lHRVENm1w== + +chalk@^2.0.0, chalk@^2.1.0, chalk@^2.4.2: + version "2.4.2" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" + integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== + dependencies: + ansi-styles "^3.2.1" + escape-string-regexp "^1.0.5" + supports-color "^5.3.0" + +chalk@^4.1.0: + version "4.1.2" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" + integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== + dependencies: + ansi-styles "^4.1.0" + supports-color "^7.1.0" + +chardet@^0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.7.0.tgz#90094849f0937f2eedc2425d0d28a9e5f0cbad9e" + integrity sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA== + +chokidar@3.5.3, chokidar@^3.4.0: + version "3.5.3" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.3.tgz#1cf37c8707b932bd1af1ae22c0432e2acd1903bd" + integrity sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw== + dependencies: + anymatch "~3.1.2" + braces "~3.0.2" + glob-parent "~5.1.2" + is-binary-path "~2.1.0" + is-glob "~4.0.1" + normalize-path "~3.0.0" + readdirp "~3.6.0" + optionalDependencies: + fsevents "~2.3.2" + +ci-info@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-2.0.0.tgz#67a9e964be31a51e15e5010d58e6f12834002f46" + integrity sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ== + +cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/cipher-base/-/cipher-base-1.0.4.tgz#8760e4ecc272f4c363532f926d874aae2c1397de" + integrity sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q== + dependencies: + inherits "^2.0.1" + safe-buffer "^5.0.1" + +classic-level@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/classic-level/-/classic-level-1.2.0.tgz#2d52bdec8e7a27f534e67fdeb890abef3e643c27" + integrity sha512-qw5B31ANxSluWz9xBzklRWTUAJ1SXIdaVKTVS7HcTGKOAmExx65Wo5BUICW+YGORe2FOUaDghoI9ZDxj82QcFg== + dependencies: + abstract-level "^1.0.2" + catering "^2.1.0" + module-error "^1.0.1" + napi-macros "~2.0.0" + node-gyp-build "^4.3.0" + +clean-stack@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/clean-stack/-/clean-stack-2.2.0.tgz#ee8472dbb129e727b31e8a10a427dee9dfe4008b" + integrity sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A== + +cli-cursor@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-2.1.0.tgz#b35dac376479facc3e94747d41d0d0f5238ffcb5" + integrity sha512-8lgKz8LmCRYZZQDpRyT2m5rKJ08TnU4tR9FFFW2rxpxR1FzWi4PQ/NfyODchAatHaUgnSPVcx/R5w6NuTBzFiw== + dependencies: + restore-cursor "^2.0.0" + +cli-width@^2.0.0: + version "2.2.1" + resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.2.1.tgz#b0433d0b4e9c847ef18868a4ef16fd5fc8271c48" + integrity sha512-GRMWDxpOB6Dgk2E5Uo+3eEBvtOOlimMmpbFiKuLFnQzYDavtLFY3K5ona41jgN/WdRZtG7utuVSVTL4HbZHGkw== + +cliui@^7.0.2: + version "7.0.4" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-7.0.4.tgz#a0265ee655476fc807aea9df3df8df7783808b4f" + integrity sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ== + dependencies: + string-width "^4.2.0" + strip-ansi "^6.0.0" + wrap-ansi "^7.0.0" + +color-convert@^1.9.0: + version "1.9.3" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" + integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== + dependencies: + color-name "1.1.3" + +color-convert@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" + integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== + dependencies: + color-name "~1.1.4" + +color-name@1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" + integrity sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw== + +color-name@~1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" + integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== + +command-exists@^1.2.8: + version "1.2.9" + resolved "https://registry.yarnpkg.com/command-exists/-/command-exists-1.2.9.tgz#c50725af3808c8ab0260fd60b01fbfa25b954f69" + integrity sha512-LTQ/SGc+s0Xc0Fu5WaKnR0YiygZkm9eKFvyS+fRsU7/ZWFF8ykFM6Pc9aCVf1+xasOOZpO3BAVgVrKvsqKHV7w== + +command-line-args@^5.1.1: + version "5.2.1" + resolved "https://registry.yarnpkg.com/command-line-args/-/command-line-args-5.2.1.tgz#c44c32e437a57d7c51157696893c5909e9cec42e" + integrity sha512-H4UfQhZyakIjC74I9d34fGYDwk3XpSr17QhEd0Q3I9Xq1CETHo4Hcuo87WyWHpAF1aSLjLRf5lD9ZGX2qStUvg== + dependencies: + array-back "^3.1.0" + find-replace "^3.0.0" + lodash.camelcase "^4.3.0" + typical "^4.0.0" + +command-line-usage@^6.1.0: + version "6.1.3" + resolved "https://registry.yarnpkg.com/command-line-usage/-/command-line-usage-6.1.3.tgz#428fa5acde6a838779dfa30e44686f4b6761d957" + integrity sha512-sH5ZSPr+7UStsloltmDh7Ce5fb8XPlHyoPzTpyyMuYCtervL65+ubVZ6Q61cFtFl62UyJlc8/JwERRbAFPUqgw== + dependencies: + array-back "^4.0.2" + chalk "^2.4.2" + table-layout "^1.0.2" + typical "^5.2.0" + +commander@2.18.0: + version "2.18.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.18.0.tgz#2bf063ddee7c7891176981a2cc798e5754bc6970" + integrity sha512-6CYPa+JP2ftfRU2qkDK+UTVeQYosOg/2GbcjIcKPHfinyOLPVGXu/ovN86RP49Re5ndJK1N0kuiidFFuepc4ZQ== + +commander@3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/commander/-/commander-3.0.2.tgz#6837c3fb677ad9933d1cfba42dd14d5117d6b39e" + integrity sha512-Gar0ASD4BDyKC4hl4DwHqDrmvjoxWKZigVnAbn5H1owvm4CxCPdb0HQDehwNYMJpla5+M2tPmPARzhtYuwpHow== + +concat-map@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== + +cookie@^0.4.1: + version "0.4.2" + resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.4.2.tgz#0e41f24de5ecf317947c82fc789e06a884824432" + integrity sha512-aSWTXFzaKWkvHO1Ny/s+ePFpvKsPnjc551iI41v3ny/ow6tBG5Vd+FuqGNhh1LxOmVzOlGUriIlOaokOvhaStA== + +cosmiconfig@^5.0.7: + version "5.2.1" + resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-5.2.1.tgz#040f726809c591e77a17c0a3626ca45b4f168b1a" + integrity sha512-H65gsXo1SKjf8zmrJ67eJk8aIRKV5ff2D4uKZIBZShbhGSpEmsQOPW/SKMKYhSTrqR7ufy6RP69rPogdaPh/kA== + dependencies: + import-fresh "^2.0.0" + is-directory "^0.3.1" + js-yaml "^3.13.1" + parse-json "^4.0.0" + +crc-32@^1.2.0: + version "1.2.2" + resolved "https://registry.yarnpkg.com/crc-32/-/crc-32-1.2.2.tgz#3cad35a934b8bf71f25ca524b6da51fb7eace2ff" + integrity sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ== + +create-hash@^1.1.0, create-hash@^1.1.2, create-hash@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/create-hash/-/create-hash-1.2.0.tgz#889078af11a63756bcfb59bd221996be3a9ef196" + integrity sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg== + dependencies: + cipher-base "^1.0.1" + inherits "^2.0.1" + md5.js "^1.3.4" + ripemd160 "^2.0.1" + sha.js "^2.4.0" + +create-hmac@^1.1.4, create-hmac@^1.1.7: + version "1.1.7" + resolved "https://registry.yarnpkg.com/create-hmac/-/create-hmac-1.1.7.tgz#69170c78b3ab957147b2b8b04572e47ead2243ff" + integrity sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg== + dependencies: + cipher-base "^1.0.3" + create-hash "^1.1.0" + inherits "^2.0.1" + ripemd160 "^2.0.0" + safe-buffer "^5.0.1" + sha.js "^2.4.8" + +create-require@^1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/create-require/-/create-require-1.1.1.tgz#c1d7e8f1e5f6cfc9ff65f9cd352d37348756c333" + integrity sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ== + +cross-spawn@^6.0.5: + version "6.0.5" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4" + integrity sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ== + dependencies: + nice-try "^1.0.4" + path-key "^2.0.1" + semver "^5.5.0" + shebang-command "^1.2.0" + which "^1.2.9" + +debug@4, debug@4.3.4, debug@^4.0.1, debug@^4.1.1, debug@^4.3.1, debug@^4.3.3: + version "4.3.4" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" + integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== + dependencies: + ms "2.1.2" + +decamelize@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-4.0.0.tgz#aa472d7bf660eb15f3494efd531cab7f2a709837" + integrity sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ== + +deep-extend@~0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac" + integrity sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA== + +deep-is@~0.1.3: + version "0.1.4" + resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.4.tgz#a6f2dce612fadd2ef1f519b73551f17e85199831" + integrity sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ== + +depd@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/depd/-/depd-2.0.0.tgz#b696163cc757560d09cf22cc8fad1571b79e76df" + integrity sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw== + +diff@5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/diff/-/diff-5.0.0.tgz#7ed6ad76d859d030787ec35855f5b1daf31d852b" + integrity sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w== + +diff@^4.0.1: + version "4.0.2" + resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.2.tgz#60f3aecb89d5fae520c11aa19efc2bb982aade7d" + integrity sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A== + +doctrine@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-3.0.0.tgz#addebead72a6574db783639dc87a121773973961" + integrity sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w== + dependencies: + esutils "^2.0.2" + +"ds-test@https://github.com/dapphub/ds-test.git#c7a36fb236f298e04edf28e2fee385b80f53945f": + version "0.0.0" + resolved "https://github.com/dapphub/ds-test.git#c7a36fb236f298e04edf28e2fee385b80f53945f" + +elliptic@6.5.4, elliptic@^6.5.2, elliptic@^6.5.4: + version "6.5.4" + resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.4.tgz#da37cebd31e79a1367e941b592ed1fbebd58abbb" + integrity sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ== + dependencies: + bn.js "^4.11.9" + brorand "^1.1.0" + hash.js "^1.0.0" + hmac-drbg "^1.0.1" + inherits "^2.0.4" + minimalistic-assert "^1.0.1" + minimalistic-crypto-utils "^1.0.1" + +emoji-regex@^7.0.1: + version "7.0.3" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-7.0.3.tgz#933a04052860c85e83c122479c4748a8e4c72156" + integrity sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA== + +emoji-regex@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" + integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== + +enquirer@^2.3.0: + version "2.3.6" + resolved "https://registry.yarnpkg.com/enquirer/-/enquirer-2.3.6.tgz#2a7fe5dd634a1e4125a975ec994ff5456dc3734d" + integrity sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg== + dependencies: + ansi-colors "^4.1.1" + +env-paths@^2.2.0: + version "2.2.1" + resolved "https://registry.yarnpkg.com/env-paths/-/env-paths-2.2.1.tgz#420399d416ce1fbe9bc0a07c62fa68d67fd0f8f2" + integrity sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A== + +error-ex@^1.3.1: + version "1.3.2" + resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" + integrity sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g== + dependencies: + is-arrayish "^0.2.1" + +escalade@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" + integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw== + +escape-string-regexp@4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" + integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== + +escape-string-regexp@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" + integrity sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg== + +eslint-scope@^4.0.3: + version "4.0.3" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-4.0.3.tgz#ca03833310f6889a3264781aa82e63eb9cfe7848" + integrity sha512-p7VutNr1O/QrxysMo3E45FjYDTeXBy0iTltPFNSqKAIfjDSXC+4dj+qfyuD8bfAXrW/y6lW3O76VaYNPKfpKrg== + dependencies: + esrecurse "^4.1.0" + estraverse "^4.1.1" + +eslint-utils@^1.3.1: + version "1.4.3" + resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-1.4.3.tgz#74fec7c54d0776b6f67e0251040b5806564e981f" + integrity sha512-fbBN5W2xdY45KulGXmLHZ3c3FHfVYmKg0IrAKGOkT/464PQsx2UeIzfz1RmEci+KLm1bBaAzZAh8+/E+XAeZ8Q== + dependencies: + eslint-visitor-keys "^1.1.0" + +eslint-visitor-keys@^1.0.0, eslint-visitor-keys@^1.1.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz#30ebd1ef7c2fdff01c3a4f151044af25fab0523e" + integrity sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ== + +eslint@^5.6.0: + version "5.16.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-5.16.0.tgz#a1e3ac1aae4a3fbd8296fcf8f7ab7314cbb6abea" + integrity sha512-S3Rz11i7c8AA5JPv7xAH+dOyq/Cu/VXHiHXBPOU1k/JAM5dXqQPt3qcrhpHSorXmrpu2g0gkIBVXAqCpzfoZIg== + dependencies: + "@babel/code-frame" "^7.0.0" + ajv "^6.9.1" + chalk "^2.1.0" + cross-spawn "^6.0.5" + debug "^4.0.1" + doctrine "^3.0.0" + eslint-scope "^4.0.3" + eslint-utils "^1.3.1" + eslint-visitor-keys "^1.0.0" + espree "^5.0.1" + esquery "^1.0.1" + esutils "^2.0.2" + file-entry-cache "^5.0.1" + functional-red-black-tree "^1.0.1" + glob "^7.1.2" + globals "^11.7.0" + ignore "^4.0.6" + import-fresh "^3.0.0" + imurmurhash "^0.1.4" + inquirer "^6.2.2" + js-yaml "^3.13.0" + json-stable-stringify-without-jsonify "^1.0.1" + levn "^0.3.0" + lodash "^4.17.11" + minimatch "^3.0.4" + mkdirp "^0.5.1" + natural-compare "^1.4.0" + optionator "^0.8.2" + path-is-inside "^1.0.2" + progress "^2.0.0" + regexpp "^2.0.1" + semver "^5.5.1" + strip-ansi "^4.0.0" + strip-json-comments "^2.0.1" + table "^5.2.3" + text-table "^0.2.0" + +espree@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/espree/-/espree-5.0.1.tgz#5d6526fa4fc7f0788a5cf75b15f30323e2f81f7a" + integrity sha512-qWAZcWh4XE/RwzLJejfcofscgMc9CamR6Tn1+XRXNzrvUSSbiAjGOI/fggztjIi7y9VLPqnICMIPiGyr8JaZ0A== + dependencies: + acorn "^6.0.7" + acorn-jsx "^5.0.0" + eslint-visitor-keys "^1.0.0" + +esprima@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" + integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== + +esquery@^1.0.1: + version "1.4.0" + resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.4.0.tgz#2148ffc38b82e8c7057dfed48425b3e61f0f24a5" + integrity sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w== + dependencies: + estraverse "^5.1.0" + +esrecurse@^4.1.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.3.0.tgz#7ad7964d679abb28bee72cec63758b1c5d2c9921" + integrity sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag== + dependencies: + estraverse "^5.2.0" + +estraverse@^4.1.1: + version "4.3.0" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.3.0.tgz#398ad3f3c5a24948be7725e83d11a7de28cdbd1d" + integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw== + +estraverse@^5.1.0, estraverse@^5.2.0: + version "5.3.0" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.3.0.tgz#2eea5290702f26ab8fe5370370ff86c965d21123" + integrity sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA== + +esutils@^2.0.2: + version "2.0.3" + resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" + integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== + +ethereum-cryptography@0.1.3, ethereum-cryptography@^0.1.3: + version "0.1.3" + resolved "https://registry.yarnpkg.com/ethereum-cryptography/-/ethereum-cryptography-0.1.3.tgz#8d6143cfc3d74bf79bbd8edecdf29e4ae20dd191" + integrity sha512-w8/4x1SGGzc+tO97TASLja6SLd3fRIK2tLVcV2Gx4IB21hE19atll5Cq9o3d0ZmAYC/8aw0ipieTSiekAea4SQ== + dependencies: + "@types/pbkdf2" "^3.0.0" + "@types/secp256k1" "^4.0.1" + blakejs "^1.1.0" + browserify-aes "^1.2.0" + bs58check "^2.1.2" + create-hash "^1.2.0" + create-hmac "^1.1.7" + hash.js "^1.1.7" + keccak "^3.0.0" + pbkdf2 "^3.0.17" + randombytes "^2.1.0" + safe-buffer "^5.1.2" + scrypt-js "^3.0.0" + secp256k1 "^4.0.1" + setimmediate "^1.0.5" + +ethereum-cryptography@^1.0.3: + version "1.1.2" + resolved "https://registry.yarnpkg.com/ethereum-cryptography/-/ethereum-cryptography-1.1.2.tgz#74f2ac0f0f5fe79f012c889b3b8446a9a6264e6d" + integrity sha512-XDSJlg4BD+hq9N2FjvotwUET9Tfxpxc3kWGE2AqUG5vcbeunnbImVk3cj6e/xT3phdW21mE8R5IugU4fspQDcQ== + dependencies: + "@noble/hashes" "1.1.2" + "@noble/secp256k1" "1.6.3" + "@scure/bip32" "1.1.0" + "@scure/bip39" "1.1.0" + +ethereumjs-abi@^0.6.8: + version "0.6.8" + resolved "https://registry.yarnpkg.com/ethereumjs-abi/-/ethereumjs-abi-0.6.8.tgz#71bc152db099f70e62f108b7cdfca1b362c6fcae" + integrity sha512-Tx0r/iXI6r+lRsdvkFDlut0N08jWMnKRZ6Gkq+Nmw75lZe4e6o3EkSnkaBP5NF6+m5PTGAr9JP43N3LyeoglsA== + dependencies: + bn.js "^4.11.8" + ethereumjs-util "^6.0.0" + +ethereumjs-util@^6.0.0, ethereumjs-util@^6.2.1: + version "6.2.1" + resolved "https://registry.yarnpkg.com/ethereumjs-util/-/ethereumjs-util-6.2.1.tgz#fcb4e4dd5ceacb9d2305426ab1a5cd93e3163b69" + integrity sha512-W2Ktez4L01Vexijrm5EB6w7dg4n/TgpoYU4avuT5T3Vmnw/eCRtiBrJfQYS/DCSvDIOLn2k57GcHdeBcgVxAqw== + dependencies: + "@types/bn.js" "^4.11.3" + bn.js "^4.11.0" + create-hash "^1.1.2" + elliptic "^6.5.2" + ethereum-cryptography "^0.1.3" + ethjs-util "0.1.6" + rlp "^2.2.3" + +ethjs-util@0.1.6, ethjs-util@^0.1.6: + version "0.1.6" + resolved "https://registry.yarnpkg.com/ethjs-util/-/ethjs-util-0.1.6.tgz#f308b62f185f9fe6237132fb2a9818866a5cd536" + integrity sha512-CUnVOQq7gSpDHZVVrQW8ExxUETWrnrvXYvYz55wOU8Uj4VCgw56XC2B/fVqQN+f7gmrnRHSLVnFAwsCuNwji8w== + dependencies: + is-hex-prefixed "1.0.0" + strip-hex-prefix "1.0.0" + +event-target-shim@^5.0.0: + version "5.0.1" + resolved "https://registry.yarnpkg.com/event-target-shim/-/event-target-shim-5.0.1.tgz#5d4d3ebdf9583d63a5333ce2deb7480ab2b05789" + integrity sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ== + +evp_bytestokey@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz#7fcbdb198dc71959432efe13842684e0525acb02" + integrity sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA== + dependencies: + md5.js "^1.3.4" + safe-buffer "^5.1.1" + +external-editor@^3.0.3: + version "3.1.0" + resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-3.1.0.tgz#cb03f740befae03ea4d283caed2741a83f335495" + integrity sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew== + dependencies: + chardet "^0.7.0" + iconv-lite "^0.4.24" + tmp "^0.0.33" + +fast-deep-equal@^3.1.1: + version "3.1.3" + resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" + integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== + +fast-diff@^1.1.2: + version "1.2.0" + resolved "https://registry.yarnpkg.com/fast-diff/-/fast-diff-1.2.0.tgz#73ee11982d86caaf7959828d519cfe927fac5f03" + integrity sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w== + +fast-json-stable-stringify@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" + integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== + +fast-levenshtein@~2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" + integrity sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw== + +figures@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/figures/-/figures-2.0.0.tgz#3ab1a2d2a62c8bfb431a0c94cb797a2fce27c962" + integrity sha512-Oa2M9atig69ZkfwiApY8F2Yy+tzMbazyvqv21R0NsSC8floSOC09BbT1ITWAdoMGQvJ/aZnR1KMwdx9tvHnTNA== + dependencies: + escape-string-regexp "^1.0.5" + +file-entry-cache@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-5.0.1.tgz#ca0f6efa6dd3d561333fb14515065c2fafdf439c" + integrity sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g== + dependencies: + flat-cache "^2.0.1" + +fill-range@^7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" + integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== + dependencies: + to-regex-range "^5.0.1" + +find-replace@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/find-replace/-/find-replace-3.0.0.tgz#3e7e23d3b05167a76f770c9fbd5258b0def68c38" + integrity sha512-6Tb2myMioCAgv5kfvP5/PkZZ/ntTpVK39fHY7WkWBgvbeE+VHd/tZuZ4mrC+bxh4cfOZeYKVPaJIZtZXV7GNCQ== + dependencies: + array-back "^3.0.1" + +find-up@5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-5.0.0.tgz#4c92819ecb7083561e4f4a240a86be5198f536fc" + integrity sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng== + dependencies: + locate-path "^6.0.0" + path-exists "^4.0.0" + +find-up@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7" + integrity sha512-NWzkk0jSJtTt08+FBFMvXoeZnOJD+jTtsRmBYbAIzJdX6l7dLgR7CTubCM5/eDdPUBvLCeVasP1brfVR/9/EZQ== + dependencies: + locate-path "^2.0.0" + +flat-cache@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-2.0.1.tgz#5d296d6f04bda44a4630a301413bdbc2ec085ec0" + integrity sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA== + dependencies: + flatted "^2.0.0" + rimraf "2.6.3" + write "1.0.3" + +flat@^5.0.2: + version "5.0.2" + resolved "https://registry.yarnpkg.com/flat/-/flat-5.0.2.tgz#8ca6fe332069ffa9d324c327198c598259ceb241" + integrity sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ== + +flatted@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/flatted/-/flatted-2.0.2.tgz#4575b21e2bcee7434aa9be662f4b7b5f9c2b5138" + integrity sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA== + +follow-redirects@^1.12.1: + version "1.15.2" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.2.tgz#b460864144ba63f2681096f274c4e57026da2c13" + integrity sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA== + +"forge-std@https://github.com/foundry-rs/forge-std.git#37a3fe48c3a4d8239cda93445f0b5e76b1507436": + version "0.0.0" + resolved "https://github.com/foundry-rs/forge-std.git#37a3fe48c3a4d8239cda93445f0b5e76b1507436" + +fp-ts@1.19.3: + version "1.19.3" + resolved "https://registry.yarnpkg.com/fp-ts/-/fp-ts-1.19.3.tgz#261a60d1088fbff01f91256f91d21d0caaaaa96f" + integrity sha512-H5KQDspykdHuztLTg+ajGN0Z2qUjcEf3Ybxc6hLt0k7/zPkn29XnKnxlBPyW2XIddWrGaJBzBl4VLYOtk39yZg== + +fp-ts@^1.0.0: + version "1.19.5" + resolved "https://registry.yarnpkg.com/fp-ts/-/fp-ts-1.19.5.tgz#3da865e585dfa1fdfd51785417357ac50afc520a" + integrity sha512-wDNqTimnzs8QqpldiId9OavWK2NptormjXnRJTQecNjzwfyp6P/8s/zG8e4h3ja3oqkKaY72UlTjQYt/1yXf9A== + +fs-extra@^0.30.0: + version "0.30.0" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-0.30.0.tgz#f233ffcc08d4da7d432daa449776989db1df93f0" + integrity sha512-UvSPKyhMn6LEd/WpUaV9C9t3zATuqoqfWc3QdPhPLb58prN9tqYPlPWi8Krxi44loBoUzlobqZ3+8tGpxxSzwA== + dependencies: + graceful-fs "^4.1.2" + jsonfile "^2.1.0" + klaw "^1.0.0" + path-is-absolute "^1.0.0" + rimraf "^2.2.8" + +fs-extra@^7.0.0, fs-extra@^7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-7.0.1.tgz#4f189c44aa123b895f722804f55ea23eadc348e9" + integrity sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw== + dependencies: + graceful-fs "^4.1.2" + jsonfile "^4.0.0" + universalify "^0.1.0" + +fs.realpath@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" + integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== + +fsevents@~2.3.2: + version "2.3.2" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a" + integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA== + +function-bind@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" + integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== + +functional-red-black-tree@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327" + integrity sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g== + +get-caller-file@^2.0.5: + version "2.0.5" + resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" + integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== + +get-intrinsic@^1.0.2: + version "1.2.0" + resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.2.0.tgz#7ad1dc0535f3a2904bba075772763e5051f6d05f" + integrity sha512-L049y6nFOuom5wGyRc3/gdTLO94dySVKRACj1RmJZBQXlbTMhtNIgkWkUHq+jYmZvKf14EW1EoJnnjbmoHij0Q== + dependencies: + function-bind "^1.1.1" + has "^1.0.3" + has-symbols "^1.0.3" + +glob-parent@~5.1.2: + version "5.1.2" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" + integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== + dependencies: + is-glob "^4.0.1" + +glob@7.1.7: + version "7.1.7" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.7.tgz#3b193e9233f01d42d0b3f78294bbeeb418f94a90" + integrity sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.4" + once "^1.3.0" + path-is-absolute "^1.0.0" + +glob@7.2.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.0.tgz#d15535af7732e02e948f4c41628bd910293f6023" + integrity sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.4" + once "^1.3.0" + path-is-absolute "^1.0.0" + +glob@^7.1.2, glob@^7.1.3: + version "7.2.3" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" + integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.1.1" + once "^1.3.0" + path-is-absolute "^1.0.0" + +globals@^11.7.0: + version "11.12.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" + integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== + +graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.1.9: + version "4.2.10" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.10.tgz#147d3a006da4ca3ce14728c7aefc287c367d7a6c" + integrity sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA== + +handlebars@^4.7.7: + version "4.7.7" + resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.7.7.tgz#9ce33416aad02dbd6c8fafa8240d5d98004945a1" + integrity sha512-aAcXm5OAfE/8IXkcZvCepKU3VzW1/39Fb5ZuqMtgI/hT8X2YgoMvBY5dLhq/cpOvw7Lk1nK/UF71aLG/ZnVYRA== + dependencies: + minimist "^1.2.5" + neo-async "^2.6.0" + source-map "^0.6.1" + wordwrap "^1.0.0" + optionalDependencies: + uglify-js "^3.1.4" + +hardhat@^2.10.1: + version "2.12.6" + resolved "https://registry.yarnpkg.com/hardhat/-/hardhat-2.12.6.tgz#ea3c058bbd81850867389d10f76037cfa52a0019" + integrity sha512-0Ent1O5DsPgvaVb5sxEgsQ3bJRt/Ex92tsoO+xjoNH2Qc4bFmhI5/CHVlFikulalxOPjNmw5XQ2vJFuVQFESAA== + dependencies: + "@ethersproject/abi" "^5.1.2" + "@metamask/eth-sig-util" "^4.0.0" + "@nomicfoundation/ethereumjs-block" "^4.0.0" + "@nomicfoundation/ethereumjs-blockchain" "^6.0.0" + "@nomicfoundation/ethereumjs-common" "^3.0.0" + "@nomicfoundation/ethereumjs-evm" "^1.0.0" + "@nomicfoundation/ethereumjs-rlp" "^4.0.0" + "@nomicfoundation/ethereumjs-statemanager" "^1.0.0" + "@nomicfoundation/ethereumjs-trie" "^5.0.0" + "@nomicfoundation/ethereumjs-tx" "^4.0.0" + "@nomicfoundation/ethereumjs-util" "^8.0.0" + "@nomicfoundation/ethereumjs-vm" "^6.0.0" + "@nomicfoundation/solidity-analyzer" "^0.1.0" + "@sentry/node" "^5.18.1" + "@types/bn.js" "^5.1.0" + "@types/lru-cache" "^5.1.0" + abort-controller "^3.0.0" + adm-zip "^0.4.16" + aggregate-error "^3.0.0" + ansi-escapes "^4.3.0" + chalk "^2.4.2" + chokidar "^3.4.0" + ci-info "^2.0.0" + debug "^4.1.1" + enquirer "^2.3.0" + env-paths "^2.2.0" + ethereum-cryptography "^1.0.3" + ethereumjs-abi "^0.6.8" + find-up "^2.1.0" + fp-ts "1.19.3" + fs-extra "^7.0.1" + glob "7.2.0" + immutable "^4.0.0-rc.12" + io-ts "1.10.4" + keccak "^3.0.2" + lodash "^4.17.11" + mnemonist "^0.38.0" + mocha "^10.0.0" + p-map "^4.0.0" + qs "^6.7.0" + raw-body "^2.4.1" + resolve "1.17.0" + semver "^6.3.0" + solc "0.7.3" + source-map-support "^0.5.13" + stacktrace-parser "^0.1.10" + tsort "0.0.1" + undici "^5.14.0" + uuid "^8.3.2" + ws "^7.4.6" + +has-flag@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" + integrity sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw== + +has-flag@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" + integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== + +has-symbols@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.3.tgz#bb7b2c4349251dce87b125f7bdf874aa7c8b39f8" + integrity sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A== + +has@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" + integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== + dependencies: + function-bind "^1.1.1" + +hash-base@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/hash-base/-/hash-base-3.1.0.tgz#55c381d9e06e1d2997a883b4a3fddfe7f0d3af33" + integrity sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA== + dependencies: + inherits "^2.0.4" + readable-stream "^3.6.0" + safe-buffer "^5.2.0" + +hash.js@1.1.7, hash.js@^1.0.0, hash.js@^1.0.3, hash.js@^1.1.7: + version "1.1.7" + resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.7.tgz#0babca538e8d4ee4a0f8988d68866537a003cf42" + integrity sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA== + dependencies: + inherits "^2.0.3" + minimalistic-assert "^1.0.1" + +he@1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f" + integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw== + +hmac-drbg@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1" + integrity sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg== + dependencies: + hash.js "^1.0.3" + minimalistic-assert "^1.0.0" + minimalistic-crypto-utils "^1.0.1" + +http-errors@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-2.0.0.tgz#b7774a1486ef73cf7667ac9ae0858c012c57b9d3" + integrity sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ== + dependencies: + depd "2.0.0" + inherits "2.0.4" + setprototypeof "1.2.0" + statuses "2.0.1" + toidentifier "1.0.1" + +https-proxy-agent@^5.0.0: + version "5.0.1" + resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz#c59ef224a04fe8b754f3db0063a25ea30d0005d6" + integrity sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA== + dependencies: + agent-base "6" + debug "4" + +iconv-lite@0.4.24, iconv-lite@^0.4.24: + version "0.4.24" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" + integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== + dependencies: + safer-buffer ">= 2.1.2 < 3" + +ieee754@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" + integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== + +ignore@^4.0.6: + version "4.0.6" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc" + integrity sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg== + +immutable@^4.0.0-rc.12: + version "4.2.2" + resolved "https://registry.yarnpkg.com/immutable/-/immutable-4.2.2.tgz#2da9ff4384a4330c36d4d1bc88e90f9e0b0ccd16" + integrity sha512-fTMKDwtbvO5tldky9QZ2fMX7slR0mYpY5nbnFWYp0fOzDhHqhgIw9KoYgxLWsoNTS9ZHGauHj18DTyEw6BK3Og== + +import-fresh@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-2.0.0.tgz#d81355c15612d386c61f9ddd3922d4304822a546" + integrity sha512-eZ5H8rcgYazHbKC3PG4ClHNykCSxtAhxSSEM+2mb+7evD2CKF5V7c0dNum7AdpDh0ZdICwZY9sRSn8f+KH96sg== + dependencies: + caller-path "^2.0.0" + resolve-from "^3.0.0" + +import-fresh@^3.0.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.3.0.tgz#37162c25fcb9ebaa2e6e53d5b4d88ce17d9e0c2b" + integrity sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw== + dependencies: + parent-module "^1.0.0" + resolve-from "^4.0.0" + +imurmurhash@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" + integrity sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA== + +indent-string@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-4.0.0.tgz#624f8f4497d619b2d9768531d58f4122854d7251" + integrity sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg== + +inflight@^1.0.4: + version "1.0.6" + resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" + integrity sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA== + dependencies: + once "^1.3.0" + wrappy "1" + +inherits@2, inherits@2.0.4, inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" + integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== + +inquirer@^6.2.2: + version "6.5.2" + resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-6.5.2.tgz#ad50942375d036d327ff528c08bd5fab089928ca" + integrity sha512-cntlB5ghuB0iuO65Ovoi8ogLHiWGs/5yNrtUcKjFhSSiVeAIVpD7koaSU9RM8mpXw5YDi9RdYXGQMaOURB7ycQ== + dependencies: + ansi-escapes "^3.2.0" + chalk "^2.4.2" + cli-cursor "^2.1.0" + cli-width "^2.0.0" + external-editor "^3.0.3" + figures "^2.0.0" + lodash "^4.17.12" + mute-stream "0.0.7" + run-async "^2.2.0" + rxjs "^6.4.0" + string-width "^2.1.0" + strip-ansi "^5.1.0" + through "^2.3.6" + +io-ts@1.10.4: + version "1.10.4" + resolved "https://registry.yarnpkg.com/io-ts/-/io-ts-1.10.4.tgz#cd5401b138de88e4f920adbcb7026e2d1967e6e2" + integrity sha512-b23PteSnYXSONJ6JQXRAlvJhuw8KOtkqa87W4wDtvMrud/DTJd5X+NpOOI+O/zZwVq6v0VLAaJ+1EDViKEuN9g== + dependencies: + fp-ts "^1.0.0" + +is-arrayish@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" + integrity sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg== + +is-binary-path@~2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09" + integrity sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw== + dependencies: + binary-extensions "^2.0.0" + +is-buffer@^2.0.5: + version "2.0.5" + resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-2.0.5.tgz#ebc252e400d22ff8d77fa09888821a24a658c191" + integrity sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ== + +is-directory@^0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/is-directory/-/is-directory-0.3.1.tgz#61339b6f2475fc772fd9c9d83f5c8575dc154ae1" + integrity sha512-yVChGzahRFvbkscn2MlwGismPO12i9+znNruC5gVEntG3qu0xQMzsGg/JFbrsqDOHtHFPci+V5aP5T9I+yeKqw== + +is-extglob@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" + integrity sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ== + +is-fullwidth-code-point@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" + integrity sha512-VHskAKYM8RfSFXwee5t5cbN5PZeq1Wrh6qd5bkyiXIf6UQcN6w/A0eXM9r6t8d+GYOh+o6ZhiEnb88LN/Y8m2w== + +is-fullwidth-code-point@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" + integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== + +is-glob@^4.0.1, is-glob@~4.0.1: + version "4.0.3" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084" + integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== + dependencies: + is-extglob "^2.1.1" + +is-hex-prefixed@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-hex-prefixed/-/is-hex-prefixed-1.0.0.tgz#7d8d37e6ad77e5d127148913c573e082d777f554" + integrity sha512-WvtOiug1VFrE9v1Cydwm+FnXd3+w9GaeVUss5W4v/SLy3UW00vP+6iNF2SdnfiBoLy4bTqVdkftNGTUeOFVsbA== + +is-number@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" + integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== + +is-plain-obj@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-2.1.0.tgz#45e42e37fccf1f40da8e5f76ee21515840c09287" + integrity sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA== + +is-unicode-supported@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz#3f26c76a809593b52bfa2ecb5710ed2779b522a7" + integrity sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw== + +isexe@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" + integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== + +js-sha3@0.8.0, js-sha3@^0.8.0: + version "0.8.0" + resolved "https://registry.yarnpkg.com/js-sha3/-/js-sha3-0.8.0.tgz#b9b7a5da73afad7dedd0f8c463954cbde6818840" + integrity sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q== + +js-tokens@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" + integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== + +js-yaml@4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602" + integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== + dependencies: + argparse "^2.0.1" + +js-yaml@^3.12.0, js-yaml@^3.13.0, js-yaml@^3.13.1: + version "3.14.1" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.1.tgz#dae812fdb3825fa306609a8717383c50c36a0537" + integrity sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g== + dependencies: + argparse "^1.0.7" + esprima "^4.0.0" + +json-parse-better-errors@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz#bb867cfb3450e69107c131d1c514bab3dc8bcaa9" + integrity sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw== + +json-schema-traverse@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" + integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== + +json-stable-stringify-without-jsonify@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" + integrity sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw== + +jsonc-parser@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-3.2.0.tgz#31ff3f4c2b9793f89c67212627c51c6394f88e76" + integrity sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w== + +jsonfile@^2.1.0: + version "2.4.0" + resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-2.4.0.tgz#3736a2b428b87bbda0cc83b53fa3d633a35c2ae8" + integrity sha512-PKllAqbgLgxHaj8TElYymKCAgrASebJrWpTnEkOaTowt23VKXXN0sUeriJ+eh7y6ufb/CC5ap11pz71/cM0hUw== + optionalDependencies: + graceful-fs "^4.1.6" + +jsonfile@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb" + integrity sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg== + optionalDependencies: + graceful-fs "^4.1.6" + +keccak@^3.0.0, keccak@^3.0.2: + version "3.0.3" + resolved "https://registry.yarnpkg.com/keccak/-/keccak-3.0.3.tgz#4bc35ad917be1ef54ff246f904c2bbbf9ac61276" + integrity sha512-JZrLIAJWuZxKbCilMpNz5Vj7Vtb4scDG3dMXLOsbzBmQGyjwE61BbW7bJkfKKCShXiQZt3T6sBgALRtmd+nZaQ== + dependencies: + node-addon-api "^2.0.0" + node-gyp-build "^4.2.0" + readable-stream "^3.6.0" + +klaw@^1.0.0: + version "1.3.1" + resolved "https://registry.yarnpkg.com/klaw/-/klaw-1.3.1.tgz#4088433b46b3b1ba259d78785d8e96f73ba02439" + integrity sha512-TED5xi9gGQjGpNnvRWknrwAB1eL5GciPfVFOt3Vk1OJCVDQbzuSfrF3hkUQKlsgKrG1F+0t5W0m+Fje1jIt8rw== + optionalDependencies: + graceful-fs "^4.1.9" + +level-supports@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/level-supports/-/level-supports-4.0.1.tgz#431546f9d81f10ff0fea0e74533a0e875c08c66a" + integrity sha512-PbXpve8rKeNcZ9C1mUicC9auIYFyGpkV9/i6g76tLgANwWhtG2v7I4xNBUlkn3lE2/dZF3Pi0ygYGtLc4RXXdA== + +level-transcoder@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/level-transcoder/-/level-transcoder-1.0.1.tgz#f8cef5990c4f1283d4c86d949e73631b0bc8ba9c" + integrity sha512-t7bFwFtsQeD8cl8NIoQ2iwxA0CL/9IFw7/9gAjOonH0PWTTiRfY7Hq+Ejbsxh86tXobDQ6IOiddjNYIfOBs06w== + dependencies: + buffer "^6.0.3" + module-error "^1.0.1" + +level@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/level/-/level-8.0.0.tgz#41b4c515dabe28212a3e881b61c161ffead14394" + integrity sha512-ypf0jjAk2BWI33yzEaaotpq7fkOPALKAgDBxggO6Q9HGX2MRXn0wbP1Jn/tJv1gtL867+YOjOB49WaUF3UoJNQ== + dependencies: + browser-level "^1.0.1" + classic-level "^1.2.0" + +levn@^0.3.0, levn@~0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee" + integrity sha512-0OO4y2iOHix2W6ujICbKIaEQXvFQHue65vUG3pb5EUomzPI90z9hsA1VsO/dbIIpC53J8gxM9Q4Oho0jrCM/yA== + dependencies: + prelude-ls "~1.1.2" + type-check "~0.3.2" + +locate-path@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e" + integrity sha512-NCI2kiDkyR7VeEKm27Kda/iQHyKJe1Bu0FlTbYp3CqJu+9IFe9bLyAjMxf5ZDDbEg+iMPzB5zYyUTSm8wVTKmA== + dependencies: + p-locate "^2.0.0" + path-exists "^3.0.0" + +locate-path@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-6.0.0.tgz#55321eb309febbc59c4801d931a72452a681d286" + integrity sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw== + dependencies: + p-locate "^5.0.0" + +lodash.camelcase@^4.3.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz#b28aa6288a2b9fc651035c7711f65ab6190331a6" + integrity sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA== + +lodash@^4.17.11, lodash@^4.17.12, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.16: + version "4.17.21" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" + integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== + +log-symbols@4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-4.1.0.tgz#3fbdbb95b4683ac9fc785111e792e558d4abd503" + integrity sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg== + dependencies: + chalk "^4.1.0" + is-unicode-supported "^0.1.0" + +lru-cache@^5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-5.1.1.tgz#1da27e6710271947695daf6848e847f01d84b920" + integrity sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w== + dependencies: + yallist "^3.0.2" + +lru-cache@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94" + integrity sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA== + dependencies: + yallist "^4.0.0" + +lru_map@^0.3.3: + version "0.3.3" + resolved "https://registry.yarnpkg.com/lru_map/-/lru_map-0.3.3.tgz#b5c8351b9464cbd750335a79650a0ec0e56118dd" + integrity sha512-Pn9cox5CsMYngeDbmChANltQl+5pi6XmTrraMSzhPmMBbmgcxmqWry0U3PGapCU1yB4/LqCcom7qhHZiF/jGfQ== + +lunr@^2.3.9: + version "2.3.9" + resolved "https://registry.yarnpkg.com/lunr/-/lunr-2.3.9.tgz#18b123142832337dd6e964df1a5a7707b25d35e1" + integrity sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow== + +make-error@^1.1.1: + version "1.3.6" + resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2" + integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw== + +marked@^4.2.5: + version "4.2.12" + resolved "https://registry.yarnpkg.com/marked/-/marked-4.2.12.tgz#d69a64e21d71b06250da995dcd065c11083bebb5" + integrity sha512-yr8hSKa3Fv4D3jdZmtMMPghgVt6TWbk86WQaWhDloQjRSQhMMYCAro7jP7VDJrjjdV8pxVxMssXS8B8Y5DZ5aw== + +mcl-wasm@^0.7.1: + version "0.7.9" + resolved "https://registry.yarnpkg.com/mcl-wasm/-/mcl-wasm-0.7.9.tgz#c1588ce90042a8700c3b60e40efb339fc07ab87f" + integrity sha512-iJIUcQWA88IJB/5L15GnJVnSQJmf/YaxxV6zRavv83HILHaJQb6y0iFyDMdDO0gN8X37tdxmAOrH/P8B6RB8sQ== + +md5.js@^1.3.4: + version "1.3.5" + resolved "https://registry.yarnpkg.com/md5.js/-/md5.js-1.3.5.tgz#b5d07b8e3216e3e27cd728d72f70d1e6a342005f" + integrity sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg== + dependencies: + hash-base "^3.0.0" + inherits "^2.0.1" + safe-buffer "^5.1.2" + +memory-level@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/memory-level/-/memory-level-1.0.0.tgz#7323c3fd368f9af2f71c3cd76ba403a17ac41692" + integrity sha512-UXzwewuWeHBz5krr7EvehKcmLFNoXxGcvuYhC41tRnkrTbJohtS7kVn9akmgirtRygg+f7Yjsfi8Uu5SGSQ4Og== + dependencies: + abstract-level "^1.0.0" + functional-red-black-tree "^1.0.1" + module-error "^1.0.1" + +memorystream@^0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/memorystream/-/memorystream-0.3.1.tgz#86d7090b30ce455d63fbae12dda51a47ddcaf9b2" + integrity sha512-S3UwM3yj5mtUSEfP41UZmt/0SCoVYUcU1rkXv+BQ5Ig8ndL4sPoJNBUJERafdPb5jjHJGuMgytgKvKIf58XNBw== + +mimic-fn@^1.0.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.2.0.tgz#820c86a39334640e99516928bd03fca88057d022" + integrity sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ== + +minimalistic-assert@^1.0.0, minimalistic-assert@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz#2e194de044626d4a10e7f7fbc00ce73e83e4d5c7" + integrity sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A== + +minimalistic-crypto-utils@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" + integrity sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg== + +minimatch@5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-5.0.1.tgz#fb9022f7528125187c92bd9e9b6366be1cf3415b" + integrity sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g== + dependencies: + brace-expansion "^2.0.1" + +minimatch@^3.0.4, minimatch@^3.1.1: + version "3.1.2" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" + integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== + dependencies: + brace-expansion "^1.1.7" + +minimatch@^5.1.2: + version "5.1.6" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-5.1.6.tgz#1cfcb8cf5522ea69952cd2af95ae09477f122a96" + integrity sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g== + dependencies: + brace-expansion "^2.0.1" + +minimist@^1.2.5, minimist@^1.2.6: + version "1.2.7" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.7.tgz#daa1c4d91f507390437c6a8bc01078e7000c4d18" + integrity sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g== + +mkdirp@^0.5.1: + version "0.5.6" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.6.tgz#7def03d2432dcae4ba1d611445c48396062255f6" + integrity sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw== + dependencies: + minimist "^1.2.6" + +mkdirp@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" + integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== + +mnemonist@^0.38.0: + version "0.38.5" + resolved "https://registry.yarnpkg.com/mnemonist/-/mnemonist-0.38.5.tgz#4adc7f4200491237fe0fa689ac0b86539685cade" + integrity sha512-bZTFT5rrPKtPJxj8KSV0WkPyNxl72vQepqqVUAW2ARUpUSF2qXMB6jZj7hW5/k7C1rtpzqbD/IIbJwLXUjCHeg== + dependencies: + obliterator "^2.0.0" + +mocha@^10.0.0: + version "10.2.0" + resolved "https://registry.yarnpkg.com/mocha/-/mocha-10.2.0.tgz#1fd4a7c32ba5ac372e03a17eef435bd00e5c68b8" + integrity sha512-IDY7fl/BecMwFHzoqF2sg/SHHANeBoMMXFlS9r0OXKDssYE1M5O43wUY/9BVPeIvfH2zmEbBfseqN9gBQZzXkg== + dependencies: + ansi-colors "4.1.1" + browser-stdout "1.3.1" + chokidar "3.5.3" + debug "4.3.4" + diff "5.0.0" + escape-string-regexp "4.0.0" + find-up "5.0.0" + glob "7.2.0" + he "1.2.0" + js-yaml "4.1.0" + log-symbols "4.1.0" + minimatch "5.0.1" + ms "2.1.3" + nanoid "3.3.3" + serialize-javascript "6.0.0" + strip-json-comments "3.1.1" + supports-color "8.1.1" + workerpool "6.2.1" + yargs "16.2.0" + yargs-parser "20.2.4" + yargs-unparser "2.0.0" + +module-error@^1.0.1, module-error@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/module-error/-/module-error-1.0.2.tgz#8d1a48897ca883f47a45816d4fb3e3c6ba404d86" + integrity sha512-0yuvsqSCv8LbaOKhnsQ/T5JhyFlCYLPXK3U2sgV10zoKQwzs/MyfuQUOZQ1V/6OCOJsK/TRgNVrPuPDqtdMFtA== + +ms@2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" + integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== + +ms@2.1.3: + version "2.1.3" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" + integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== + +mute-stream@0.0.7: + version "0.0.7" + resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab" + integrity sha512-r65nCZhrbXXb6dXOACihYApHw2Q6pV0M3V0PSxd74N0+D8nzAdEAITq2oAjA1jVnKI+tGvEBUpqiMh0+rW6zDQ== + +nanoid@3.3.3: + version "3.3.3" + resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.3.tgz#fd8e8b7aa761fe807dba2d1b98fb7241bb724a25" + integrity sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w== + +napi-macros@~2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/napi-macros/-/napi-macros-2.0.0.tgz#2b6bae421e7b96eb687aa6c77a7858640670001b" + integrity sha512-A0xLykHtARfueITVDernsAWdtIMbOJgKgcluwENp3AlsKN/PloyO10HtmoqnFAQAcxPkgZN7wdfPfEd0zNGxbg== + +natural-compare@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" + integrity sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw== + +neo-async@^2.6.0: + version "2.6.2" + resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.2.tgz#b4aafb93e3aeb2d8174ca53cf163ab7d7308305f" + integrity sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw== + +nice-try@^1.0.4: + version "1.0.5" + resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366" + integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ== + +node-addon-api@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-2.0.2.tgz#432cfa82962ce494b132e9d72a15b29f71ff5d32" + integrity sha512-Ntyt4AIXyaLIuMHF6IOoTakB3K+RWxwtsHNRxllEoA6vPwP9o4866g6YWDLUdnucilZhmkxiHwHr11gAENw+QA== + +node-gyp-build@^4.2.0, node-gyp-build@^4.3.0: + version "4.6.0" + resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-4.6.0.tgz#0c52e4cbf54bbd28b709820ef7b6a3c2d6209055" + integrity sha512-NTZVKn9IylLwUzaKjkas1e4u2DLNcV4rdYagA4PWdPwW87Bi7z+BznyKSRwS/761tV/lzCGXplWsiaMjLqP2zQ== + +normalize-path@^3.0.0, normalize-path@~3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" + integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== + +object-inspect@^1.9.0: + version "1.12.3" + resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.12.3.tgz#ba62dffd67ee256c8c086dfae69e016cd1f198b9" + integrity sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g== + +obliterator@^2.0.0: + version "2.0.4" + resolved "https://registry.yarnpkg.com/obliterator/-/obliterator-2.0.4.tgz#fa650e019b2d075d745e44f1effeb13a2adbe816" + integrity sha512-lgHwxlxV1qIg1Eap7LgIeoBWIMFibOjbrYPIPJZcI1mmGAI2m3lNYpK12Y+GBdPQ0U1hRwSord7GIaawz962qQ== + +once@^1.3.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" + integrity sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w== + dependencies: + wrappy "1" + +onetime@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/onetime/-/onetime-2.0.1.tgz#067428230fd67443b2794b22bba528b6867962d4" + integrity sha512-oyyPpiMaKARvvcgip+JV+7zci5L8D1W9RZIz2l1o08AM3pfspitVWnPt3mzHcBPp12oYMTy0pqrFs/C+m3EwsQ== + dependencies: + mimic-fn "^1.0.0" + +optionator@^0.8.2: + version "0.8.3" + resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.3.tgz#84fa1d036fe9d3c7e21d99884b601167ec8fb495" + integrity sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA== + dependencies: + deep-is "~0.1.3" + fast-levenshtein "~2.0.6" + levn "~0.3.0" + prelude-ls "~1.1.2" + type-check "~0.3.2" + word-wrap "~1.2.3" + +os-tmpdir@~1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" + integrity sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g== + +p-limit@^1.1.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.3.0.tgz#b86bd5f0c25690911c7590fcbfc2010d54b3ccb8" + integrity sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q== + dependencies: + p-try "^1.0.0" + +p-limit@^3.0.2: + version "3.1.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b" + integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== + dependencies: + yocto-queue "^0.1.0" + +p-locate@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43" + integrity sha512-nQja7m7gSKuewoVRen45CtVfODR3crN3goVQ0DDZ9N3yHxgpkuBhZqsaiotSQRrADUrne346peY7kT3TSACykg== + dependencies: + p-limit "^1.1.0" + +p-locate@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-5.0.0.tgz#83c8315c6785005e3bd021839411c9e110e6d834" + integrity sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw== + dependencies: + p-limit "^3.0.2" + +p-map@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/p-map/-/p-map-4.0.0.tgz#bb2f95a5eda2ec168ec9274e06a747c3e2904d2b" + integrity sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ== + dependencies: + aggregate-error "^3.0.0" + +p-try@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/p-try/-/p-try-1.0.0.tgz#cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3" + integrity sha512-U1etNYuMJoIz3ZXSrrySFjsXQTWOx2/jdi86L+2pRvph/qMKL6sbcCYdH23fqsbm8TH2Gn0OybpT4eSFlCVHww== + +parent-module@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/parent-module/-/parent-module-1.0.1.tgz#691d2709e78c79fae3a156622452d00762caaaa2" + integrity sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g== + dependencies: + callsites "^3.0.0" + +parse-json@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-4.0.0.tgz#be35f5425be1f7f6c747184f98a788cb99477ee0" + integrity sha512-aOIos8bujGN93/8Ox/jPLh7RwVnPEysynVFE+fQZyg6jKELEHwzgKdLRFHUgXJL6kylijVSBC4BvN9OmsB48Rw== + dependencies: + error-ex "^1.3.1" + json-parse-better-errors "^1.0.1" + +path-exists@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" + integrity sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ== + +path-exists@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" + integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== + +path-is-absolute@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" + integrity sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg== + +path-is-inside@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/path-is-inside/-/path-is-inside-1.0.2.tgz#365417dede44430d1c11af61027facf074bdfc53" + integrity sha512-DUWJr3+ULp4zXmol/SZkFf3JGsS9/SIv+Y3Rt93/UjPpDpklB5f1er4O3POIbUuUJ3FXgqte2Q7SrU6zAqwk8w== + +path-key@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" + integrity sha512-fEHGKCSmUSDPv4uoj8AlD+joPlq3peND+HRYyxFz4KPw4z926S/b8rIuFs2FYJg3BwsxJf6A9/3eIdLaYC+9Dw== + +path-parse@^1.0.6: + version "1.0.7" + resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" + integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== + +pbkdf2@^3.0.17: + version "3.1.2" + resolved "https://registry.yarnpkg.com/pbkdf2/-/pbkdf2-3.1.2.tgz#dd822aa0887580e52f1a039dc3eda108efae3075" + integrity sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA== + dependencies: + create-hash "^1.1.2" + create-hmac "^1.1.4" + ripemd160 "^2.0.1" + safe-buffer "^5.0.1" + sha.js "^2.4.8" + +picomatch@^2.0.4, picomatch@^2.2.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" + integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== + +prelude-ls@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" + integrity sha512-ESF23V4SKG6lVSGZgYNpbsiaAkdab6ZgOxe52p7+Kid3W3u3bxR4Vfd/o21dmN7jSt0IwgZ4v5MUd26FEtXE9w== + +prettier-plugin-solidity@^1.0.0-beta.19: + version "1.1.1" + resolved "https://registry.yarnpkg.com/prettier-plugin-solidity/-/prettier-plugin-solidity-1.1.1.tgz#4d3375b85f97812ffcbe48d5a8b3fe914d69c91f" + integrity sha512-uD24KO26tAHF+zMN2nt1OUzfknzza5AgxjogQQrMLZc7j8xiQrDoNWNeOlfFC0YLTwo12CLD10b9niLyP6AqXg== + dependencies: + "@solidity-parser/parser" "^0.14.5" + semver "^7.3.8" + solidity-comments-extractor "^0.0.7" + +prettier@^1.14.3: + version "1.19.1" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.19.1.tgz#f7d7f5ff8a9cd872a7be4ca142095956a60797cb" + integrity sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew== + +prettier@^2.3.1, prettier@^2.6.2: + version "2.8.3" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.3.tgz#ab697b1d3dd46fb4626fbe2f543afe0cc98d8632" + integrity sha512-tJ/oJ4amDihPoufT5sM0Z1SKEuKay8LfVAMlbbhnnkvt6BUserZylqo2PN+p9KeljLr0OHa2rXHU1T8reeoTrw== + +progress@^2.0.0: + version "2.0.3" + resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8" + integrity sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA== + +punycode@^2.1.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.3.0.tgz#f67fa67c94da8f4d0cfff981aee4118064199b8f" + integrity sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA== + +qs@^6.7.0: + version "6.11.0" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.11.0.tgz#fd0d963446f7a65e1367e01abd85429453f0c37a" + integrity sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q== + dependencies: + side-channel "^1.0.4" + +queue-microtask@^1.2.2, queue-microtask@^1.2.3: + version "1.2.3" + resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243" + integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A== + +randombytes@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a" + integrity sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ== + dependencies: + safe-buffer "^5.1.0" + +raw-body@^2.4.1: + version "2.5.1" + resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.5.1.tgz#fe1b1628b181b700215e5fd42389f98b71392857" + integrity sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig== + dependencies: + bytes "3.1.2" + http-errors "2.0.0" + iconv-lite "0.4.24" + unpipe "1.0.0" + +readable-stream@^3.6.0: + version "3.6.0" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.0.tgz#337bbda3adc0706bd3e024426a286d4b4b2c9198" + integrity sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA== + dependencies: + inherits "^2.0.3" + string_decoder "^1.1.1" + util-deprecate "^1.0.1" + +readdirp@~3.6.0: + version "3.6.0" + resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.6.0.tgz#74a370bd857116e245b29cc97340cd431a02a6c7" + integrity sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA== + dependencies: + picomatch "^2.2.1" + +reduce-flatten@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/reduce-flatten/-/reduce-flatten-2.0.0.tgz#734fd84e65f375d7ca4465c69798c25c9d10ae27" + integrity sha512-EJ4UNY/U1t2P/2k6oqotuX2Cc3T6nxJwsM0N0asT7dhrtH1ltUxDn4NalSYmPE2rCkVpcf/X6R0wDwcFpzhd4w== + +regexpp@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-2.0.1.tgz#8d19d31cf632482b589049f8281f93dbcba4d07f" + integrity sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw== + +require-directory@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" + integrity sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q== + +require-from-string@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-2.0.2.tgz#89a7fdd938261267318eafe14f9c32e598c36909" + integrity sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw== + +resolve-from@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-3.0.0.tgz#b22c7af7d9d6881bc8b6e653335eebcb0a188748" + integrity sha512-GnlH6vxLymXJNMBo7XP1fJIzBFbdYt49CuTwmB/6N53t+kMPRMFKz783LlQ4tv28XoQfMWinAJX6WCGf2IlaIw== + +resolve-from@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6" + integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g== + +resolve@1.17.0: + version "1.17.0" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.17.0.tgz#b25941b54968231cc2d1bb76a79cb7f2c0bf8444" + integrity sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w== + dependencies: + path-parse "^1.0.6" + +restore-cursor@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-2.0.0.tgz#9f7ee287f82fd326d4fd162923d62129eee0dfaf" + integrity sha512-6IzJLuGi4+R14vwagDHX+JrXmPVtPpn4mffDJ1UdR7/Edm87fl6yi8mMBIVvFtJaNTUvjughmW4hwLhRG7gC1Q== + dependencies: + onetime "^2.0.0" + signal-exit "^3.0.2" + +rimraf@2.6.3: + version "2.6.3" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.3.tgz#b2d104fe0d8fb27cf9e0a1cda8262dd3833c6cab" + integrity sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA== + dependencies: + glob "^7.1.3" + +rimraf@^2.2.8: + version "2.7.1" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec" + integrity sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w== + dependencies: + glob "^7.1.3" + +rimraf@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" + integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== + dependencies: + glob "^7.1.3" + +ripemd160@^2.0.0, ripemd160@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/ripemd160/-/ripemd160-2.0.2.tgz#a1c1a6f624751577ba5d07914cbc92850585890c" + integrity sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA== + dependencies: + hash-base "^3.0.0" + inherits "^2.0.1" + +rlp@^2.2.3: + version "2.2.7" + resolved "https://registry.yarnpkg.com/rlp/-/rlp-2.2.7.tgz#33f31c4afac81124ac4b283e2bd4d9720b30beaf" + integrity sha512-d5gdPmgQ0Z+AklL2NVXr/IoSjNZFfTVvQWzL/AM2AOcSzYP2xjlb0AC8YyCLc41MSNf6P6QVtjgPdmVtzb+4lQ== + dependencies: + bn.js "^5.2.0" + +run-async@^2.2.0: + version "2.4.1" + resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.4.1.tgz#8440eccf99ea3e70bd409d49aab88e10c189a455" + integrity sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ== + +run-parallel-limit@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/run-parallel-limit/-/run-parallel-limit-1.1.0.tgz#be80e936f5768623a38a963262d6bef8ff11e7ba" + integrity sha512-jJA7irRNM91jaKc3Hcl1npHsFLOXOoTkPCUL1JEa1R82O2miplXXRaGdjW/KM/98YQWDhJLiSs793CnXfblJUw== + dependencies: + queue-microtask "^1.2.2" + +rustbn.js@~0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/rustbn.js/-/rustbn.js-0.2.0.tgz#8082cb886e707155fd1cb6f23bd591ab8d55d0ca" + integrity sha512-4VlvkRUuCJvr2J6Y0ImW7NvTCriMi7ErOAqWk1y69vAdoNIzCF3yPmgeNzx+RQTLEDFq5sHfscn1MwHxP9hNfA== + +rxjs@^6.4.0: + version "6.6.7" + resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.6.7.tgz#90ac018acabf491bf65044235d5863c4dab804c9" + integrity sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ== + dependencies: + tslib "^1.9.0" + +safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@^5.2.0, safe-buffer@~5.2.0: + version "5.2.1" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" + integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== + +"safer-buffer@>= 2.1.2 < 3": + version "2.1.2" + resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" + integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== + +scrypt-js@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/scrypt-js/-/scrypt-js-3.0.1.tgz#d314a57c2aef69d1ad98a138a21fe9eafa9ee312" + integrity sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA== + +secp256k1@^4.0.1: + version "4.0.3" + resolved "https://registry.yarnpkg.com/secp256k1/-/secp256k1-4.0.3.tgz#c4559ecd1b8d3c1827ed2d1b94190d69ce267303" + integrity sha512-NLZVf+ROMxwtEj3Xa562qgv2BK5e2WNmXPiOdVIPLgs6lyTzMvBq0aWTYMI5XCP9jZMVKOcqZLw/Wc4vDkuxhA== + dependencies: + elliptic "^6.5.4" + node-addon-api "^2.0.0" + node-gyp-build "^4.2.0" + +semver@^5.5.0, semver@^5.5.1: + version "5.7.1" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" + integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== + +semver@^6.3.0: + version "6.3.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" + integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== + +semver@^7.3.8: + version "7.3.8" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.8.tgz#07a78feafb3f7b32347d725e33de7e2a2df67798" + integrity sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A== + dependencies: + lru-cache "^6.0.0" + +serialize-javascript@6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-6.0.0.tgz#efae5d88f45d7924141da8b5c3a7a7e663fefeb8" + integrity sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag== + dependencies: + randombytes "^2.1.0" + +setimmediate@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285" + integrity sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA== + +setprototypeof@1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.2.0.tgz#66c9a24a73f9fc28cbe66b09fed3d33dcaf1b424" + integrity sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw== + +sha.js@^2.4.0, sha.js@^2.4.8: + version "2.4.11" + resolved "https://registry.yarnpkg.com/sha.js/-/sha.js-2.4.11.tgz#37a5cf0b81ecbc6943de109ba2960d1b26584ae7" + integrity sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ== + dependencies: + inherits "^2.0.1" + safe-buffer "^5.0.1" + +shebang-command@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" + integrity sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg== + dependencies: + shebang-regex "^1.0.0" + +shebang-regex@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" + integrity sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ== + +shiki@^0.12.1: + version "0.12.1" + resolved "https://registry.yarnpkg.com/shiki/-/shiki-0.12.1.tgz#26fce51da12d055f479a091a5307470786f300cd" + integrity sha512-aieaV1m349rZINEBkjxh2QbBvFFQOlgqYTNtCal82hHj4dDZ76oMlQIX+C7ryerBTDiga3e5NfH6smjdJ02BbQ== + dependencies: + jsonc-parser "^3.2.0" + vscode-oniguruma "^1.7.0" + vscode-textmate "^8.0.0" + +side-channel@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.4.tgz#efce5c8fdc104ee751b25c58d4290011fa5ea2cf" + integrity sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw== + dependencies: + call-bind "^1.0.0" + get-intrinsic "^1.0.2" + object-inspect "^1.9.0" + +signal-exit@^3.0.2: + version "3.0.7" + resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9" + integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== + +slice-ansi@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-2.1.0.tgz#cacd7693461a637a5788d92a7dd4fba068e81636" + integrity sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ== + dependencies: + ansi-styles "^3.2.0" + astral-regex "^1.0.0" + is-fullwidth-code-point "^2.0.0" + +solc@0.7.3: + version "0.7.3" + resolved "https://registry.yarnpkg.com/solc/-/solc-0.7.3.tgz#04646961bd867a744f63d2b4e3c0701ffdc7d78a" + integrity sha512-GAsWNAjGzIDg7VxzP6mPjdurby3IkGCjQcM8GFYZT6RyaoUZKmMU6Y7YwG+tFGhv7dwZ8rmR4iwFDrrD99JwqA== + dependencies: + command-exists "^1.2.8" + commander "3.0.2" + follow-redirects "^1.12.1" + fs-extra "^0.30.0" + js-sha3 "0.8.0" + memorystream "^0.3.1" + require-from-string "^2.0.0" + semver "^5.5.0" + tmp "0.0.33" + +solhint@^3.3.7: + version "3.3.8" + resolved "https://registry.yarnpkg.com/solhint/-/solhint-3.3.8.tgz#b1773c881cfaf0b5008c78ad658a69603d3fa051" + integrity sha512-TkYyJ6uUJCaiqRKuhHhFuoAoyco9Ia+RDKhl3usjG/rkaNk8/LdLRla2Xln7MVdBTaPKNAU8ezTRSit50Yy4qw== + dependencies: + "@solidity-parser/parser" "^0.14.5" + ajv "^6.6.1" + antlr4 "4.7.1" + ast-parents "0.0.1" + chalk "^2.4.2" + commander "2.18.0" + cosmiconfig "^5.0.7" + eslint "^5.6.0" + fast-diff "^1.1.2" + glob "^7.1.3" + ignore "^4.0.6" + js-yaml "^3.12.0" + lodash "^4.17.11" + semver "^6.3.0" + optionalDependencies: + prettier "^1.14.3" + +solidity-ast@^0.4.38: + version "0.4.44" + resolved "https://registry.yarnpkg.com/solidity-ast/-/solidity-ast-0.4.44.tgz#dd6732bd65bb1d01777fc537de99cbb3d4e0089d" + integrity sha512-Ct3ppqWS0uTWNYxM2cgruUeWYzqYmeikANsCHgGBnMjAMsqONgqnYrlpifQxNFwXOPHD3vZQLmCjaYnQ+i3eQA== + +solidity-comments-extractor@^0.0.7: + version "0.0.7" + resolved "https://registry.yarnpkg.com/solidity-comments-extractor/-/solidity-comments-extractor-0.0.7.tgz#99d8f1361438f84019795d928b931f4e5c39ca19" + integrity sha512-wciNMLg/Irp8OKGrh3S2tfvZiZ0NEyILfcRCXCD4mp7SgK/i9gzLfhY2hY7VMCQJ3kH9UB9BzNdibIVMchzyYw== + +solidity-docgen@^0.6.0-beta.22: + version "0.6.0-beta.34" + resolved "https://registry.yarnpkg.com/solidity-docgen/-/solidity-docgen-0.6.0-beta.34.tgz#f1766b13ea864ea71b8e727796d30a69ea90014a" + integrity sha512-igdGrkg8gT1jn+B2NwzjEtSf+7NTrSi/jz88zO7MZWgETmcWbXaxgAsQP4BQeC4YFeH0Pie1NsLP7+9qDgvFtA== + dependencies: + handlebars "^4.7.7" + solidity-ast "^0.4.38" + +source-map-support@^0.5.13: + version "0.5.21" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.21.tgz#04fe7c7f9e1ed2d662233c28cb2b35b9f63f6e4f" + integrity sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w== + dependencies: + buffer-from "^1.0.0" + source-map "^0.6.0" + +source-map@^0.6.0, source-map@^0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" + integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== + +sprintf-js@~1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" + integrity sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g== + +stacktrace-parser@^0.1.10: + version "0.1.10" + resolved "https://registry.yarnpkg.com/stacktrace-parser/-/stacktrace-parser-0.1.10.tgz#29fb0cae4e0d0b85155879402857a1639eb6051a" + integrity sha512-KJP1OCML99+8fhOHxwwzyWrlUuVX5GQ0ZpJTd1DFXhdkrvg1szxfHhawXUZ3g9TkXORQd4/WG68jMlQZ2p8wlg== + dependencies: + type-fest "^0.7.1" + +statuses@2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/statuses/-/statuses-2.0.1.tgz#55cb000ccf1d48728bd23c685a063998cf1a1b63" + integrity sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ== + +streamsearch@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/streamsearch/-/streamsearch-1.1.0.tgz#404dd1e2247ca94af554e841a8ef0eaa238da764" + integrity sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg== + +string-format@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/string-format/-/string-format-2.0.0.tgz#f2df2e7097440d3b65de31b6d40d54c96eaffb9b" + integrity sha512-bbEs3scLeYNXLecRRuk6uJxdXUSj6le/8rNPHChIJTn2V79aXVTR1EH2OH5zLKKoz0V02fOUKZZcw01pLUShZA== + +string-width@^2.1.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" + integrity sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw== + dependencies: + is-fullwidth-code-point "^2.0.0" + strip-ansi "^4.0.0" + +string-width@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-3.1.0.tgz#22767be21b62af1081574306f69ac51b62203961" + integrity sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w== + dependencies: + emoji-regex "^7.0.1" + is-fullwidth-code-point "^2.0.0" + strip-ansi "^5.1.0" + +string-width@^4.1.0, string-width@^4.2.0: + version "4.2.3" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" + integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== + dependencies: + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.1" + +string_decoder@^1.1.1: + version "1.3.0" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e" + integrity sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA== + dependencies: + safe-buffer "~5.2.0" + +strip-ansi@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f" + integrity sha512-4XaJ2zQdCzROZDivEVIDPkcQn8LMFSa8kj8Gxb/Lnwzv9A8VctNZ+lfivC/sV3ivW8ElJTERXZoPBRrZKkNKow== + dependencies: + ansi-regex "^3.0.0" + +strip-ansi@^5.1.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-5.2.0.tgz#8c9a536feb6afc962bdfa5b104a5091c1ad9c0ae" + integrity sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA== + dependencies: + ansi-regex "^4.1.0" + +strip-ansi@^6.0.0, strip-ansi@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" + integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== + dependencies: + ansi-regex "^5.0.1" + +strip-hex-prefix@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/strip-hex-prefix/-/strip-hex-prefix-1.0.0.tgz#0c5f155fef1151373377de9dbb588da05500e36f" + integrity sha512-q8d4ue7JGEiVcypji1bALTos+0pWtyGlivAWyPuTkHzuTCJqrK9sWxYQZUq6Nq3cuyv3bm734IhHvHtGGURU6A== + dependencies: + is-hex-prefixed "1.0.0" + +strip-json-comments@3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" + integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== + +strip-json-comments@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" + integrity sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ== + +supports-color@8.1.1: + version "8.1.1" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-8.1.1.tgz#cd6fc17e28500cff56c1b86c0a7fd4a54a73005c" + integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q== + dependencies: + has-flag "^4.0.0" + +supports-color@^5.3.0: + version "5.5.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" + integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== + dependencies: + has-flag "^3.0.0" + +supports-color@^7.1.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" + integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== + dependencies: + has-flag "^4.0.0" + +table-layout@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/table-layout/-/table-layout-1.0.2.tgz#c4038a1853b0136d63365a734b6931cf4fad4a04" + integrity sha512-qd/R7n5rQTRFi+Zf2sk5XVVd9UQl6ZkduPFC3S7WEGJAmetDTjY3qPN50eSKzwuzEyQKy5TN2TiZdkIjos2L6A== + dependencies: + array-back "^4.0.1" + deep-extend "~0.6.0" + typical "^5.2.0" + wordwrapjs "^4.0.0" + +table@^5.2.3: + version "5.4.6" + resolved "https://registry.yarnpkg.com/table/-/table-5.4.6.tgz#1292d19500ce3f86053b05f0e8e7e4a3bb21079e" + integrity sha512-wmEc8m4fjnob4gt5riFRtTu/6+4rSe12TpAELNSqHMfF3IqnA+CH37USM6/YR3qRZv7e56kAEAtd6nKZaxe0Ug== + dependencies: + ajv "^6.10.2" + lodash "^4.17.14" + slice-ansi "^2.1.0" + string-width "^3.0.0" + +text-table@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" + integrity sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw== + +through@^2.3.6: + version "2.3.8" + resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" + integrity sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg== + +tmp@0.0.33, tmp@^0.0.33: + version "0.0.33" + resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9" + integrity sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw== + dependencies: + os-tmpdir "~1.0.2" + +to-regex-range@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" + integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== + dependencies: + is-number "^7.0.0" + +toidentifier@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.1.tgz#3be34321a88a820ed1bd80dfaa33e479fbb8dd35" + integrity sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA== + +ts-command-line-args@^2.2.0: + version "2.4.2" + resolved "https://registry.yarnpkg.com/ts-command-line-args/-/ts-command-line-args-2.4.2.tgz#b4815b23c35f8a0159d4e69e01012d95690bc448" + integrity sha512-mJLQQBOdyD4XI/ZWQY44PIdYde47JhV2xl380O7twPkTQ+Y5vFDHsk8LOeXKuz7dVY5aDCfAzRarNfSqtKOkQQ== + dependencies: + "@morgan-stanley/ts-mocking-bird" "^0.6.2" + chalk "^4.1.0" + command-line-args "^5.1.1" + command-line-usage "^6.1.0" + string-format "^2.0.0" + +ts-essentials@^7.0.1: + version "7.0.3" + resolved "https://registry.yarnpkg.com/ts-essentials/-/ts-essentials-7.0.3.tgz#686fd155a02133eedcc5362dc8b5056cde3e5a38" + integrity sha512-8+gr5+lqO3G84KdiTSMRLtuyJ+nTBVRKuCrK4lidMPdVeEp0uqC875uE5NMcaA7YYMN7XsNiFQuMvasF8HT/xQ== + +ts-node@10.7: + version "10.7.0" + resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-10.7.0.tgz#35d503d0fab3e2baa672a0e94f4b40653c2463f5" + integrity sha512-TbIGS4xgJoX2i3do417KSaep1uRAW/Lu+WAL2doDHC0D6ummjirVOXU5/7aiZotbQ5p1Zp9tP7U6cYhA0O7M8A== + dependencies: + "@cspotcode/source-map-support" "0.7.0" + "@tsconfig/node10" "^1.0.7" + "@tsconfig/node12" "^1.0.7" + "@tsconfig/node14" "^1.0.0" + "@tsconfig/node16" "^1.0.2" + acorn "^8.4.1" + acorn-walk "^8.1.1" + arg "^4.1.0" + create-require "^1.1.0" + diff "^4.0.1" + make-error "^1.1.1" + v8-compile-cache-lib "^3.0.0" + yn "3.1.1" + +tslib@^1.9.0, tslib@^1.9.3: + version "1.14.1" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" + integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== + +tsort@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/tsort/-/tsort-0.0.1.tgz#e2280f5e817f8bf4275657fd0f9aebd44f5a2786" + integrity sha512-Tyrf5mxF8Ofs1tNoxA13lFeZ2Zrbd6cKbuH3V+MQ5sb6DtBj5FjrXVsRWT8YvNAQTqNoz66dz1WsbigI22aEnw== + +tweetnacl-util@^0.15.1: + version "0.15.1" + resolved "https://registry.yarnpkg.com/tweetnacl-util/-/tweetnacl-util-0.15.1.tgz#b80fcdb5c97bcc508be18c44a4be50f022eea00b" + integrity sha512-RKJBIj8lySrShN4w6i/BonWp2Z/uxwC3h4y7xsRrpP59ZboCd0GpEVsOnMDYLMmKBpYhb5TgHzZXy7wTfYFBRw== + +tweetnacl@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-1.0.3.tgz#ac0af71680458d8a6378d0d0d050ab1407d35596" + integrity sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw== + +type-check@~0.3.2: + version "0.3.2" + resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72" + integrity sha512-ZCmOJdvOWDBYJlzAoFkC+Q0+bUyEOS1ltgp1MGU03fqHG+dbi9tBFU2Rd9QKiDZFAYrhPh2JUf7rZRIuHRKtOg== + dependencies: + prelude-ls "~1.1.2" + +type-fest@^0.21.3: + version "0.21.3" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.21.3.tgz#d260a24b0198436e133fa26a524a6d65fa3b2e37" + integrity sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w== + +type-fest@^0.7.1: + version "0.7.1" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.7.1.tgz#8dda65feaf03ed78f0a3f9678f1869147f7c5c48" + integrity sha512-Ne2YiiGN8bmrmJJEuTWTLJR32nh/JdL1+PSicowtNb0WFpn59GK8/lfD61bVtzguz7b3PBt74nxpv/Pw5po5Rg== + +typechain@^8.1.1: + version "8.1.1" + resolved "https://registry.yarnpkg.com/typechain/-/typechain-8.1.1.tgz#9c2e8012c2c4c586536fc18402dcd7034c4ff0bd" + integrity sha512-uF/sUvnXTOVF2FHKhQYnxHk4su4JjZR8vr4mA2mBaRwHTbwh0jIlqARz9XJr1tA0l7afJGvEa1dTSi4zt039LQ== + dependencies: + "@types/prettier" "^2.1.1" + debug "^4.3.1" + fs-extra "^7.0.0" + glob "7.1.7" + js-sha3 "^0.8.0" + lodash "^4.17.15" + mkdirp "^1.0.4" + prettier "^2.3.1" + ts-command-line-args "^2.2.0" + ts-essentials "^7.0.1" + +typedoc@^0.23.10: + version "0.23.24" + resolved "https://registry.yarnpkg.com/typedoc/-/typedoc-0.23.24.tgz#01cf32c09f2c19362e72a9ce1552d6e5b48c4fef" + integrity sha512-bfmy8lNQh+WrPYcJbtjQ6JEEsVl/ce1ZIXyXhyW+a1vFrjO39t6J8sL/d6FfAGrJTc7McCXgk9AanYBSNvLdIA== + dependencies: + lunr "^2.3.9" + marked "^4.2.5" + minimatch "^5.1.2" + shiki "^0.12.1" + +typical@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/typical/-/typical-4.0.0.tgz#cbeaff3b9d7ae1e2bbfaf5a4e6f11eccfde94fc4" + integrity sha512-VAH4IvQ7BDFYglMd7BPRDfLgxZZX4O4TFcRDA6EN5X7erNJJq+McIEp8np9aVtxrCJ6qx4GTYVfOWNjcqwZgRw== + +typical@^5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/typical/-/typical-5.2.0.tgz#4daaac4f2b5315460804f0acf6cb69c52bb93066" + integrity sha512-dvdQgNDNJo+8B2uBQoqdb11eUCE1JQXhvjC/CZtgvZseVd5TYMXnq0+vuUemXbd/Se29cTaUuPX3YIc2xgbvIg== + +uglify-js@^3.1.4: + version "3.17.4" + resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.17.4.tgz#61678cf5fa3f5b7eb789bb345df29afb8257c22c" + integrity sha512-T9q82TJI9e/C1TAxYvfb16xO120tMVFZrGA3f9/P4424DNu6ypK103y0GPFVa17yotwSyZW5iYXgjYHkGrJW/g== + +undici@^5.14.0: + version "5.16.0" + resolved "https://registry.yarnpkg.com/undici/-/undici-5.16.0.tgz#6b64f9b890de85489ac6332bd45ca67e4f7d9943" + integrity sha512-KWBOXNv6VX+oJQhchXieUznEmnJMqgXMbs0xxH2t8q/FUAWSJvOSr/rMaZKnX5RIVq7JDn0JbP4BOnKG2SGXLQ== + dependencies: + busboy "^1.6.0" + +universalify@^0.1.0: + version "0.1.2" + resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66" + integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg== + +unpipe@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" + integrity sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ== + +uri-js@^4.2.2: + version "4.4.1" + resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e" + integrity sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg== + dependencies: + punycode "^2.1.0" + +util-deprecate@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" + integrity sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw== + +uuid@^7.0.3: + version "7.0.3" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-7.0.3.tgz#c5c9f2c8cf25dc0a372c4df1441c41f5bd0c680b" + integrity sha512-DPSke0pXhTZgoF/d+WSt2QaKMCFSfx7QegxEWT+JOuHF5aWrKEn0G+ztjuJg/gG8/ItK+rbPCD/yNv8yyih6Cg== + +uuid@^8.3.2: + version "8.3.2" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2" + integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== + +v8-compile-cache-lib@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz#6336e8d71965cb3d35a1bbb7868445a7c05264bf" + integrity sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg== + +vscode-oniguruma@^1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/vscode-oniguruma/-/vscode-oniguruma-1.7.0.tgz#439bfad8fe71abd7798338d1cd3dc53a8beea94b" + integrity sha512-L9WMGRfrjOhgHSdOYgCt/yRMsXzLDJSL7BPrOZt73gU0iWO4mpqzqQzOz5srxqTvMBaR0XZTSrVWo4j55Rc6cA== + +vscode-textmate@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/vscode-textmate/-/vscode-textmate-8.0.0.tgz#2c7a3b1163ef0441097e0b5d6389cd5504b59e5d" + integrity sha512-AFbieoL7a5LMqcnOF04ji+rpXadgOXnZsxQr//r83kLPr7biP7am3g9zbaZIaBGwBRWeSvoMD4mgPdX3e4NWBg== + +which@^1.2.9: + version "1.3.1" + resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" + integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ== + dependencies: + isexe "^2.0.0" + +word-wrap@~1.2.3: + version "1.2.3" + resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c" + integrity sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ== + +wordwrap@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" + integrity sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q== + +wordwrapjs@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/wordwrapjs/-/wordwrapjs-4.0.1.tgz#d9790bccfb110a0fc7836b5ebce0937b37a8b98f" + integrity sha512-kKlNACbvHrkpIw6oPeYDSmdCTu2hdMHoyXLTcUKala++lx5Y+wjJ/e474Jqv5abnVmwxw08DiTuHmw69lJGksA== + dependencies: + reduce-flatten "^2.0.0" + typical "^5.2.0" + +workerpool@6.2.1: + version "6.2.1" + resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.2.1.tgz#46fc150c17d826b86a008e5a4508656777e9c343" + integrity sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw== + +wrap-ansi@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" + integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== + dependencies: + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + +wrappy@1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== + +write@1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/write/-/write-1.0.3.tgz#0800e14523b923a387e415123c865616aae0f5c3" + integrity sha512-/lg70HAjtkUgWPVZhZcm+T4hkL8Zbtp1nFNOn3lRrxnlv50SRBv7cR7RqR+GMsd3hUXy9hWBo4CHTbFTcOYwig== + dependencies: + mkdirp "^0.5.1" + +ws@^7.4.6: + version "7.5.9" + resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.9.tgz#54fa7db29f4c7cec68b1ddd3a89de099942bb591" + integrity sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q== + +y18n@^5.0.5: + version "5.0.8" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55" + integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA== + +yallist@^3.0.2: + version "3.1.1" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd" + integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g== + +yallist@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" + integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== + +yargs-parser@20.2.4: + version "20.2.4" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.4.tgz#b42890f14566796f85ae8e3a25290d205f154a54" + integrity sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA== + +yargs-parser@^20.2.2: + version "20.2.9" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee" + integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w== + +yargs-unparser@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/yargs-unparser/-/yargs-unparser-2.0.0.tgz#f131f9226911ae5d9ad38c432fe809366c2325eb" + integrity sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA== + dependencies: + camelcase "^6.0.0" + decamelize "^4.0.0" + flat "^5.0.2" + is-plain-obj "^2.1.0" + +yargs@16.2.0: + version "16.2.0" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.2.0.tgz#1c82bf0f6b6a66eafce7ef30e376f49a12477f66" + integrity sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw== + dependencies: + cliui "^7.0.2" + escalade "^3.1.1" + get-caller-file "^2.0.5" + require-directory "^2.1.1" + string-width "^4.2.0" + y18n "^5.0.5" + yargs-parser "^20.2.2" + +yn@3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/yn/-/yn-3.1.1.tgz#1e87401a09d767c1d5eab26a6e4c185182d2eb50" + integrity sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q== + +yocto-queue@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" + integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== diff --git a/packages/world/.gitignore b/packages/world/.gitignore new file mode 100644 index 0000000000..2f6f3adfc2 --- /dev/null +++ b/packages/world/.gitignore @@ -0,0 +1,10 @@ +cache +abi +out +types/ethers-contracts +docs +_docs +DOCS.md +artifacts +yarn-error.log +API \ No newline at end of file diff --git a/packages/world/.npmignore b/packages/world/.npmignore new file mode 100644 index 0000000000..4240dbeb28 --- /dev/null +++ b/packages/world/.npmignore @@ -0,0 +1,7 @@ +* + +!abi/** +!src/** +!types/** +!package.json +!README.md \ No newline at end of file diff --git a/packages/world/.nvmrc b/packages/world/.nvmrc new file mode 100644 index 0000000000..8e2afd3427 --- /dev/null +++ b/packages/world/.nvmrc @@ -0,0 +1 @@ +17 \ No newline at end of file diff --git a/packages/world/.prettierrc b/packages/world/.prettierrc new file mode 100644 index 0000000000..9a5a009900 --- /dev/null +++ b/packages/world/.prettierrc @@ -0,0 +1,7 @@ +{ + "printWidth": 120, + "semi": true, + "tabWidth": 2, + "useTabs": false, + "bracketSpacing": true +} diff --git a/packages/world/.solhint.json b/packages/world/.solhint.json new file mode 100644 index 0000000000..4e2baa8be7 --- /dev/null +++ b/packages/world/.solhint.json @@ -0,0 +1,8 @@ +{ + "extends": "solhint:recommended", + "rules": { + "compiler-version": ["error", ">=0.8.0"], + "avoid-low-level-calls": "off", + "func-visibility": ["warn", { "ignoreConstructors": true }] + } +} diff --git a/packages/world/CHANGELOG.md b/packages/world/CHANGELOG.md new file mode 100644 index 0000000000..e4d87c4d45 --- /dev/null +++ b/packages/world/CHANGELOG.md @@ -0,0 +1,4 @@ +# Change Log + +All notable changes to this project will be documented in this file. +See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. diff --git a/packages/world/CHANGELOG.yml b/packages/world/CHANGELOG.yml new file mode 100644 index 0000000000..e3f6e391b4 --- /dev/null +++ b/packages/world/CHANGELOG.yml @@ -0,0 +1 @@ +label: Changelog diff --git a/packages/world/README.md b/packages/world/README.md new file mode 100644 index 0000000000..8b429c9f1b --- /dev/null +++ b/packages/world/README.md @@ -0,0 +1 @@ +# World framework diff --git a/packages/world/foundry.toml b/packages/world/foundry.toml new file mode 100644 index 0000000000..4711ce8e0a --- /dev/null +++ b/packages/world/foundry.toml @@ -0,0 +1,9 @@ +[profile.default] +ffi = false +fuzz_runs = 256 +optimizer = true +optimizer_runs = 3000 +verbosity = 1 +libs = ["../../node_modules", "../store"] +src = "src" +out = "out" \ No newline at end of file diff --git a/packages/world/gas-report.txt b/packages/world/gas-report.txt new file mode 100644 index 0000000000..bc9f74f39f --- /dev/null +++ b/packages/world/gas-report.txt @@ -0,0 +1,13 @@ +(test/World.t.sol) | validate route (empty string) [assertTrue(_isRoute(""), "empty string")]: 276 +(test/World.t.sol) | validate route (single slash) [assertFalse(_isRoute("/"), "single slash")]: 333 +(test/World.t.sol) | validate route (single character) [assertTrue(_isRoute("/a"), "single character")]: 291 +(test/World.t.sol) | validate route (single level) [assertTrue(_isRoute("/topLevel"), "single level")]: 289 +(test/World.t.sol) | validate route (multi level) [assertTrue(_isRoute("/topLevel/subLevel"), "multi level")]: 289 +(test/World.t.sol) | validate route (no leading slash) [assertFalse(_isRoute("noLeadingSlash"), "no leading slash")]: 325 +(test/World.t.sol) | validate single level route (empty string) [assertTrue(_isSingleLevelRoute(""), "empty string")]: 373 +(test/World.t.sol) | validate single level route (single slash) [assertFalse(_isSingleLevelRoute("/"), "single slash")]: 389 +(test/World.t.sol) | validate route (single character) [assertTrue(_isRoute("/a"), "single character")]: 292 +(test/World.t.sol) | validate single level route (single level) [assertTrue(_isSingleLevelRoute("/topLevel"), "single level")]: 1314 +(test/World.t.sol) | validate single level route (multi level) [assertFalse(_isSingleLevelRoute("/topLevel/subLevel"), "multi level")]: 1419 +(test/World.t.sol) | validate single level route (no leading slash) [assertFalse(_isSingleLevelRoute("noLeadingSlash"), "no leading slash")]: 377 +(test/World.t.sol) | validate single level route (no leading slash but contains slash) [assertFalse(_isSingleLevelRoute("noLeadingSlash/butContainsSlash"), "no leading slash")]: 381 \ No newline at end of file diff --git a/packages/world/git-install.sh b/packages/world/git-install.sh new file mode 100755 index 0000000000..b86de4f8c9 --- /dev/null +++ b/packages/world/git-install.sh @@ -0,0 +1,5 @@ +#! usr/bin/bash +giturl=https://github.com/$1.git +head=$(git ls-remote $giturl HEAD | head -n1 | awk '{print $1;}') +yarn add $giturl#$head +echo "Installed $giturl#$head" \ No newline at end of file diff --git a/packages/world/hardhat.config.ts b/packages/world/hardhat.config.ts new file mode 100644 index 0000000000..da00b249c6 --- /dev/null +++ b/packages/world/hardhat.config.ts @@ -0,0 +1,23 @@ +import { HardhatUserConfig } from "hardhat/config"; +import "./tasks/compile"; +import "solidity-docgen"; + +const config: HardhatUserConfig = { + paths: { + sources: "./src", + }, + solidity: { + version: "0.8.13", + settings: { + optimizer: { + enabled: true, + runs: 200, + }, + }, + }, + docgen: { + outputDir: "API", + }, +}; + +export default config; diff --git a/packages/world/index.ts b/packages/world/index.ts new file mode 100644 index 0000000000..cb0ff5c3b5 --- /dev/null +++ b/packages/world/index.ts @@ -0,0 +1 @@ +export {}; diff --git a/packages/world/index.yml b/packages/world/index.yml new file mode 100644 index 0000000000..85c3374156 --- /dev/null +++ b/packages/world/index.yml @@ -0,0 +1,2 @@ +label: world +order: 45 diff --git a/packages/world/mud.config.mts b/packages/world/mud.config.mts new file mode 100644 index 0000000000..bac44d375a --- /dev/null +++ b/packages/world/mud.config.mts @@ -0,0 +1,21 @@ +import { StoreUserConfig } from "@latticexyz/cli"; +import { SchemaType } from "@latticexyz/schema-type"; + +const config: StoreUserConfig = { + baseRoute: "/world_internals", + + tables: { + RouteAccess: { + storeArgument: true, + primaryKeys: { + routeId: SchemaType.UINT256, + caller: SchemaType.ADDRESS, + }, + schema: { + value: SchemaType.BOOL + }, + }, + } +}; + +export default config; diff --git a/packages/world/package.json b/packages/world/package.json new file mode 100644 index 0000000000..724ac76868 --- /dev/null +++ b/packages/world/package.json @@ -0,0 +1,52 @@ +{ + "name": "@latticexyz/world", + "license": "MIT", + "version": "1.34.0", + "description": "World framework", + "types": "./types/ethers-contracts/", + "repository": { + "type": "git", + "url": "https://github.com/latticexyz/mud.git", + "directory": "packages/world" + }, + "scripts": { + "prepare": "yarn build && chmod u+x git-install.sh", + "git:install": "bash git-install.sh", + "tablegen": "../cli/dist/mud.js tablegen", + "test": "forge test", + "build": "rimraf out && forge build && yarn dist && yarn types", + "dist": "rimraf abi && mkdir abi && cp -rf out/*.sol/*.json abi/ && yarn rimraf abi/*.metadata.json", + "types": "rimraf types && typechain --target=ethers-v5 abi/*.json", + "prettier": "prettier --write 'src/**/*.sol'", + "solhint": "solhint --config ./.solhint.json 'src/**/*.sol'", + "lint": "yarn prettier && yarn solhint", + "link": "yarn link", + "docs": "rimraf API && hardhat docgen && echo 'label: API\norder: 50' > API/index.yml", + "release": "npm publish || echo 'version already published'", + "gasreport": "mud gas-report --path test/** --save gas-report.txt" + }, + "devDependencies": { + "@latticexyz/cli": "^1.37.1", + "@latticexyz/schema-type": "^1.34.0", + "@latticexyz/store": "^1.34.0", + "@typechain/ethers-v5": "^9.0.0", + "@types/mocha": "^9.1.1", + "ds-test": "https://github.com/dapphub/ds-test.git#c9ce3f25bde29fc5eb9901842bf02850dfd2d084", + "forge-std": "https://github.com/foundry-rs/forge-std.git#f36dab24d63d1c1945a05ed375ce341d3c1a49ed", + "hardhat": "^2.10.1", + "prettier": "^2.6.2", + "prettier-plugin-solidity": "^1.0.0-beta.19", + "rimraf": "^3.0.2", + "solhint": "^3.3.7", + "solidity-docgen": "^0.6.0-beta.22", + "ts-node": "^10.9.1", + "typechain": "^8.1.1", + "typedoc": "^0.23.10" + }, + "peerDependencies": { + "@latticexyz/store": "^1.34.0", + "ds-test": "https://github.com/dapphub/ds-test.git#c9ce3f25bde29fc5eb9901842bf02850dfd2d084", + "forge-std": "https://github.com/foundry-rs/forge-std.git#f36dab24d63d1c1945a05ed375ce341d3c1a49ed" + }, + "gitHead": "218f56893d268b0c5157a3e4c603b859e287a343" +} diff --git a/packages/world/remappings.txt b/packages/world/remappings.txt new file mode 100644 index 0000000000..bb98a1f2b8 --- /dev/null +++ b/packages/world/remappings.txt @@ -0,0 +1,3 @@ +ds-test/=../../node_modules/ds-test/src/ +forge-std/=../../node_modules/forge-std/src/ +@latticexyz/=../../node_modules/@latticexyz/ diff --git a/packages/world/src/ISystemHook.sol b/packages/world/src/ISystemHook.sol new file mode 100644 index 0000000000..3130ab973f --- /dev/null +++ b/packages/world/src/ISystemHook.sol @@ -0,0 +1,10 @@ +// SPDX-License-Identifier: MIT +pragma solidity >=0.8.0; + +interface ISystemHook { + function onCallSystem( + address msgSender, + address systemAddress, + bytes memory funcSelectorAndArgs + ) external; +} diff --git a/packages/world/src/System.sol b/packages/world/src/System.sol new file mode 100644 index 0000000000..1fce49db82 --- /dev/null +++ b/packages/world/src/System.sol @@ -0,0 +1,12 @@ +// SPDX-License-Identifier: MIT +pragma solidity >=0.8.0; + +contract System { + // Extract the trusted msg.sender value appended to the calldata + function _msgSender() internal pure returns (address sender) { + assembly { + // 96 = 256 - 20 * 8 + sender := shr(96, calldataload(sub(calldatasize(), 20))) + } + } +} diff --git a/packages/world/src/Utils.sol b/packages/world/src/Utils.sol new file mode 100644 index 0000000000..666edbd4cb --- /dev/null +++ b/packages/world/src/Utils.sol @@ -0,0 +1,8 @@ +// SPDX-License-Identifier: MIT +pragma solidity >=0.8.0; + +function bytes32ToBool(bytes32 input) pure returns (bool output) { + assembly { + output := input + } +} diff --git a/packages/world/src/World.sol b/packages/world/src/World.sol new file mode 100644 index 0000000000..1054464c3a --- /dev/null +++ b/packages/world/src/World.sol @@ -0,0 +1,426 @@ +// SPDX-License-Identifier: MIT +pragma solidity >=0.8.0; + +import { console } from "forge-std/console.sol"; +import { Store, IStoreHook } from "@latticexyz/store/src/Store.sol"; +import { StoreCore } from "@latticexyz/store/src/StoreCore.sol"; +import { Schema } from "@latticexyz/store/src/Schema.sol"; + +import { RouteOwnerTable } from "./tables/RouteOwnerTable.sol"; +import { RouteAccess } from "./tables/RouteAccess.sol"; +import { RouteTable } from "./tables/RouteTable.sol"; +import { SystemRouteTable } from "./tables/SystemRouteTable.sol"; +import { SystemTable } from "./tables/SystemTable.sol"; +import { System } from "./System.sol"; +import { ISystemHook } from "./ISystemHook.sol"; + +uint256 constant ROOT_ROUTE_ID = uint256(keccak256(bytes(""))); +bytes32 constant SINGLE_SLASH = "/"; + +contract World is Store { + error RouteInvalid(string route); + error RouteExists(string route); + error RouteAccessDenied(string route, address caller); + error SystemExists(address system); + + constructor() { + SystemTable.registerSchema(); + RouteTable.registerSchema(); + RouteAccess.registerSchema(); + SystemRouteTable.registerSchema(); + RouteOwnerTable.registerSchema(); + + // Register root route and give ownership to msg.sender + RouteTable.set({ routeId: ROOT_ROUTE_ID, route: "" }); // Storing this explicitly to trigger the event for indexers + RouteOwnerTable.set({ routeId: ROOT_ROUTE_ID, owner: msg.sender }); + RouteAccess.set({ routeId: ROOT_ROUTE_ID, caller: msg.sender, value: true }); + } + + /************************************************************************ + * + * REGISTRATION METHODS + * + ************************************************************************/ + + /** + * Register a new route by extending an existing route + */ + function registerRoute(string calldata baseRoute, string calldata subRoute) public returns (uint256 routeId) { + // Require subroute to be a valid route fragment (start with `/` and don't contain any further `/`) + if (!_isSingleLevelRoute(subRoute)) revert RouteInvalid(subRoute); + + // Require base route to exist (with a special check for the root route because it's empty and fails the `has` check) + uint256 baseRouteId = _toRouteId(baseRoute); + if (!(baseRouteId == ROOT_ROUTE_ID || RouteTable.has(baseRouteId))) revert RouteInvalid(baseRoute); + + // Construct the new route + string memory route = string(abi.encodePacked(baseRoute, subRoute)); + routeId = _toRouteId(route); + + // Require route to not exist yet + if (RouteTable.has(routeId)) revert RouteExists(route); + + // Store the route + RouteTable.set({ routeId: routeId, route: route }); + + // Add caller as owner of the new route + RouteOwnerTable.set({ routeId: routeId, owner: msg.sender }); + + // Give caller access to the route + RouteAccess.set({ routeId: routeId, caller: msg.sender, value: true }); + } + + /** + * Register register a table with given schema at the given route + */ + function registerTable( + string calldata baseRoute, + string calldata tableRoute, + Schema schema + ) public returns (uint256 tableRouteId) { + // Register table route + tableRouteId = uint256(registerRoute(baseRoute, tableRoute)); + + // StoreCore handles checking for existence + StoreCore.registerSchema(tableRouteId, schema); + } + + /** + * Register a schema for a given table id + * This overload exists to conform to the Store interface, + * but it requires the caller to register a route using `registerRoute` first + */ + function registerSchema(uint256 tableId, Schema schema) public override { + // Require caller to own the given tableId + if (RouteOwnerTable.get(tableId) != msg.sender) revert RouteAccessDenied(RouteTable.get(tableId), msg.sender); + + // Register the schema + StoreCore.registerSchema(tableId, schema); + } + + /** + * Register a hook for a given table route + */ + function registerTableHook(string calldata tableRoute, IStoreHook hook) public { + registerStoreHook(_toRouteId(tableRoute), hook); + } + + /** + * Register a hook for a given table route id + * This overload exists to conform with the `IStore` interface. + */ + function registerStoreHook(uint256 tableId, IStoreHook hook) public override { + // Require caller to own the given tableId + if (RouteOwnerTable.get(tableId) != msg.sender) revert RouteAccessDenied(RouteTable.get(tableId), msg.sender); + + // Register the hook + StoreCore.registerStoreHook(tableId, hook); + } + + /** + * Register a hook for a given system route + */ + function registerSystemHook(string calldata systemRoute, ISystemHook hook) public { + // TODO implement (see https://github.com/latticexyz/mud/issues/444) + } + + /** + * Register a system at the given route + */ + function registerSystem( + string calldata baseRoute, + string calldata systemRoute, + System system, + bool publicAccess + ) public returns (uint256 systemRouteId) { + // Require the system to not exist yet + if (SystemRouteTable.has(address(system))) revert SystemExists(address(system)); + + // Require the caller to own the base route + uint256 baseRouteId = _toRouteId(baseRoute); + if (RouteOwnerTable.get(baseRouteId) != msg.sender) revert RouteAccessDenied(baseRoute, msg.sender); + + // Register system route + systemRouteId = registerRoute(baseRoute, systemRoute); + + // Store the system address in the system table + SystemTable.set({ routeId: systemRouteId, system: address(system), publicAccess: publicAccess }); + + // Store the system's route in the SystemToRoute table + SystemRouteTable.set({ system: address(system), routeId: systemRouteId }); + + // Give the system access to its base route + RouteAccess.set({ routeId: baseRouteId, caller: address(system), value: true }); + } + + /** + * Grant access to a given route + */ + function grantAccess(string calldata route, address grantee) public { + // Require the caller to own the route + uint256 routeId = _toRouteId(route); + if (RouteOwnerTable.get(routeId) != msg.sender) revert RouteAccessDenied(route, msg.sender); + + // Grant access to the given route + RouteAccess.set({ routeId: routeId, caller: grantee, value: true }); + } + + /** + * Retract access to a given route + */ + function retractAccess(string calldata route, address grantee) public { + // Require the caller to own the route + uint256 routeId = _toRouteId(route); + if (RouteOwnerTable.get(routeId) != msg.sender) revert RouteAccessDenied(route, msg.sender); + + // Retract access to the given route + RouteAccess.deleteRecord({ routeId: routeId, caller: grantee }); + } + + /************************************************************************ + * + * STORE METHODS + * + ************************************************************************/ + + /** + * Write a record in a table based on a parent route access right. + * We check for access based on `accessRoute`, and write to `accessRoute/subRoute` + * because access to a route also grants access to all sub routes. + */ + function setRecord( + string calldata accessRoute, + string calldata subRoute, + bytes32[] calldata key, + bytes calldata data + ) public { + // Require access to accessRoute + if (!_hasAccess(accessRoute, msg.sender)) revert RouteAccessDenied(accessRoute, msg.sender); + + // Require a valid subRoute + if (!_isRoute(subRoute)) revert RouteInvalid(subRoute); + + // Construct the table route id by concatenating accessRoute and tableRoute + uint256 tableRouteId = uint256(keccak256(abi.encodePacked(accessRoute, subRoute))); + + // Set the record + StoreCore.setRecord(tableRouteId, key, data); + } + + /** + * Write a record in a table based on access right to the table route id. + * This overload exists to conform with the `IStore` interface. + */ + function setRecord( + uint256 tableRouteId, + bytes32[] calldata key, + bytes calldata data + ) public { + // Check access based on the tableRoute + if (!_hasAccess(tableRouteId, msg.sender)) revert RouteAccessDenied(RouteTable.get(tableRouteId), msg.sender); + + // Set the record + StoreCore.setRecord(tableRouteId, key, data); + } + + /** + * Write a field in a table based on a parent route access right. + * We check for access based on `accessRoute`, and write to `accessRoute/subRoute` + * because access to a route also grants access to all sub routes. + */ + function setField( + string calldata accessRoute, + string calldata subRoute, + bytes32[] calldata key, + uint8 schemaIndex, + bytes calldata data + ) public { + // Require access to accessRoute + if (!_hasAccess(accessRoute, msg.sender)) revert RouteAccessDenied(accessRoute, msg.sender); + + // Require a valid subRoute + if (!_isRoute(subRoute)) revert RouteInvalid(subRoute); + + // Construct the table route id by concatenating accessRoute and tableRoute + uint256 tableRouteId = uint256(keccak256(abi.encodePacked(accessRoute, subRoute))); + + // Set the field + StoreCore.setField(tableRouteId, key, schemaIndex, data); + } + + /** + * Write a field in a table based on specific access rights. + * This overload exists to conform with the `IStore` interface. + */ + function setField( + uint256 tableRouteId, + bytes32[] calldata key, + uint8 schemaIndex, + bytes calldata data + ) public override { + // Check access based on the tableRoute + if (!_hasAccess(tableRouteId, msg.sender)) revert RouteAccessDenied(RouteTable.get(tableRouteId), msg.sender); + + // Set the field + StoreCore.setField(tableRouteId, key, schemaIndex, data); + } + + /** + * Delete a record in a table based on a parent route access right. + * We check for access based on `accessRoute`, and write to `accessRoute/subRoute` + * because access to a route also grants access to all sub routes. + */ + function deleteRecord( + string calldata accessRoute, + string calldata subRoute, + bytes32[] calldata key + ) public { + // Require access to accessRoute + if (!_hasAccess(accessRoute, msg.sender)) revert RouteAccessDenied(accessRoute, msg.sender); + + // Require a valid subRoute + if (!_isRoute(subRoute)) revert RouteInvalid(subRoute); + + // Construct the table route id by concatenating accessRoute and tableRoute + uint256 tableRouteId = uint256(keccak256(abi.encodePacked(accessRoute, subRoute))); + + // Delete the record + StoreCore.deleteRecord(tableRouteId, key); + } + + /** + * Delete a record in a table based on specific access rights. + * This overload exists to conform with the `IStore` interface. + */ + function deleteRecord(uint256 tableRouteId, bytes32[] calldata key) public override { + // Check access based on the tableRoute + if (!_hasAccess(tableRouteId, msg.sender)) revert RouteAccessDenied(RouteTable.get(tableRouteId), msg.sender); + + // Delete the record + StoreCore.deleteRecord(tableRouteId, key); + } + + /************************************************************************ + * + * SYSTEM CALLS + * + ************************************************************************/ + + /** + * Call a system based on a parent route access right + * We check for access based on `accessRoute`, and execute `accessRoute/subRoute` + * because access to a route also grants access to all sub routes + */ + function call( + string calldata accessRoute, + string memory subRoute, + bytes calldata funcSelectorAndArgs + ) public returns (bytes memory) { + // Check if the system is a public system and get its address + string memory systemRoute = string(abi.encodePacked(accessRoute, subRoute)); + uint256 systemRouteId = _toRouteId(systemRoute); + (address systemAddress, bool publicAccess) = SystemTable.get(systemRouteId); + + // If the system is not public, check for individual access + if (!publicAccess) { + // Require access to accessRoute + if (!_hasAccess(accessRoute, msg.sender)) revert RouteAccessDenied(accessRoute, msg.sender); + + // Require a valid subRoute + if (!_isRoute(subRoute)) revert RouteInvalid(subRoute); + } + + // Call the system and forward any return data + return + _call({ + msgSender: msg.sender, + systemAddress: systemAddress, + funcSelectorAndArgs: funcSelectorAndArgs, + delegate: _isSingleLevelRoute(systemRoute) + }); + } + + /** + * Overload for the function above to check access based on the full system route instead of a parent route (better devex for public systems) + */ + function call(string calldata systemRoute, bytes calldata funcSelectorAndArgs) public returns (bytes memory) { + return call(systemRoute, "", funcSelectorAndArgs); + } + + /** + * Internal function to call system with delegatecall/call, without access control + */ + function _call( + address msgSender, + address systemAddress, + bytes calldata funcSelectorAndArgs, + bool delegate + ) internal returns (bytes memory) { + // Append msg.sender to the calldata + bytes memory callData = abi.encodePacked(funcSelectorAndArgs, msgSender); + + // Call the system using `delegatecall` for root systems and `call` for others + (bool success, bytes memory data) = delegate + ? systemAddress.delegatecall(callData) // root system + : systemAddress.call(callData); // non-root system + + // Forward returned data if the call succeeded + if (success) return data; + + // Forward error if the call failed + assembly { + // data+32 is a pointer to the error message, mload(data) is the length of the error message + revert(add(data, 0x20), mload(data)) + } + } + + function _hasAccess(string calldata route, address caller) internal view returns (bool) { + return _hasAccess(_toRouteId(route), caller); + } + + function _hasAccess(uint256 routeId, address caller) internal view returns (bool) { + return RouteAccess.get(routeId, caller); + } +} + +// A route is a string starting with `/` or an empty string +function _isRoute(string memory route) pure returns (bool result) { + assembly { + // If the route is empty, return true + if eq(mload(route), 0) { + result := 1 + } + + // If the first byte is `/` (ascii 0x2f), return true + if eq(byte(0, mload(add(route, 0x20))), 0x2f) { + result := 1 + } + + // If the route is only `/`, return false + if eq(mload(route), 1) { + result := 0 + } + } +} + +// A top level route contains exactly one `/` at the start +function _isSingleLevelRoute(string memory route) pure returns (bool result) { + // Verify the route is empty or starts with `/` + if (!_isRoute(route)) return false; + + // Loop through the string and return false if another `/` is found + bytes memory routeBytes = bytes(route); + for (uint256 i = 1; i < routeBytes.length; ) { + if (routeBytes[i] == 0x2f) return false; + unchecked { + i++; + } + } + + // Return true if no `/` was found + return true; +} + +function _toRouteId(string memory route) pure returns (uint256) { + return uint256(keccak256(bytes(route))); +} diff --git a/packages/world/src/schemas/AddressArray.sol b/packages/world/src/schemas/AddressArray.sol new file mode 100644 index 0000000000..5203ceb04d --- /dev/null +++ b/packages/world/src/schemas/AddressArray.sol @@ -0,0 +1,88 @@ +// SPDX-License-Identifier: MIT +pragma solidity >=0.8.0; + +import { console } from "forge-std/console.sol"; +import { IStore } from "@latticexyz/store/src/IStore.sol"; +import { StoreSwitch } from "@latticexyz/store/src/StoreSwitch.sol"; +import { StoreCore } from "@latticexyz/store/src/StoreCore.sol"; +import { SchemaType } from "@latticexyz/store/src/Types.sol"; +import { Bytes } from "@latticexyz/store/src/Bytes.sol"; +import { SliceLib } from "@latticexyz/store/src/Slice.sol"; +import { EncodeArray } from "@latticexyz/store/src/tightcoder/EncodeArray.sol"; +import { Schema, SchemaLib } from "@latticexyz/store/src/Schema.sol"; +import { PackedCounter, PackedCounterLib } from "@latticexyz/store/src/PackedCounter.sol"; + +// -- User defined schema and tableId -- +struct AddressArraySchema { + address[] addresses; +} + +// -- Autogenerated library to interact with tables with this schema -- +// TODO: autogenerate + +library AddressArraySchemaLib { + /** Get the table's schema */ + function getSchema() internal pure returns (Schema schema) { + schema = SchemaLib.encode(SchemaType.ADDRESS_ARRAY); + } + + /** Register the table's schema */ + function registerSchema(uint256 tableId) internal { + StoreSwitch.registerSchema(tableId, getSchema()); + } + + function registerSchema(uint256 tableId, IStore store) internal { + store.registerSchema(tableId, getSchema()); + } + + /** Set the table's data */ + function set( + uint256 tableId, + bytes32 key, + address[] memory addresses + ) internal { + bytes memory data = EncodeArray.encode(addresses); + bytes32[] memory keyTuple = new bytes32[](1); + keyTuple[0] = key; + StoreSwitch.setField(tableId, keyTuple, 0, data); + } + + /** + * Push an element to the addresses array + * TODO: this is super inefficient right now, need to add support for pushing to arrays to the store core library to avoid reading/writing the entire array + */ + function push( + uint256 tableId, + bytes32 key, + address addr + ) internal { + bytes32[] memory keyTuple = new bytes32[](1); + keyTuple[0] = key; + bytes memory addresses = abi.encodePacked(StoreSwitch.getField(tableId, keyTuple, 0), addr); + StoreSwitch.setField(tableId, keyTuple, 0, addresses); + } + + /** Get the table's data */ + function get(uint256 tableId, bytes32 key) internal view returns (address[] memory addresses) { + bytes32[] memory keyTuple = new bytes32[](1); + keyTuple[0] = key; + bytes memory blob = StoreSwitch.getRecord(tableId, keyTuple); + return decode(blob); + } + + function get( + uint256 tableId, + IStore store, + bytes32 key + ) internal view returns (address[] memory addresses) { + bytes32[] memory keyTuple = new bytes32[](1); + keyTuple[0] = key; + bytes memory blob = store.getRecord(tableId, keyTuple); + return decode(blob); + } + + function decode(bytes memory blob) internal pure returns (address[] memory addresses) { + if (blob.length == 0) return new address[](0); + SliceLib.getSubslice(blob, 32).decodeArray_address(); + } +} diff --git a/packages/world/src/schemas/Bool.sol b/packages/world/src/schemas/Bool.sol new file mode 100644 index 0000000000..860951b26e --- /dev/null +++ b/packages/world/src/schemas/Bool.sol @@ -0,0 +1,77 @@ +// SPDX-License-Identifier: MIT +pragma solidity >=0.8.0; + +import { console } from "forge-std/console.sol"; +import { IStore } from "@latticexyz/store/src/IStore.sol"; +import { StoreSwitch } from "@latticexyz/store/src/StoreSwitch.sol"; +import { StoreCore } from "@latticexyz/store/src/StoreCore.sol"; +import { SchemaType } from "@latticexyz/store/src/Types.sol"; +import { Bytes } from "@latticexyz/store/src/Bytes.sol"; +import { Schema, SchemaLib } from "@latticexyz/store/src/Schema.sol"; +import { PackedCounter, PackedCounterLib } from "@latticexyz/store/src/PackedCounter.sol"; +import { bytes32ToBool } from "../Utils.sol"; + +// -- User defined schema and tableId -- +struct BoolSchema { + bool value; +} + +// -- Autogenerated library to interact with tables with this schema -- +// TODO: autogenerate + +library BoolSchemaLib { + /** Get the table's schema */ + function getSchema() internal pure returns (Schema schema) { + schema = SchemaLib.encode(SchemaType.BOOL); + } + + /** Register the table's schema */ + function registerSchema(uint256 tableId) internal { + StoreSwitch.registerSchema(tableId, getSchema()); + } + + function registerSchema(uint256 tableId, IStore store) internal { + store.registerSchema(tableId, getSchema()); + } + + /** Set the table's data */ + function set( + uint256 tableId, + bytes32 key, + bool value + ) internal { + bytes32[] memory keyTuple = new bytes32[](1); + keyTuple[0] = key; + StoreSwitch.setRecord(tableId, keyTuple, abi.encodePacked(value)); + } + + function set( + uint256 tableId, + IStore store, + bytes32 key, + bool value + ) internal { + bytes32[] memory keyTuple = new bytes32[](1); + keyTuple[0] = key; + store.setRecord(tableId, keyTuple, abi.encodePacked(value)); + } + + /** Get the table's data */ + function get(uint256 tableId, bytes32 key) internal view returns (bool) { + bytes32[] memory keyTuple = new bytes32[](1); + keyTuple[0] = key; + bytes memory blob = StoreSwitch.getRecord(tableId, keyTuple); + return bytes32ToBool(bytes32(blob)); + } + + function get( + uint256 tableId, + IStore store, + bytes32 key + ) internal view returns (bool) { + bytes32[] memory keyTuple = new bytes32[](1); + keyTuple[0] = key; + bytes memory blob = store.getRecord(tableId, keyTuple); + return bytes32ToBool(bytes32(blob)); + } +} diff --git a/packages/world/src/schemas/RouteOwnerSchema.sol b/packages/world/src/schemas/RouteOwnerSchema.sol new file mode 100644 index 0000000000..3835183f8e --- /dev/null +++ b/packages/world/src/schemas/RouteOwnerSchema.sol @@ -0,0 +1,65 @@ +// SPDX-License-Identifier: MIT +pragma solidity >=0.8.0; + +import { console } from "forge-std/console.sol"; +import { IStore } from "@latticexyz/store/src/IStore.sol"; +import { StoreSwitch } from "@latticexyz/store/src/StoreSwitch.sol"; +import { StoreCore } from "@latticexyz/store/src/StoreCore.sol"; +import { SchemaType } from "@latticexyz/store/src/Types.sol"; +import { Bytes } from "@latticexyz/store/src/Bytes.sol"; +import { Schema, SchemaLib } from "@latticexyz/store/src/Schema.sol"; +import { PackedCounter, PackedCounterLib } from "@latticexyz/store/src/PackedCounter.sol"; + +// -- User defined schema and tableId -- +struct RouteOwnerSchema { + address addr; +} + +// -- Autogenerated library to interact with tables with this schema -- +// TODO: autogenerate + +library RouteOwnerSchemaLib { + /** Get the table's schema */ + function getSchema() internal pure returns (Schema schema) { + schema = SchemaLib.encode(SchemaType.ADDRESS); + } + + /** Register the table's schema */ + function registerSchema(uint256 tableId) internal { + StoreSwitch.registerSchema(tableId, getSchema()); + } + + function registerSchema(uint256 tableId, IStore store) internal { + store.registerSchema(tableId, getSchema()); + } + + /** Set the table's data */ + function set( + uint256 tableId, + uint256 routeId, + address addr + ) internal { + bytes32[] memory keyTuple = new bytes32[](1); + keyTuple[0] = bytes32(routeId); + StoreSwitch.setField(tableId, keyTuple, 0, abi.encodePacked(addr)); + } + + /** Get the table's data */ + function get(uint256 tableId, uint256 routeId) internal view returns (address) { + bytes32[] memory keyTuple = new bytes32[](1); + keyTuple[0] = bytes32(routeId); + bytes memory blob = StoreSwitch.getRecord(tableId, keyTuple); + return address(bytes20(blob)); + } + + function get( + uint256 tableId, + IStore store, + uint256 routeId + ) internal view returns (address) { + bytes32[] memory keyTuple = new bytes32[](1); + keyTuple[0] = bytes32(routeId); + bytes memory blob = store.getRecord(tableId, keyTuple); + return address(bytes20(blob)); + } +} diff --git a/packages/world/src/schemas/RouteSchema.sol b/packages/world/src/schemas/RouteSchema.sol new file mode 100644 index 0000000000..a33bc41138 --- /dev/null +++ b/packages/world/src/schemas/RouteSchema.sol @@ -0,0 +1,73 @@ +// SPDX-License-Identifier: MIT +pragma solidity >=0.8.0; + +import { console } from "forge-std/console.sol"; +import { IStore } from "@latticexyz/store/src/IStore.sol"; +import { StoreSwitch } from "@latticexyz/store/src/StoreSwitch.sol"; +import { StoreCore } from "@latticexyz/store/src/StoreCore.sol"; +import { SchemaType } from "@latticexyz/store/src/Types.sol"; +import { Bytes } from "@latticexyz/store/src/Bytes.sol"; +import { Schema, SchemaLib } from "@latticexyz/store/src/Schema.sol"; +import { SliceLib } from "@latticexyz/store/src/Slice.sol"; +import { PackedCounter, PackedCounterLib } from "@latticexyz/store/src/PackedCounter.sol"; + +// -- User defined schema and tableId -- +struct RouteSchema { + string value; +} + +// -- Autogenerated library to interact with tables with this schema -- +// TODO: autogenerate + +library RouteSchemaLib { + /** Get the table's schema */ + function getSchema() internal pure returns (Schema schema) { + schema = SchemaLib.encode(SchemaType.STRING); + } + + /** Register the table's schema */ + function registerSchema(uint256 tableId) internal { + StoreSwitch.registerSchema(tableId, getSchema()); + } + + function registerSchema(uint256 tableId, IStore store) internal { + store.registerSchema(tableId, getSchema()); + } + + /** Set the table's data */ + function set( + uint256 tableId, + uint256 routeId, + string memory value + ) internal { + bytes32[] memory keyTuple = new bytes32[](1); + keyTuple[0] = bytes32(routeId); + StoreSwitch.setField(tableId, keyTuple, 0, bytes(value)); + } + + /** Get the table's data */ + function get(uint256 tableId, uint256 routeId) internal view returns (string memory) { + bytes32[] memory keyTuple = new bytes32[](1); + keyTuple[0] = bytes32(routeId); + bytes memory blob = StoreSwitch.getRecord(tableId, keyTuple); + return string(SliceLib.getSubslice(blob, 32).toBytes()); + } + + function get( + uint256 tableId, + IStore store, + uint256 routeId + ) internal view returns (string memory) { + bytes32[] memory keyTuple = new bytes32[](1); + keyTuple[0] = bytes32(routeId); + bytes memory blob = store.getRecord(tableId, keyTuple); + return string(SliceLib.getSubslice(blob, 32).toBytes()); + } + + function has(uint256 tableId, uint256 routeId) internal view returns (bool) { + bytes32[] memory keyTuple = new bytes32[](1); + keyTuple[0] = bytes32(routeId); + bytes memory blob = StoreSwitch.getRecord(tableId, keyTuple); + return blob.length > 0; + } +} diff --git a/packages/world/src/schemas/SystemRouteSchema.sol b/packages/world/src/schemas/SystemRouteSchema.sol new file mode 100644 index 0000000000..55384fc66d --- /dev/null +++ b/packages/world/src/schemas/SystemRouteSchema.sol @@ -0,0 +1,71 @@ +// SPDX-License-Identifier: MIT +pragma solidity >=0.8.0; + +import { console } from "forge-std/console.sol"; +import { IStore } from "@latticexyz/store/src/IStore.sol"; +import { StoreSwitch } from "@latticexyz/store/src/StoreSwitch.sol"; +import { StoreCore } from "@latticexyz/store/src/StoreCore.sol"; +import { SchemaType } from "@latticexyz/store/src/Types.sol"; +import { Bytes } from "@latticexyz/store/src/Bytes.sol"; +import { Schema, SchemaLib } from "@latticexyz/store/src/Schema.sol"; +import { PackedCounter, PackedCounterLib } from "@latticexyz/store/src/PackedCounter.sol"; + +// -- User defined schema and tableId -- +struct SystemRouteSchema { + uint256 value; +} + +// -- Autogenerated library to interact with tables with this schema -- +// TODO: autogenerate + +library SystemRouteSchemaLib { + /** Get the table's schema */ + function getSchema() internal pure returns (Schema schema) { + schema = SchemaLib.encode(SchemaType.UINT256); + } + + /** Register the table's schema */ + function registerSchema(uint256 tableId) internal { + StoreSwitch.registerSchema(tableId, getSchema()); + } + + function registerSchema(uint256 tableId, IStore store) internal { + store.registerSchema(tableId, getSchema()); + } + + /** Set the table's data */ + function set( + uint256 tableId, + address system, + uint256 value + ) internal { + bytes32[] memory keyTuple = new bytes32[](1); + keyTuple[0] = bytes20(system); + StoreSwitch.setField(tableId, keyTuple, 0, abi.encodePacked(value)); + } + + /** Get the table's data */ + function get(uint256 tableId, address system) internal view returns (uint256) { + bytes32[] memory keyTuple = new bytes32[](1); + keyTuple[0] = bytes20(system); + bytes memory blob = StoreSwitch.getRecord(tableId, keyTuple); + return uint256(bytes32(blob)); + } + + function get( + uint256 tableId, + IStore store, + address system + ) internal view returns (uint256) { + bytes32[] memory keyTuple = new bytes32[](1); + keyTuple[0] = bytes20(system); + bytes memory blob = store.getRecord(tableId, keyTuple); + return uint256(bytes32(blob)); + } + + function has(uint256 tableId, address system) internal view returns (bool) { + bytes32[] memory keyTuple = new bytes32[](1); + keyTuple[0] = bytes20(system); + return bytes32(StoreSwitch.getRecord(tableId, keyTuple)) != 0; + } +} diff --git a/packages/world/src/schemas/SystemSchema.sol b/packages/world/src/schemas/SystemSchema.sol new file mode 100644 index 0000000000..2ab3a7c410 --- /dev/null +++ b/packages/world/src/schemas/SystemSchema.sol @@ -0,0 +1,78 @@ +// SPDX-License-Identifier: MIT +pragma solidity >=0.8.0; + +import { console } from "forge-std/console.sol"; +import { IStore } from "@latticexyz/store/src/IStore.sol"; +import { StoreSwitch } from "@latticexyz/store/src/StoreSwitch.sol"; +import { StoreCore } from "@latticexyz/store/src/StoreCore.sol"; +import { SchemaType } from "@latticexyz/store/src/Types.sol"; +import { Bytes } from "@latticexyz/store/src/Bytes.sol"; +import { Schema, SchemaLib } from "@latticexyz/store/src/Schema.sol"; +import { PackedCounter, PackedCounterLib } from "@latticexyz/store/src/PackedCounter.sol"; +import { SliceLib } from "@latticexyz/store/src/Slice.sol"; +import { bytes32ToBool } from "../Utils.sol"; + +// -- User defined schema and tableId -- +struct SystemSchema { + address system; + bool publicAccess; +} + +// -- Autogenerated library to interact with tables with this schema -- +// TODO: autogenerate + +library SystemSchemaLib { + /** Get the table's schema */ + function getSchema() internal pure returns (Schema schema) { + schema = SchemaLib.encode(SchemaType.BOOL, SchemaType.ADDRESS); + } + + /** Register the table's schema */ + function registerSchema(uint256 tableId) internal { + StoreSwitch.registerSchema(tableId, getSchema()); + } + + function registerSchema(uint256 tableId, IStore store) internal { + store.registerSchema(tableId, getSchema()); + } + + /** Set the table's data */ + function set( + uint256 tableId, + uint256 routeId, + SystemSchema memory value + ) internal { + set(tableId, routeId, value.system, value.publicAccess); + } + + function set( + uint256 tableId, + uint256 routeId, + address system, + bool publicAccess + ) internal { + bytes32[] memory keyTuple = new bytes32[](1); + keyTuple[0] = bytes32(routeId); + StoreSwitch.setRecord(tableId, keyTuple, abi.encodePacked(system, publicAccess)); + } + + function get(uint256 tableId, uint256 routeId) internal view returns (address system, bool publicAccess) { + bytes32[] memory keyTuple = new bytes32[](1); + keyTuple[0] = bytes32(routeId); + bytes memory blob = StoreSwitch.getRecord(tableId, keyTuple); + system = address(bytes20(blob)); + publicAccess = bytes32ToBool(SliceLib.getSubslice(blob, 20).toBytes32()); + } + + function get( + uint256 tableId, + IStore store, + uint256 routeId + ) internal view returns (address system, bool publicAccess) { + bytes32[] memory keyTuple = new bytes32[](1); + keyTuple[0] = bytes32(routeId); + bytes memory blob = store.getRecord(tableId, keyTuple); + system = address(bytes20(blob)); + publicAccess = bytes32ToBool(SliceLib.getSubslice(blob, 20).toBytes32()); + } +} diff --git a/packages/world/src/tables/RouteAccess.sol b/packages/world/src/tables/RouteAccess.sol new file mode 100644 index 0000000000..3ae21ffa2b --- /dev/null +++ b/packages/world/src/tables/RouteAccess.sol @@ -0,0 +1,97 @@ +// SPDX-License-Identifier: MIT +pragma solidity >=0.8.0; + +/* Autogenerated file. Do not edit manually. */ + +import { IStore } from "@latticexyz/store/src/IStore.sol"; +import { StoreSwitch } from "@latticexyz/store/src/StoreSwitch.sol"; +import { StoreCore } from "@latticexyz/store/src/StoreCore.sol"; +import { SchemaType } from "@latticexyz/store/src/Types.sol"; +import { Bytes } from "@latticexyz/store/src/Bytes.sol"; +import { SliceLib } from "@latticexyz/store/src/Slice.sol"; +import { EncodeArray } from "@latticexyz/store/src/tightcoder/EncodeArray.sol"; +import { Schema, SchemaLib } from "@latticexyz/store/src/Schema.sol"; +import { PackedCounter, PackedCounterLib } from "@latticexyz/store/src/PackedCounter.sol"; + +uint256 constant _tableId = uint256(keccak256("/world_internals/tables/RouteAccess")); +uint256 constant RouteAccessTableId = _tableId; + +library RouteAccess { + /** Get the table's schema */ + function getSchema() internal pure returns (Schema) { + SchemaType[] memory _schema = new SchemaType[](1); + _schema[0] = SchemaType.BOOL; + + return SchemaLib.encode(_schema); + } + + /** Register the table's schema */ + function registerSchema() internal { + StoreSwitch.registerSchema(_tableId, getSchema()); + } + + /** Register the table's schema for the specified store */ + function registerSchema(IStore _store) internal { + _store.registerSchema(_tableId, getSchema()); + } + + /** Get value */ + function get(uint256 routeId, address caller) internal view returns (bool value) { + bytes32[] memory _primaryKeys = new bytes32[](2); + + _primaryKeys[0] = bytes32(uint256(routeId)); + + _primaryKeys[1] = bytes32(bytes20(caller)); + + bytes memory _blob = StoreSwitch.getField(_tableId, _primaryKeys, 0); + return _toBool(uint8(Bytes.slice1(_blob, 0))); + } + + /** Get value from the specified store */ + function get( + IStore _store, + uint256 routeId, + address caller + ) internal view returns (bool value) { + bytes32[] memory _primaryKeys = new bytes32[](2); + + _primaryKeys[0] = bytes32(uint256(routeId)); + + _primaryKeys[1] = bytes32(bytes20(caller)); + + bytes memory _blob = _store.getField(_tableId, _primaryKeys, 0); + return _toBool(uint8(Bytes.slice1(_blob, 0))); + } + + /** Set value */ + function set( + uint256 routeId, + address caller, + bool value + ) internal { + bytes32[] memory _primaryKeys = new bytes32[](2); + + _primaryKeys[0] = bytes32(uint256(routeId)); + + _primaryKeys[1] = bytes32(bytes20(caller)); + + StoreSwitch.setField(_tableId, _primaryKeys, 0, abi.encodePacked(value)); + } + + /* Delete all data for given keys */ + function deleteRecord(uint256 routeId, address caller) internal { + bytes32[] memory _primaryKeys = new bytes32[](2); + + _primaryKeys[0] = bytes32(uint256(routeId)); + + _primaryKeys[1] = bytes32(bytes20(caller)); + + StoreSwitch.deleteRecord(_tableId, _primaryKeys); + } +} + +function _toBool(uint8 value) pure returns (bool result) { + assembly { + result := value + } +} diff --git a/packages/world/src/tables/RouteOwnerTable.sol b/packages/world/src/tables/RouteOwnerTable.sol new file mode 100644 index 0000000000..c0b7a92a50 --- /dev/null +++ b/packages/world/src/tables/RouteOwnerTable.sol @@ -0,0 +1,39 @@ +// SPDX-License-Identifier: MIT +pragma solidity >=0.8.0; + +import { console } from "forge-std/console.sol"; +import { IStore } from "@latticexyz/store/src/IStore.sol"; +import { SchemaType } from "@latticexyz/store/src/Types.sol"; +import { Schema } from "@latticexyz/store/src/Schema.sol"; +import { RouteOwnerSchemaLib as SchemaLib } from "../schemas/RouteOwnerSchema.sol"; + +// -- User defined schema and tableId -- +uint256 constant tableId = uint256(keccak256("mud.world.table.routeOwner")); + +// -- Autogenerated library to interact with tables with this schema -- +// TODO: autogenerate + +library RouteOwnerTable { + /** Register the table's schema */ + function registerSchema() internal { + SchemaLib.registerSchema(tableId); + } + + function registerSchema(IStore store) internal { + SchemaLib.registerSchema(tableId, store); + } + + /** Set the table's data */ + function set(uint256 routeId, address owner) internal { + SchemaLib.set(tableId, routeId, owner); + } + + /** Get the table's data */ + function get(uint256 routeId) internal view returns (address) { + return SchemaLib.get(tableId, routeId); + } + + function get(IStore store, uint256 routeId) internal view returns (address) { + return SchemaLib.get(tableId, store, routeId); + } +} diff --git a/packages/world/src/tables/RouteTable.sol b/packages/world/src/tables/RouteTable.sol new file mode 100644 index 0000000000..4cbb87510c --- /dev/null +++ b/packages/world/src/tables/RouteTable.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: MIT +pragma solidity >=0.8.0; + +import { console } from "forge-std/console.sol"; +import { IStore } from "@latticexyz/store/src/IStore.sol"; +import { SchemaType } from "@latticexyz/store/src/Types.sol"; +import { Schema } from "@latticexyz/store/src/Schema.sol"; +import { RouteSchemaLib as SchemaLib } from "../schemas/RouteSchema.sol"; + +// -- User defined schema and tableId -- +uint256 constant tableId = uint256(keccak256("mud.world.table.route")); + +// -- Autogenerated library to interact with tables with this schema -- +// TODO: autogenerate + +library RouteTable { + /** Register the table's schema */ + function registerSchema() internal { + SchemaLib.registerSchema(tableId); + } + + function registerSchema(IStore store) internal { + SchemaLib.registerSchema(tableId, store); + } + + /** Set the table's data */ + function set(uint256 routeId, string memory route) internal { + SchemaLib.set(tableId, routeId, route); + } + + /** Get the table's data */ + function get(uint256 key) internal view returns (string memory) { + return SchemaLib.get(tableId, key); + } + + function get(IStore store, uint256 key) internal view returns (string memory) { + return SchemaLib.get(tableId, store, key); + } + + function has(uint256 key) internal view returns (bool) { + return SchemaLib.has(tableId, key); + } +} diff --git a/packages/world/src/tables/SystemRouteTable.sol b/packages/world/src/tables/SystemRouteTable.sol new file mode 100644 index 0000000000..882c967d78 --- /dev/null +++ b/packages/world/src/tables/SystemRouteTable.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: MIT +pragma solidity >=0.8.0; + +import { console } from "forge-std/console.sol"; +import { IStore } from "@latticexyz/store/src/IStore.sol"; +import { SchemaType } from "@latticexyz/store/src/Types.sol"; +import { Schema } from "@latticexyz/store/src/Schema.sol"; +import { SystemRouteSchemaLib as SchemaLib } from "../schemas/SystemRouteSchema.sol"; + +// -- User defined schema and tableId -- +uint256 constant tableId = uint256(keccak256("mud.world.table.systemRoute")); + +// -- Autogenerated library to interact with tables with this schema -- +// TODO: autogenerate + +library SystemRouteTable { + /** Register the table's schema */ + function registerSchema() internal { + SchemaLib.registerSchema(tableId); + } + + function registerSchema(IStore store) internal { + SchemaLib.registerSchema(tableId, store); + } + + /** Set the table's data */ + function set(address system, uint256 routeId) internal { + SchemaLib.set(tableId, system, routeId); + } + + /** Get the table's data */ + function get(address system) internal view returns (uint256) { + return SchemaLib.get(tableId, system); + } + + function get(IStore store, address system) internal view returns (uint256) { + return SchemaLib.get(tableId, store, system); + } + + function has(address system) internal view returns (bool) { + return SchemaLib.has(tableId, system); + } +} diff --git a/packages/world/src/tables/SystemTable.sol b/packages/world/src/tables/SystemTable.sol new file mode 100644 index 0000000000..46591206ba --- /dev/null +++ b/packages/world/src/tables/SystemTable.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: MIT +pragma solidity >=0.8.0; + +import { console } from "forge-std/console.sol"; +import { IStore } from "@latticexyz/store/src/IStore.sol"; +import { SchemaType } from "@latticexyz/store/src/Types.sol"; +import { Schema } from "@latticexyz/store/src/Schema.sol"; +import { SystemSchemaLib as SchemaLib } from "../schemas/SystemSchema.sol"; + +// -- User defined schema and tableId -- +uint256 constant tableId = uint256(keccak256("mud.world.table.system")); + +// -- Autogenerated library to interact with tables with this schema -- +// TODO: autogenerate + +library SystemTable { + /** Register the table's schema */ + function registerSchema() internal { + SchemaLib.registerSchema(tableId); + } + + function registerSchema(IStore store) internal { + SchemaLib.registerSchema(tableId, store); + } + + /** Set the table's data */ + function set( + uint256 routeId, + address system, + bool publicAccess + ) internal { + SchemaLib.set(tableId, routeId, system, publicAccess); + } + + /** Get the table's data */ + function get(uint256 routeId) internal view returns (address, bool) { + return SchemaLib.get(tableId, routeId); + } + + function get(IStore store, uint256 routeId) internal view returns (address, bool) { + return SchemaLib.get(tableId, store, routeId); + } +} diff --git a/packages/world/tasks/compile.ts b/packages/world/tasks/compile.ts new file mode 100644 index 0000000000..65335021b4 --- /dev/null +++ b/packages/world/tasks/compile.ts @@ -0,0 +1,38 @@ +import { TASK_COMPILE_SOLIDITY } from "hardhat/builtin-tasks/task-names"; +import * as fs from "fs"; +import * as path from "path"; +import { subtask } from "hardhat/config"; + +subtask(TASK_COMPILE_SOLIDITY).setAction(async (_: { force: boolean; quiet: boolean }, { config }, runSuper) => { + console.log("Symlinking forge-style libraries"); + const symlinks: string[] = []; + const remappings = fs + .readFileSync("remappings.txt") + .toString() + .split("\n") + .filter((r) => r.length > 0) + .map((r) => r.split("=")); + + console.log("remappings", remappings); + for (const [library, libraryPath] of remappings) { + const symlinkPath = path.join(process.cwd(), library.replace("/", "")); + console.log("Adding symlink at path: " + symlinkPath); + if (fs.existsSync(symlinkPath)) { + console.warn("symlink already exists!"); + } else { + const libPath = path.join(config.paths.sources, "..", libraryPath); + fs.symlinkSync(libPath, symlinkPath, "dir"); + } + symlinks.push(symlinkPath); + } + try { + await runSuper(); + } catch (e) { + console.error(e); + } finally { + for (const symlink of symlinks) { + console.log("Removing symlink at path: " + symlink); + fs.unlinkSync(symlink); + } + } +}); diff --git a/packages/world/test/System.t.sol b/packages/world/test/System.t.sol new file mode 100644 index 0000000000..01b8a4abcf --- /dev/null +++ b/packages/world/test/System.t.sol @@ -0,0 +1,25 @@ +// SPDX-License-Identifier: MIT +pragma solidity >=0.8.0; + +import "forge-std/Test.sol"; +import { World } from "../src/World.sol"; +import { System } from "../src/System.sol"; + +contract TestSystem is System { + function msgSender() public pure returns (address) { + return _msgSender(); + } +} + +contract SystemTest is Test { + TestSystem internal system; + + function setUp() public { + system = new TestSystem(); + } + + function testCallSystem() public { + (, bytes memory data) = address(system).call(abi.encodeWithSignature("msgSender()", address(this))); + assertEq(address(uint160(uint256(bytes32(data)))), address(this)); + } +} diff --git a/packages/world/test/World.t.sol b/packages/world/test/World.t.sol new file mode 100644 index 0000000000..609e59692d --- /dev/null +++ b/packages/world/test/World.t.sol @@ -0,0 +1,547 @@ +// SPDX-License-Identifier: MIT +pragma solidity >=0.8.0; + +import "forge-std/Test.sol"; +import { IStoreHook } from "@latticexyz/store/src/IStore.sol"; +import { StoreCore } from "@latticexyz/store/src/StoreCore.sol"; +import { StoreSwitch } from "@latticexyz/store/src/StoreSwitch.sol"; + +import { World, _isRoute, _isSingleLevelRoute } from "../src/World.sol"; +import { System } from "../src/System.sol"; +import { RouteOwnerTable } from "../src/tables/RouteOwnerTable.sol"; +import { RouteAccess } from "../src/tables/RouteAccess.sol"; +import { SystemTable } from "../src/tables/SystemTable.sol"; +import { BoolSchemaLib } from "../src/schemas/Bool.sol"; + +struct WorldTestSystemReturn { + address sender; + bytes32 input; +} + +contract WorldTestSystem is System { + error WorldTestSystemError(string err); + event WorldTestSystemLog(string log); + + function msgSender() public pure returns (address) { + return _msgSender(); + } + + function echo(bytes32 input) public pure returns (WorldTestSystemReturn memory) { + return WorldTestSystemReturn(_msgSender(), input); + } + + function err(string memory input) public pure { + revert WorldTestSystemError(input); + } + + function delegateCallSubSystem(address subSystem, bytes memory funcSelectorAndCalldata) + public + returns (bytes memory) + { + (bool success, bytes memory returndata) = subSystem.delegatecall(funcSelectorAndCalldata); + if (!success) { + assembly { + revert(add(32, returndata), mload(returndata)) + } + } + return returndata; + } + + function writeData( + string calldata accessRoute, + string calldata subRoute, + bool data + ) public { + bytes32[] memory key = new bytes32[](1); + key[0] = "testKey"; + + if (StoreSwitch.isDelegateCall()) { + uint256 tableId = uint256(uint256(keccak256(abi.encodePacked(accessRoute, subRoute)))); + StoreCore.setRecord(tableId, key, abi.encodePacked(data)); + } else { + World(msg.sender).setRecord(accessRoute, subRoute, key, abi.encodePacked(data)); + } + } + + function emitCallType() public { + if (StoreSwitch.isDelegateCall()) { + emit WorldTestSystemLog("delegatecall"); + } else { + emit WorldTestSystemLog("call"); + } + } +} + +contract WorldTestTableHook is IStoreHook { + event HookCalled(bytes data); + + function onSetRecord( + uint256 table, + bytes32[] memory key, + bytes memory data + ) public { + emit HookCalled(abi.encode(table, key, data)); + } + + function onSetField( + uint256 table, + bytes32[] memory key, + uint8 schemaIndex, + bytes memory data + ) public { + emit HookCalled(abi.encode(table, key, schemaIndex, data)); + } + + function onDeleteRecord(uint256 table, bytes32[] memory key) public { + emit HookCalled(abi.encode(table, key)); + } +} + +contract WorldTest is Test { + event HookCalled(bytes data); + event WorldTestSystemLog(string log); + + World world; + + function setUp() public { + world = new World(); + } + + function testConstructor() public { + // Owner of root route should be the creator of the World + address rootOwner = RouteOwnerTable.get(world, uint256(uint256(keccak256("")))); + assertEq(rootOwner, address(this)); + } + + function testIsStore() public view { + world.isStore(); + } + + function testIsRoute() public { + // !gasreport validate route (empty string) + assertTrue(_isRoute(""), "empty string"); + + // !gasreport validate route (single slash) + assertFalse(_isRoute("/"), "single slash"); + + // !gasreport validate route (single character) + assertTrue(_isRoute("/a"), "single character"); + + // !gasreport validate route (single level) + assertTrue(_isRoute("/topLevel"), "single level"); + + // !gasreport validate route (multi level) + assertTrue(_isRoute("/topLevel/subLevel"), "multi level"); + + // !gasreport validate route (no leading slash) + assertFalse(_isRoute("noLeadingSlash"), "no leading slash"); + } + + function testIsSingleLevelRoute() public { + // !gasreport validate single level route (empty string) + assertTrue(_isSingleLevelRoute(""), "empty string"); + + // !gasreport validate single level route (single slash) + assertFalse(_isSingleLevelRoute("/"), "single slash"); + + // !gasreport validate route (single character) + assertTrue(_isRoute("/a"), "single character"); + + // !gasreport validate single level route (single level) + assertTrue(_isSingleLevelRoute("/topLevel"), "single level"); + + // !gasreport validate single level route (multi level) + assertFalse(_isSingleLevelRoute("/topLevel/subLevel"), "multi level"); + + // !gasreport validate single level route (no leading slash) + assertFalse(_isSingleLevelRoute("noLeadingSlash"), "no leading slash"); + + // !gasreport validate single level route (no leading slash but contains slash) + assertFalse(_isSingleLevelRoute("noLeadingSlash/butContainsSlash"), "no leading slash"); + } + + function testRegisterRoute() public { + // Register a new route (by extending the root route) + world.registerRoute("", "/test"); + + // Owner of the new route should be the caller of the method + address routeOwner = RouteOwnerTable.get(world, uint256(keccak256("/test"))); + assertEq(routeOwner, address(this)); + + // The new route should be accessible by the caller + assertTrue(RouteAccess.get({ _store: world, routeId: uint256(keccak256("/test")), caller: address(this) })); + + // The new route should not be accessible by another address + assertFalse(RouteAccess.get({ _store: world, routeId: uint256(keccak256("/test")), caller: address(0x01) })); + + // Expect an error when registering an existing route + vm.expectRevert(abi.encodeWithSelector(World.RouteExists.selector, "/test")); + world.registerRoute("", "/test"); + + // TODO: Expect an error when registering an invalid route + // vm.expectRevert(abi.encodeWithSelector(World.RouteInvalid.selector, "invalid/route")); + // world.registerRoute("", "invalid/route"); + + // Expect an error when extending a route that doesn't exist + vm.expectRevert(abi.encodeWithSelector(World.RouteInvalid.selector, "/invalid")); + world.registerRoute("/invalid", "/test"); + } + + function testRegisterTable() public { + uint256 tableId = world.registerTable("", "/testRouteAccess", RouteAccess.getSchema()); + + // Expect the table to be registered + assertEq(world.getSchema(tableId).unwrap(), RouteAccess.getSchema().unwrap()); + + // Expect the table's route to be owned by the caller + address routeOwner = RouteOwnerTable.get(world, tableId); + assertEq(routeOwner, address(this)); + + // The new table should be accessible by the caller + assertTrue(RouteAccess.get({ _store: world, routeId: tableId, caller: address(this) })); + + // The new table should not be accessible by another address + assertFalse(RouteAccess.get({ _store: world, routeId: tableId, caller: address(0x01) })); + + // Expect an error when registering an existing table + vm.expectRevert(abi.encodeWithSelector(World.RouteExists.selector, "/testRouteAccess")); + world.registerTable("", "/testRouteAccess", RouteAccess.getSchema()); + + // Expect an error when registering an invalid table route + vm.expectRevert(abi.encodeWithSelector(World.RouteInvalid.selector, "invalid/route")); + world.registerTable("", "invalid/route", RouteAccess.getSchema()); + + // Expect an error when extending a route that doesn't exist + vm.expectRevert(abi.encodeWithSelector(World.RouteInvalid.selector, "/invalid")); + world.registerTable("/invalid", "/test", RouteAccess.getSchema()); + } + + function testRegisterSystem() public { + System system = new System(); + uint256 systemRouteId = world.registerSystem("", "/testSystem", system, false); + + // Expect the system to be registered + (address registeredAddress, bool publicAccess) = SystemTable.get(world, systemRouteId); + assertEq(registeredAddress, address(system)); + + // Expect the system route to be owned by the caller + address routeOwner = RouteOwnerTable.get(world, systemRouteId); + assertEq(routeOwner, address(this)); + + // Expect the system to not be publicly accessible + assertFalse(publicAccess); + + // Expect the system to be accessible by the caller + assertTrue(RouteAccess.get({ _store: world, routeId: systemRouteId, caller: address(this) })); + + // Expect the system to not be accessible by another address + assertFalse(RouteAccess.get({ _store: world, routeId: systemRouteId, caller: address(0x01) })); + + // Expect the system to have access to its own base route + assertTrue(RouteAccess.get({ _store: world, routeId: uint256(keccak256(bytes(""))), caller: address(system) })); + + // Expect an error when registering an existing system + vm.expectRevert(abi.encodeWithSelector(World.SystemExists.selector, address(system))); + world.registerSystem("", "/newRoute", system, true); + + // Expect an error when registering a system at an existing route + System newSystem = new System(); + vm.expectRevert(abi.encodeWithSelector(World.RouteExists.selector, "/testSystem")); + world.registerSystem("", "/testSystem", newSystem, true); + + // Expect an error when registering an invalid system route + System oneMoreSystem = new System(); + vm.expectRevert(abi.encodeWithSelector(World.RouteInvalid.selector, "invalid/route")); + world.registerSystem("", "invalid/route", oneMoreSystem, true); + + // Expect an error when extending a route that doesn't exist + System anotherSystem = new System(); + vm.expectRevert(abi.encodeWithSelector(World.RouteAccessDenied.selector, "/invalid", address(this))); + world.registerSystem("/invalid", "/test", anotherSystem, true); + + // Expect an error when registering a system at a route that is not owned by the caller + System yetAnotherSystem = new System(); + vm.startPrank(address(0x01)); + vm.expectRevert(abi.encodeWithSelector(World.RouteAccessDenied.selector, "", address(0x01))); + world.registerSystem("", "/rootSystem", yetAnotherSystem, true); + vm.stopPrank(); + } + + function testGrantAccess() public { + // TODO + } + + function testRetractAccess() public { + // TODO + } + + function testSetRecord() public { + // Register a new route + world.registerRoute("", "/testSetRecord"); + + // Register a new table + uint256 tableRouteId = world.registerTable("/testSetRecord", "/testTable", BoolSchemaLib.getSchema()); + + // Write data to the table + bytes32 key = keccak256("testKey"); + BoolSchemaLib.set({ store: world, tableId: tableRouteId, key: key, value: true }); + + // Expect the data to be written + assertTrue(BoolSchemaLib.get({ store: world, tableId: tableRouteId, key: key })); + + // Expect an error when trying to write from an address that doesn't have access + vm.startPrank(address(0x01)); + vm.expectRevert( + abi.encodeWithSelector(World.RouteAccessDenied.selector, "/testSetRecord/testTable", address(0x01)) + ); + BoolSchemaLib.set({ store: world, tableId: tableRouteId, key: key, value: true }); + vm.stopPrank(); + + // Expect to be able to write via the base route + bytes32[] memory keyTuple = new bytes32[](1); + keyTuple[0] = key; + world.setRecord("/testSetRecord", "/testTable", keyTuple, abi.encodePacked(false)); + assertFalse(BoolSchemaLib.get({ store: world, tableId: tableRouteId, key: key })); + + // Expect an error when trying to write from an address that doesn't have access to the base route + vm.startPrank(address(0x01)); + vm.expectRevert(abi.encodeWithSelector(World.RouteAccessDenied.selector, "/testSetRecord", address(0x01))); + world.setRecord("/testSetRecord", "/testTable", keyTuple, abi.encodePacked(false)); + vm.stopPrank(); + } + + function testSetField() public { + // Register a new route + world.registerRoute("", "/testSetField"); + + // Register a new table + uint256 tableRouteId = world.registerTable("/testSetField", "/testTable", BoolSchemaLib.getSchema()); + + bytes32 key = keccak256("testKey"); + bytes32[] memory keyTuple = new bytes32[](1); + keyTuple[0] = key; + + // Write data to the table via access route + world.setField("/testSetField", "/testTable", keyTuple, 0, abi.encodePacked(true)); + + // Expect the data to be written + assertTrue(BoolSchemaLib.get({ store: world, tableId: tableRouteId, key: key })); + + // Write data to the table via direct access + world.setField(tableRouteId, keyTuple, 0, abi.encodePacked(false)); + + // Expect the data to be written + assertFalse(BoolSchemaLib.get({ store: world, tableId: tableRouteId, key: key })); + + // Expect an error when trying to write from an address that doesn't have access + vm.startPrank(address(0x01)); + vm.expectRevert(abi.encodeWithSelector(World.RouteAccessDenied.selector, "/testSetField", address(0x01))); + world.setField("/testSetField", "/testTable", keyTuple, 0, abi.encodePacked(true)); + vm.stopPrank(); + + // Expect an error when trying to write from an address that doesn't have direct access + vm.startPrank(address(0x02)); + vm.expectRevert(abi.encodeWithSelector(World.RouteAccessDenied.selector, "/testSetField/testTable", address(0x02))); + world.setField(tableRouteId, keyTuple, 0, abi.encodePacked(true)); + vm.stopPrank(); + } + + function testDeleteRecord() public { + // Register a new route + world.registerRoute("", "/testDeleteRecord"); + + // Register a new table + uint256 tableRouteId = world.registerTable("/testDeleteRecord", "/testTable", BoolSchemaLib.getSchema()); + + bytes32 key = keccak256("testKey"); + bytes32[] memory keyTuple = new bytes32[](1); + keyTuple[0] = key; + + // Write data to the table via the access route and expect it to be written + world.setRecord("/testDeleteRecord", "/testTable", keyTuple, abi.encodePacked(true)); + assertTrue(BoolSchemaLib.get({ store: world, tableId: tableRouteId, key: key })); + + // Delete the record via the access route and expect it to be deleted + world.deleteRecord("/testDeleteRecord", "/testTable", keyTuple); + assertFalse(BoolSchemaLib.get({ store: world, tableId: tableRouteId, key: key })); + + // Write data to the table via the access route and expect it to be written + world.setRecord("/testDeleteRecord", "/testTable", keyTuple, abi.encodePacked(true)); + assertTrue(BoolSchemaLib.get({ store: world, tableId: tableRouteId, key: key })); + + // Delete the record via direct access and expect it to be deleted + world.deleteRecord(tableRouteId, keyTuple); + assertFalse(BoolSchemaLib.get({ store: world, tableId: tableRouteId, key: key })); + + // Write data to the table via the access route and expect it to be written + world.setRecord("/testDeleteRecord", "/testTable", keyTuple, abi.encodePacked(true)); + assertTrue(BoolSchemaLib.get({ store: world, tableId: tableRouteId, key: key })); + + // Expect an error when trying to delete from an address that doesn't have access + vm.startPrank(address(0x01)); + vm.expectRevert(abi.encodeWithSelector(World.RouteAccessDenied.selector, "/testDeleteRecord", address(0x01))); + world.deleteRecord("/testDeleteRecord", "/testTable", keyTuple); + vm.stopPrank(); + + // Expect an error when trying to delete from an address that doesn't have direct access + vm.startPrank(address(0x02)); + vm.expectRevert( + abi.encodeWithSelector(World.RouteAccessDenied.selector, "/testDeleteRecord/testTable", address(0x02)) + ); + world.deleteRecord(tableRouteId, keyTuple); + vm.stopPrank(); + } + + function testCall() public { + // Register a new system + WorldTestSystem system = new WorldTestSystem(); + world.registerSystem("", "/testSystem", system, false); + + // Call a system function without arguments via the World + bytes memory result = world.call("/testSystem", abi.encodeWithSelector(WorldTestSystem.msgSender.selector)); + // assertEq(result, address(this)); + + // Expect the system to have received the caller's address + assertEq(address(uint160(uint256(bytes32(result)))), address(this)); + + // Call a system function with arguments via the World + result = world.call("/testSystem", abi.encodeWithSelector(WorldTestSystem.echo.selector, bytes32(uint256(0x123)))); + + // Expect the return data to be decodable as a tuple + (address returnedAddress, bytes32 returnedBytes32) = abi.decode(result, (address, bytes32)); + assertEq(returnedAddress, address(this)); + assertEq(returnedBytes32, bytes32(uint256(0x123))); + + // Expect the return data to be decodable as a tuple + WorldTestSystemReturn memory returnStruct = abi.decode(result, (WorldTestSystemReturn)); + assertEq(returnStruct.sender, address(this)); + assertEq(returnStruct.input, bytes32(uint256(0x123))); + + // Expect an error when trying to call a private system from an address that doesn't have access + vm.startPrank(address(0x01)); + vm.expectRevert(abi.encodeWithSelector(World.RouteAccessDenied.selector, "/testSystem", address(0x01))); + world.call("/testSystem", abi.encodeWithSelector(WorldTestSystem.msgSender.selector)); + vm.stopPrank(); + + // Expect errors from the system to be forwarded + vm.expectRevert(abi.encodeWithSelector(WorldTestSystem.WorldTestSystemError.selector, "test error")); + world.call("/testSystem", abi.encodeWithSelector(WorldTestSystem.err.selector, "test error")); + + // Register a system at a subroute + WorldTestSystem subSystem = new WorldTestSystem(); + world.registerSystem("/testSystem", "/testSubSystem", subSystem, false); + + // Call the subsystem via the World (with access to the base route) + returnedAddress = abi.decode( + world.call("/testSystem", "/testSubSystem", abi.encodeWithSelector(WorldTestSystem.msgSender.selector)), + (address) + ); + assertEq(returnedAddress, address(this)); + + // Call the subsystem via delegatecall from the system + // (Note: just for testing purposes, in reality systems can call subsystems directly instead of via two indirections like here) + bytes memory nestedReturndata = world.call( + "/testSystem", + abi.encodeWithSelector( + WorldTestSystem.delegateCallSubSystem.selector, // Function in system + address(subSystem), // Address of subsystem + abi.encodePacked(WorldTestSystem.msgSender.selector, address(this)) // Function in subsystem + ) + ); + + returnedAddress = abi.decode(abi.decode(nestedReturndata, (bytes)), (address)); + assertEq(returnedAddress, address(this), "subsystem returned wrong address"); + } + + function testRegisterTableHook() public { + // Register a new table + uint256 tableId = world.registerTable("", "/testTable", BoolSchemaLib.getSchema()); + + // Register a new hook + IStoreHook tableHook = new WorldTestTableHook(); + world.registerTableHook("/testTable", tableHook); + + // Prepare data to write to the table + bytes32[] memory key = new bytes32[](1); + key[0] = "someKey"; + bytes memory value = abi.encodePacked(true); + + // Expect the hook to be notified when a record is written + vm.expectEmit(true, true, true, true); + emit HookCalled(abi.encode(tableId, key, value)); + world.setRecord(tableId, key, value); + } + + function testRegisterSystemHook() public view { + // TODO + } + + function testWriteRootSystem() public { + // Register a new table + uint256 tableId = world.registerTable("", "/testTable", BoolSchemaLib.getSchema()); + + // Register a new system + WorldTestSystem system = new WorldTestSystem(); + world.registerSystem("", "/testSystem", system, false); + + // Call a system function that write data to the World + world.call("/testSystem", abi.encodeWithSelector(WorldTestSystem.writeData.selector, "", "/testTable", true)); + + // Expect the data to be written + assertTrue(BoolSchemaLib.get(tableId, world, "testKey")); + } + + function testWriteAutonomousSystem() public { + // Register a new subroute + world.registerRoute("", "/testRoute"); + + // Register a new table + uint256 tableId = world.registerTable("/testRoute", "/testTable", BoolSchemaLib.getSchema()); + + // Register a new system + WorldTestSystem system = new WorldTestSystem(); + world.registerSystem("/testRoute", "/testSystem", system, false); + + // Call a system function that writes data to the World + world.call( + "/testRoute/testSystem", + abi.encodeWithSelector(WorldTestSystem.writeData.selector, "/testRoute", "/testTable", true) + ); + + // Expect the data to be written + assertTrue(BoolSchemaLib.get(tableId, world, "testKey")); + } + + function testDelegatecallRootSystem() public { + // Register a new root system + WorldTestSystem system = new WorldTestSystem(); + world.registerSystem("", "/testSystem", system, false); + + // Call the root sysyem + vm.expectEmit(true, true, true, true); + emit WorldTestSystemLog("delegatecall"); + world.call("/testSystem", abi.encodeWithSelector(WorldTestSystem.emitCallType.selector)); + } + + function testCallAutonomousSystem() public { + world.registerRoute("", "/testRoute"); + + // Register a new non-root system + WorldTestSystem system = new WorldTestSystem(); + world.registerSystem("/testRoute", "/testSystem", system, false); + + // Call the root sysyem + vm.expectEmit(true, true, true, true); + emit WorldTestSystemLog("call"); + world.call("/testRoute/testSystem", abi.encodeWithSelector(WorldTestSystem.emitCallType.selector)); + } + + // TODO: add a test for systems writing to tables via the World + // (see https://github.com/latticexyz/mud/issues/444) + + function testHashEquality() public { + // bytes32 h1 = uint256(keccak256("testHashEquality")); + // bytes32 h2 = uint256(keccak256(abi.encodePacked(bytes32("testHashEquality")))); + // assertEq(h1, h2); + } +} diff --git a/packages/world/tsconfig.json b/packages/world/tsconfig.json new file mode 100644 index 0000000000..56dd7ad152 --- /dev/null +++ b/packages/world/tsconfig.json @@ -0,0 +1,9 @@ +{ + "compilerOptions": { + /* Visit https://aka.ms/tsconfig.json to read more about this file */ + "target": "es2019", + "moduleResolution": "node", + "types": ["mocha"], + "esModuleInterop": true + } +} diff --git a/packages/world/yarn.lock b/packages/world/yarn.lock new file mode 100644 index 0000000000..59f8b2244e --- /dev/null +++ b/packages/world/yarn.lock @@ -0,0 +1,3309 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@babel/code-frame@^7.0.0": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.18.6.tgz#3b25d38c89600baa2dcc219edfa88a74eb2c427a" + integrity sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q== + dependencies: + "@babel/highlight" "^7.18.6" + +"@babel/helper-validator-identifier@^7.18.6": + version "7.19.1" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.19.1.tgz#7eea834cf32901ffdc1a7ee555e2f9c27e249ca2" + integrity sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w== + +"@babel/highlight@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.18.6.tgz#81158601e93e2563795adcbfbdf5d64be3f2ecdf" + integrity sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g== + dependencies: + "@babel/helper-validator-identifier" "^7.18.6" + chalk "^2.0.0" + js-tokens "^4.0.0" + +"@cspotcode/source-map-consumer@0.8.0": + version "0.8.0" + resolved "https://registry.yarnpkg.com/@cspotcode/source-map-consumer/-/source-map-consumer-0.8.0.tgz#33bf4b7b39c178821606f669bbc447a6a629786b" + integrity sha512-41qniHzTU8yAGbCp04ohlmSrZf8bkf/iJsl3V0dRGsQN/5GFfx+LbCSsCpp2gqrqjTVg/K6O8ycoV35JIwAzAg== + +"@cspotcode/source-map-support@0.7.0": + version "0.7.0" + resolved "https://registry.yarnpkg.com/@cspotcode/source-map-support/-/source-map-support-0.7.0.tgz#4789840aa859e46d2f3173727ab707c66bf344f5" + integrity sha512-X4xqRHqN8ACt2aHVe51OxeA2HjbcL4MqFqXkrmQszJ1NOUuUu5u6Vqx/0lZSVNku7velL5FC/s5uEAj1lsBMhA== + dependencies: + "@cspotcode/source-map-consumer" "0.8.0" + +"@ethersproject/abi@^5.1.2": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/abi/-/abi-5.7.0.tgz#b3f3e045bbbeed1af3947335c247ad625a44e449" + integrity sha512-351ktp42TiRcYB3H1OP8yajPeAQstMW/yCFokj/AthP9bLHzQFPlOrxOcwYEDkUAICmOHljvN4K39OMTMUa9RA== + dependencies: + "@ethersproject/address" "^5.7.0" + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/constants" "^5.7.0" + "@ethersproject/hash" "^5.7.0" + "@ethersproject/keccak256" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + "@ethersproject/strings" "^5.7.0" + +"@ethersproject/abstract-provider@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/abstract-provider/-/abstract-provider-5.7.0.tgz#b0a8550f88b6bf9d51f90e4795d48294630cb9ef" + integrity sha512-R41c9UkchKCpAqStMYUpdunjo3pkEvZC3FAwZn5S5MGbXoMQOHIdHItezTETxAO5bevtMApSyEhn9+CHcDsWBw== + dependencies: + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/networks" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + "@ethersproject/transactions" "^5.7.0" + "@ethersproject/web" "^5.7.0" + +"@ethersproject/abstract-signer@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/abstract-signer/-/abstract-signer-5.7.0.tgz#13f4f32117868452191a4649723cb086d2b596b2" + integrity sha512-a16V8bq1/Cz+TGCkE2OPMTOUDLS3grCpdjoJCYNnVBbdYEMSgKrU0+B90s8b6H+ByYTBZN7a3g76jdIJi7UfKQ== + dependencies: + "@ethersproject/abstract-provider" "^5.7.0" + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + +"@ethersproject/address@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/address/-/address-5.7.0.tgz#19b56c4d74a3b0a46bfdbb6cfcc0a153fc697f37" + integrity sha512-9wYhYt7aghVGo758POM5nqcOMaE168Q6aRLJZwUmiqSrAungkG74gSSeKEIR7ukixesdRZGPgVqme6vmxs1fkA== + dependencies: + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/keccak256" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/rlp" "^5.7.0" + +"@ethersproject/base64@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/base64/-/base64-5.7.0.tgz#ac4ee92aa36c1628173e221d0d01f53692059e1c" + integrity sha512-Dr8tcHt2mEbsZr/mwTPIQAf3Ai0Bks/7gTw9dSqk1mQvhW3XvRlmDJr/4n+wg1JmCl16NZue17CDh8xb/vZ0sQ== + dependencies: + "@ethersproject/bytes" "^5.7.0" + +"@ethersproject/bignumber@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/bignumber/-/bignumber-5.7.0.tgz#e2f03837f268ba655ffba03a57853e18a18dc9c2" + integrity sha512-n1CAdIHRWjSucQO3MC1zPSVgV/6dy/fjL9pMrPP9peL+QxEg9wOsVqwD4+818B6LUEtaXzVHQiuivzRoxPxUGw== + dependencies: + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + bn.js "^5.2.1" + +"@ethersproject/bytes@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/bytes/-/bytes-5.7.0.tgz#a00f6ea8d7e7534d6d87f47188af1148d71f155d" + integrity sha512-nsbxwgFXWh9NyYWo+U8atvmMsSdKJprTcICAkvbBffT75qDocbuggBU0SJiVK2MuTrp0q+xvLkTnGMPK1+uA9A== + dependencies: + "@ethersproject/logger" "^5.7.0" + +"@ethersproject/constants@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/constants/-/constants-5.7.0.tgz#df80a9705a7e08984161f09014ea012d1c75295e" + integrity sha512-DHI+y5dBNvkpYUMiRQyxRBYBefZkJfo70VUkUAsRjcPs47muV9evftfZ0PJVCXYbAiCgght0DtcF9srFQmIgWA== + dependencies: + "@ethersproject/bignumber" "^5.7.0" + +"@ethersproject/hash@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/hash/-/hash-5.7.0.tgz#eb7aca84a588508369562e16e514b539ba5240a7" + integrity sha512-qX5WrQfnah1EFnO5zJv1v46a8HW0+E5xuBBDTwMFZLuVTx0tbU2kkx15NqdjxecrLGatQN9FGQKpb1FKdHCt+g== + dependencies: + "@ethersproject/abstract-signer" "^5.7.0" + "@ethersproject/address" "^5.7.0" + "@ethersproject/base64" "^5.7.0" + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/keccak256" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + "@ethersproject/strings" "^5.7.0" + +"@ethersproject/keccak256@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/keccak256/-/keccak256-5.7.0.tgz#3186350c6e1cd6aba7940384ec7d6d9db01f335a" + integrity sha512-2UcPboeL/iW+pSg6vZ6ydF8tCnv3Iu/8tUmLLzWWGzxWKFFqOBQFLo6uLUv6BDrLgCDfN28RJ/wtByx+jZ4KBg== + dependencies: + "@ethersproject/bytes" "^5.7.0" + js-sha3 "0.8.0" + +"@ethersproject/logger@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/logger/-/logger-5.7.0.tgz#6ce9ae168e74fecf287be17062b590852c311892" + integrity sha512-0odtFdXu/XHtjQXJYA3u9G0G8btm0ND5Cu8M7i5vhEcE8/HmF4Lbdqanwyv4uQTr2tx6b7fQRmgLrsnpQlmnig== + +"@ethersproject/networks@^5.7.0": + version "5.7.1" + resolved "https://registry.yarnpkg.com/@ethersproject/networks/-/networks-5.7.1.tgz#118e1a981d757d45ccea6bb58d9fd3d9db14ead6" + integrity sha512-n/MufjFYv3yFcUyfhnXotyDlNdFb7onmkSy8aQERi2PjNcnWQ66xXxa3XlS8nCcA8aJKJjIIMNJTC7tu80GwpQ== + dependencies: + "@ethersproject/logger" "^5.7.0" + +"@ethersproject/properties@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/properties/-/properties-5.7.0.tgz#a6e12cb0439b878aaf470f1902a176033067ed30" + integrity sha512-J87jy8suntrAkIZtecpxEPxY//szqr1mlBaYlQ0r4RCaiD2hjheqF9s1LVE8vVuJCXisjIP+JgtK/Do54ej4Sw== + dependencies: + "@ethersproject/logger" "^5.7.0" + +"@ethersproject/rlp@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/rlp/-/rlp-5.7.0.tgz#de39e4d5918b9d74d46de93af80b7685a9c21304" + integrity sha512-rBxzX2vK8mVF7b0Tol44t5Tb8gomOHkj5guL+HhzQ1yBh/ydjGnpw6at+X6Iw0Kp3OzzzkcKp8N9r0W4kYSs9w== + dependencies: + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + +"@ethersproject/signing-key@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/signing-key/-/signing-key-5.7.0.tgz#06b2df39411b00bc57c7c09b01d1e41cf1b16ab3" + integrity sha512-MZdy2nL3wO0u7gkB4nA/pEf8lu1TlFswPNmy8AiYkfKTdO6eXBJyUdmHO/ehm/htHw9K/qF8ujnTyUAD+Ry54Q== + dependencies: + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + bn.js "^5.2.1" + elliptic "6.5.4" + hash.js "1.1.7" + +"@ethersproject/strings@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/strings/-/strings-5.7.0.tgz#54c9d2a7c57ae8f1205c88a9d3a56471e14d5ed2" + integrity sha512-/9nu+lj0YswRNSH0NXYqrh8775XNyEdUQAuf3f+SmOrnVewcJ5SBNAjF7lpgehKi4abvNNXyf+HX86czCdJ8Mg== + dependencies: + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/constants" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + +"@ethersproject/transactions@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/transactions/-/transactions-5.7.0.tgz#91318fc24063e057885a6af13fdb703e1f993d3b" + integrity sha512-kmcNicCp1lp8qanMTC3RIikGgoJ80ztTyvtsFvCYpSCfkjhD0jZ2LOrnbcuxuToLIUYYf+4XwD1rP+B/erDIhQ== + dependencies: + "@ethersproject/address" "^5.7.0" + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/constants" "^5.7.0" + "@ethersproject/keccak256" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + "@ethersproject/rlp" "^5.7.0" + "@ethersproject/signing-key" "^5.7.0" + +"@ethersproject/web@^5.7.0": + version "5.7.1" + resolved "https://registry.yarnpkg.com/@ethersproject/web/-/web-5.7.1.tgz#de1f285b373149bee5928f4eb7bcb87ee5fbb4ae" + integrity sha512-Gueu8lSvyjBWL4cYsWsjh6MtMwM0+H4HvqFPZfB6dV8ctbP9zFAO73VG1cMWae0FLPCtz0peKPpZY8/ugJJX2w== + dependencies: + "@ethersproject/base64" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + "@ethersproject/strings" "^5.7.0" + +"@metamask/eth-sig-util@^4.0.0": + version "4.0.1" + resolved "https://registry.yarnpkg.com/@metamask/eth-sig-util/-/eth-sig-util-4.0.1.tgz#3ad61f6ea9ad73ba5b19db780d40d9aae5157088" + integrity sha512-tghyZKLHZjcdlDqCA3gNZmLeR0XvOE9U1qoQO9ohyAZT6Pya+H9vkBPcsyXytmYLNgVoin7CKCmweo/R43V+tQ== + dependencies: + ethereumjs-abi "^0.6.8" + ethereumjs-util "^6.2.1" + ethjs-util "^0.1.6" + tweetnacl "^1.0.3" + tweetnacl-util "^0.15.1" + +"@morgan-stanley/ts-mocking-bird@^0.6.2": + version "0.6.4" + resolved "https://registry.yarnpkg.com/@morgan-stanley/ts-mocking-bird/-/ts-mocking-bird-0.6.4.tgz#2e4b60d42957bab3b50b67dbf14c3da2f62a39f7" + integrity sha512-57VJIflP8eR2xXa9cD1LUawh+Gh+BVQfVu0n6GALyg/AqV/Nz25kDRvws3i9kIe1PTrbsZZOYpsYp6bXPd6nVA== + dependencies: + lodash "^4.17.16" + uuid "^7.0.3" + +"@noble/hashes@1.1.2": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.1.2.tgz#e9e035b9b166ca0af657a7848eb2718f0f22f183" + integrity sha512-KYRCASVTv6aeUi1tsF8/vpyR7zpfs3FUzy2Jqm+MU+LmUKhQ0y2FpfwqkCcxSg2ua4GALJd8k2R76WxwZGbQpA== + +"@noble/hashes@~1.1.1": + version "1.1.5" + resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.1.5.tgz#1a0377f3b9020efe2fae03290bd2a12140c95c11" + integrity sha512-LTMZiiLc+V4v1Yi16TD6aX2gmtKszNye0pQgbaLqkvhIqP7nVsSaJsWloGQjJfJ8offaoP5GtX3yY5swbcJxxQ== + +"@noble/secp256k1@1.6.3", "@noble/secp256k1@~1.6.0": + version "1.6.3" + resolved "https://registry.yarnpkg.com/@noble/secp256k1/-/secp256k1-1.6.3.tgz#7eed12d9f4404b416999d0c87686836c4c5c9b94" + integrity sha512-T04e4iTurVy7I8Sw4+c5OSN9/RkPlo1uKxAomtxQNLq8j1uPAqnsqG1bqvY3Jv7c13gyr6dui0zmh/I3+f/JaQ== + +"@nomicfoundation/ethereumjs-block@^4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-block/-/ethereumjs-block-4.0.0.tgz#fdd5c045e7baa5169abeed0e1202bf94e4481c49" + integrity sha512-bk8uP8VuexLgyIZAHExH1QEovqx0Lzhc9Ntm63nCRKLHXIZkobaFaeCVwTESV7YkPKUk7NiK11s8ryed4CS9yA== + dependencies: + "@nomicfoundation/ethereumjs-common" "^3.0.0" + "@nomicfoundation/ethereumjs-rlp" "^4.0.0" + "@nomicfoundation/ethereumjs-trie" "^5.0.0" + "@nomicfoundation/ethereumjs-tx" "^4.0.0" + "@nomicfoundation/ethereumjs-util" "^8.0.0" + ethereum-cryptography "0.1.3" + +"@nomicfoundation/ethereumjs-blockchain@^6.0.0": + version "6.0.0" + resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-blockchain/-/ethereumjs-blockchain-6.0.0.tgz#1a8c243a46d4d3691631f139bfb3a4a157187b0c" + integrity sha512-pLFEoea6MWd81QQYSReLlLfH7N9v7lH66JC/NMPN848ySPPQA5renWnE7wPByfQFzNrPBuDDRFFULMDmj1C0xw== + dependencies: + "@nomicfoundation/ethereumjs-block" "^4.0.0" + "@nomicfoundation/ethereumjs-common" "^3.0.0" + "@nomicfoundation/ethereumjs-ethash" "^2.0.0" + "@nomicfoundation/ethereumjs-rlp" "^4.0.0" + "@nomicfoundation/ethereumjs-trie" "^5.0.0" + "@nomicfoundation/ethereumjs-util" "^8.0.0" + abstract-level "^1.0.3" + debug "^4.3.3" + ethereum-cryptography "0.1.3" + level "^8.0.0" + lru-cache "^5.1.1" + memory-level "^1.0.0" + +"@nomicfoundation/ethereumjs-common@^3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-common/-/ethereumjs-common-3.0.0.tgz#f6bcc7753994555e49ab3aa517fc8bcf89c280b9" + integrity sha512-WS7qSshQfxoZOpHG/XqlHEGRG1zmyjYrvmATvc4c62+gZXgre1ymYP8ZNgx/3FyZY0TWe9OjFlKOfLqmgOeYwA== + dependencies: + "@nomicfoundation/ethereumjs-util" "^8.0.0" + crc-32 "^1.2.0" + +"@nomicfoundation/ethereumjs-ethash@^2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-ethash/-/ethereumjs-ethash-2.0.0.tgz#11539c32fe0990e1122ff987d1b84cfa34774e81" + integrity sha512-WpDvnRncfDUuXdsAXlI4lXbqUDOA+adYRQaEezIkxqDkc+LDyYDbd/xairmY98GnQzo1zIqsIL6GB5MoMSJDew== + dependencies: + "@nomicfoundation/ethereumjs-block" "^4.0.0" + "@nomicfoundation/ethereumjs-rlp" "^4.0.0" + "@nomicfoundation/ethereumjs-util" "^8.0.0" + abstract-level "^1.0.3" + bigint-crypto-utils "^3.0.23" + ethereum-cryptography "0.1.3" + +"@nomicfoundation/ethereumjs-evm@^1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-evm/-/ethereumjs-evm-1.0.0.tgz#99cd173c03b59107c156a69c5e215409098a370b" + integrity sha512-hVS6qRo3V1PLKCO210UfcEQHvlG7GqR8iFzp0yyjTg2TmJQizcChKgWo8KFsdMw6AyoLgLhHGHw4HdlP8a4i+Q== + dependencies: + "@nomicfoundation/ethereumjs-common" "^3.0.0" + "@nomicfoundation/ethereumjs-util" "^8.0.0" + "@types/async-eventemitter" "^0.2.1" + async-eventemitter "^0.2.4" + debug "^4.3.3" + ethereum-cryptography "0.1.3" + mcl-wasm "^0.7.1" + rustbn.js "~0.2.0" + +"@nomicfoundation/ethereumjs-rlp@^4.0.0", "@nomicfoundation/ethereumjs-rlp@^4.0.0-beta.2": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-rlp/-/ethereumjs-rlp-4.0.0.tgz#d9a9c5f0f10310c8849b6525101de455a53e771d" + integrity sha512-GaSOGk5QbUk4eBP5qFbpXoZoZUj/NrW7MRa0tKY4Ew4c2HAS0GXArEMAamtFrkazp0BO4K5p2ZCG3b2FmbShmw== + +"@nomicfoundation/ethereumjs-statemanager@^1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-statemanager/-/ethereumjs-statemanager-1.0.0.tgz#14a9d4e1c828230368f7ab520c144c34d8721e4b" + integrity sha512-jCtqFjcd2QejtuAMjQzbil/4NHf5aAWxUc+CvS0JclQpl+7M0bxMofR2AJdtz+P3u0ke2euhYREDiE7iSO31vQ== + dependencies: + "@nomicfoundation/ethereumjs-common" "^3.0.0" + "@nomicfoundation/ethereumjs-rlp" "^4.0.0" + "@nomicfoundation/ethereumjs-trie" "^5.0.0" + "@nomicfoundation/ethereumjs-util" "^8.0.0" + debug "^4.3.3" + ethereum-cryptography "0.1.3" + functional-red-black-tree "^1.0.1" + +"@nomicfoundation/ethereumjs-trie@^5.0.0": + version "5.0.0" + resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-trie/-/ethereumjs-trie-5.0.0.tgz#dcfbe3be53a94bc061c9767a396c16702bc2f5b7" + integrity sha512-LIj5XdE+s+t6WSuq/ttegJzZ1vliwg6wlb+Y9f4RlBpuK35B9K02bO7xU+E6Rgg9RGptkWd6TVLdedTI4eNc2A== + dependencies: + "@nomicfoundation/ethereumjs-rlp" "^4.0.0" + "@nomicfoundation/ethereumjs-util" "^8.0.0" + ethereum-cryptography "0.1.3" + readable-stream "^3.6.0" + +"@nomicfoundation/ethereumjs-tx@^4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-tx/-/ethereumjs-tx-4.0.0.tgz#59dc7452b0862b30342966f7052ab9a1f7802f52" + integrity sha512-Gg3Lir2lNUck43Kp/3x6TfBNwcWC9Z1wYue9Nz3v4xjdcv6oDW9QSMJxqsKw9QEGoBBZ+gqwpW7+F05/rs/g1w== + dependencies: + "@nomicfoundation/ethereumjs-common" "^3.0.0" + "@nomicfoundation/ethereumjs-rlp" "^4.0.0" + "@nomicfoundation/ethereumjs-util" "^8.0.0" + ethereum-cryptography "0.1.3" + +"@nomicfoundation/ethereumjs-util@^8.0.0": + version "8.0.0" + resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-util/-/ethereumjs-util-8.0.0.tgz#deb2b15d2c308a731e82977aefc4e61ca0ece6c5" + integrity sha512-2emi0NJ/HmTG+CGY58fa+DQuAoroFeSH9gKu9O6JnwTtlzJtgfTixuoOqLEgyyzZVvwfIpRueuePb8TonL1y+A== + dependencies: + "@nomicfoundation/ethereumjs-rlp" "^4.0.0-beta.2" + ethereum-cryptography "0.1.3" + +"@nomicfoundation/ethereumjs-vm@^6.0.0": + version "6.0.0" + resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-vm/-/ethereumjs-vm-6.0.0.tgz#2bb50d332bf41790b01a3767ffec3987585d1de6" + integrity sha512-JMPxvPQ3fzD063Sg3Tp+UdwUkVxMoo1uML6KSzFhMH3hoQi/LMuXBoEHAoW83/vyNS9BxEe6jm6LmT5xdeEJ6w== + dependencies: + "@nomicfoundation/ethereumjs-block" "^4.0.0" + "@nomicfoundation/ethereumjs-blockchain" "^6.0.0" + "@nomicfoundation/ethereumjs-common" "^3.0.0" + "@nomicfoundation/ethereumjs-evm" "^1.0.0" + "@nomicfoundation/ethereumjs-rlp" "^4.0.0" + "@nomicfoundation/ethereumjs-statemanager" "^1.0.0" + "@nomicfoundation/ethereumjs-trie" "^5.0.0" + "@nomicfoundation/ethereumjs-tx" "^4.0.0" + "@nomicfoundation/ethereumjs-util" "^8.0.0" + "@types/async-eventemitter" "^0.2.1" + async-eventemitter "^0.2.4" + debug "^4.3.3" + ethereum-cryptography "0.1.3" + functional-red-black-tree "^1.0.1" + mcl-wasm "^0.7.1" + rustbn.js "~0.2.0" + +"@nomicfoundation/solidity-analyzer-darwin-arm64@0.1.0": + version "0.1.0" + resolved "https://registry.yarnpkg.com/@nomicfoundation/solidity-analyzer-darwin-arm64/-/solidity-analyzer-darwin-arm64-0.1.0.tgz#83a7367342bd053a76d04bbcf4f373fef07cf760" + integrity sha512-vEF3yKuuzfMHsZecHQcnkUrqm8mnTWfJeEVFHpg+cO+le96xQA4lAJYdUan8pXZohQxv1fSReQsn4QGNuBNuCw== + +"@nomicfoundation/solidity-analyzer-darwin-x64@0.1.0": + version "0.1.0" + resolved "https://registry.yarnpkg.com/@nomicfoundation/solidity-analyzer-darwin-x64/-/solidity-analyzer-darwin-x64-0.1.0.tgz#1225f7da647ae1ad25a87125664704ecc0af6ccc" + integrity sha512-dlHeIg0pTL4dB1l9JDwbi/JG6dHQaU1xpDK+ugYO8eJ1kxx9Dh2isEUtA4d02cQAl22cjOHTvifAk96A+ItEHA== + +"@nomicfoundation/solidity-analyzer-freebsd-x64@0.1.0": + version "0.1.0" + resolved "https://registry.yarnpkg.com/@nomicfoundation/solidity-analyzer-freebsd-x64/-/solidity-analyzer-freebsd-x64-0.1.0.tgz#dbc052dcdfd50ae50fd5ae1788b69b4e0fa40040" + integrity sha512-WFCZYMv86WowDA4GiJKnebMQRt3kCcFqHeIomW6NMyqiKqhK1kIZCxSLDYsxqlx396kKLPN1713Q1S8tu68GKg== + +"@nomicfoundation/solidity-analyzer-linux-arm64-gnu@0.1.0": + version "0.1.0" + resolved "https://registry.yarnpkg.com/@nomicfoundation/solidity-analyzer-linux-arm64-gnu/-/solidity-analyzer-linux-arm64-gnu-0.1.0.tgz#e6b2eea633995b557e74e881d2a43eab4760903d" + integrity sha512-DTw6MNQWWlCgc71Pq7CEhEqkb7fZnS7oly13pujs4cMH1sR0JzNk90Mp1zpSCsCs4oKan2ClhMlLKtNat/XRKQ== + +"@nomicfoundation/solidity-analyzer-linux-arm64-musl@0.1.0": + version "0.1.0" + resolved "https://registry.yarnpkg.com/@nomicfoundation/solidity-analyzer-linux-arm64-musl/-/solidity-analyzer-linux-arm64-musl-0.1.0.tgz#af81107f5afa794f19988a368647727806e18dc4" + integrity sha512-wUpUnR/3GV5Da88MhrxXh/lhb9kxh9V3Jya2NpBEhKDIRCDmtXMSqPMXHZmOR9DfCwCvG6vLFPr/+YrPCnUN0w== + +"@nomicfoundation/solidity-analyzer-linux-x64-gnu@0.1.0": + version "0.1.0" + resolved "https://registry.yarnpkg.com/@nomicfoundation/solidity-analyzer-linux-x64-gnu/-/solidity-analyzer-linux-x64-gnu-0.1.0.tgz#6877e1da1a06a9f08446070ab6e0a5347109f868" + integrity sha512-lR0AxK1x/MeKQ/3Pt923kPvwigmGX3OxeU5qNtQ9pj9iucgk4PzhbS3ruUeSpYhUxG50jN4RkIGwUMoev5lguw== + +"@nomicfoundation/solidity-analyzer-linux-x64-musl@0.1.0": + version "0.1.0" + resolved "https://registry.yarnpkg.com/@nomicfoundation/solidity-analyzer-linux-x64-musl/-/solidity-analyzer-linux-x64-musl-0.1.0.tgz#bb6cd83a0c259eccef4183796b6329a66cf7ebd9" + integrity sha512-A1he/8gy/JeBD3FKvmI6WUJrGrI5uWJNr5Xb9WdV+DK0F8msuOqpEByLlnTdLkXMwW7nSl3awvLezOs9xBHJEg== + +"@nomicfoundation/solidity-analyzer-win32-arm64-msvc@0.1.0": + version "0.1.0" + resolved "https://registry.yarnpkg.com/@nomicfoundation/solidity-analyzer-win32-arm64-msvc/-/solidity-analyzer-win32-arm64-msvc-0.1.0.tgz#9d4bca1cc9a1333fde985675083b0b7d165f6076" + integrity sha512-7x5SXZ9R9H4SluJZZP8XPN+ju7Mx+XeUMWZw7ZAqkdhP5mK19I4vz3x0zIWygmfE8RT7uQ5xMap0/9NPsO+ykw== + +"@nomicfoundation/solidity-analyzer-win32-ia32-msvc@0.1.0": + version "0.1.0" + resolved "https://registry.yarnpkg.com/@nomicfoundation/solidity-analyzer-win32-ia32-msvc/-/solidity-analyzer-win32-ia32-msvc-0.1.0.tgz#0db5bfc6aa952bea4098d8d2c8947b4e5c4337ee" + integrity sha512-m7w3xf+hnE774YRXu+2mGV7RiF3QJtUoiYU61FascCkQhX3QMQavh7saH/vzb2jN5D24nT/jwvaHYX/MAM9zUw== + +"@nomicfoundation/solidity-analyzer-win32-x64-msvc@0.1.0": + version "0.1.0" + resolved "https://registry.yarnpkg.com/@nomicfoundation/solidity-analyzer-win32-x64-msvc/-/solidity-analyzer-win32-x64-msvc-0.1.0.tgz#2e0f39a2924dcd77db6b419828595e984fabcb33" + integrity sha512-xCuybjY0sLJQnJhupiFAXaek2EqF0AP0eBjgzaalPXSNvCEN6ZYHvUzdA50ENDVeSYFXcUsYf3+FsD3XKaeptA== + +"@nomicfoundation/solidity-analyzer@^0.1.0": + version "0.1.0" + resolved "https://registry.yarnpkg.com/@nomicfoundation/solidity-analyzer/-/solidity-analyzer-0.1.0.tgz#e5ddc43ad5c0aab96e5054520d8e16212e125f50" + integrity sha512-xGWAiVCGOycvGiP/qrlf9f9eOn7fpNbyJygcB0P21a1MDuVPlKt0Srp7rvtBEutYQ48ouYnRXm33zlRnlTOPHg== + optionalDependencies: + "@nomicfoundation/solidity-analyzer-darwin-arm64" "0.1.0" + "@nomicfoundation/solidity-analyzer-darwin-x64" "0.1.0" + "@nomicfoundation/solidity-analyzer-freebsd-x64" "0.1.0" + "@nomicfoundation/solidity-analyzer-linux-arm64-gnu" "0.1.0" + "@nomicfoundation/solidity-analyzer-linux-arm64-musl" "0.1.0" + "@nomicfoundation/solidity-analyzer-linux-x64-gnu" "0.1.0" + "@nomicfoundation/solidity-analyzer-linux-x64-musl" "0.1.0" + "@nomicfoundation/solidity-analyzer-win32-arm64-msvc" "0.1.0" + "@nomicfoundation/solidity-analyzer-win32-ia32-msvc" "0.1.0" + "@nomicfoundation/solidity-analyzer-win32-x64-msvc" "0.1.0" + +"@scure/base@~1.1.0": + version "1.1.1" + resolved "https://registry.yarnpkg.com/@scure/base/-/base-1.1.1.tgz#ebb651ee52ff84f420097055f4bf46cfba403938" + integrity sha512-ZxOhsSyxYwLJj3pLZCefNitxsj093tb2vq90mp2txoYeBqbcjDjqFhyM8eUjq/uFm6zJ+mUuqxlS2FkuSY1MTA== + +"@scure/bip32@1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@scure/bip32/-/bip32-1.1.0.tgz#dea45875e7fbc720c2b4560325f1cf5d2246d95b" + integrity sha512-ftTW3kKX54YXLCxH6BB7oEEoJfoE2pIgw7MINKAs5PsS6nqKPuKk1haTF/EuHmYqG330t5GSrdmtRuHaY1a62Q== + dependencies: + "@noble/hashes" "~1.1.1" + "@noble/secp256k1" "~1.6.0" + "@scure/base" "~1.1.0" + +"@scure/bip39@1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@scure/bip39/-/bip39-1.1.0.tgz#92f11d095bae025f166bef3defcc5bf4945d419a" + integrity sha512-pwrPOS16VeTKg98dYXQyIjJEcWfz7/1YJIwxUEPFfQPtc86Ym/1sVgQ2RLoD43AazMk2l/unK4ITySSpW2+82w== + dependencies: + "@noble/hashes" "~1.1.1" + "@scure/base" "~1.1.0" + +"@sentry/core@5.30.0": + version "5.30.0" + resolved "https://registry.yarnpkg.com/@sentry/core/-/core-5.30.0.tgz#6b203664f69e75106ee8b5a2fe1d717379b331f3" + integrity sha512-TmfrII8w1PQZSZgPpUESqjB+jC6MvZJZdLtE/0hZ+SrnKhW3x5WlYLvTXZpcWePYBku7rl2wn1RZu6uT0qCTeg== + dependencies: + "@sentry/hub" "5.30.0" + "@sentry/minimal" "5.30.0" + "@sentry/types" "5.30.0" + "@sentry/utils" "5.30.0" + tslib "^1.9.3" + +"@sentry/hub@5.30.0": + version "5.30.0" + resolved "https://registry.yarnpkg.com/@sentry/hub/-/hub-5.30.0.tgz#2453be9b9cb903404366e198bd30c7ca74cdc100" + integrity sha512-2tYrGnzb1gKz2EkMDQcfLrDTvmGcQPuWxLnJKXJvYTQDGLlEvi2tWz1VIHjunmOvJrB5aIQLhm+dcMRwFZDCqQ== + dependencies: + "@sentry/types" "5.30.0" + "@sentry/utils" "5.30.0" + tslib "^1.9.3" + +"@sentry/minimal@5.30.0": + version "5.30.0" + resolved "https://registry.yarnpkg.com/@sentry/minimal/-/minimal-5.30.0.tgz#ce3d3a6a273428e0084adcb800bc12e72d34637b" + integrity sha512-BwWb/owZKtkDX+Sc4zCSTNcvZUq7YcH3uAVlmh/gtR9rmUvbzAA3ewLuB3myi4wWRAMEtny6+J/FN/x+2wn9Xw== + dependencies: + "@sentry/hub" "5.30.0" + "@sentry/types" "5.30.0" + tslib "^1.9.3" + +"@sentry/node@^5.18.1": + version "5.30.0" + resolved "https://registry.yarnpkg.com/@sentry/node/-/node-5.30.0.tgz#4ca479e799b1021285d7fe12ac0858951c11cd48" + integrity sha512-Br5oyVBF0fZo6ZS9bxbJZG4ApAjRqAnqFFurMVJJdunNb80brh7a5Qva2kjhm+U6r9NJAB5OmDyPkA1Qnt+QVg== + dependencies: + "@sentry/core" "5.30.0" + "@sentry/hub" "5.30.0" + "@sentry/tracing" "5.30.0" + "@sentry/types" "5.30.0" + "@sentry/utils" "5.30.0" + cookie "^0.4.1" + https-proxy-agent "^5.0.0" + lru_map "^0.3.3" + tslib "^1.9.3" + +"@sentry/tracing@5.30.0": + version "5.30.0" + resolved "https://registry.yarnpkg.com/@sentry/tracing/-/tracing-5.30.0.tgz#501d21f00c3f3be7f7635d8710da70d9419d4e1f" + integrity sha512-dUFowCr0AIMwiLD7Fs314Mdzcug+gBVo/+NCMyDw8tFxJkwWAKl7Qa2OZxLQ0ZHjakcj1hNKfCQJ9rhyfOl4Aw== + dependencies: + "@sentry/hub" "5.30.0" + "@sentry/minimal" "5.30.0" + "@sentry/types" "5.30.0" + "@sentry/utils" "5.30.0" + tslib "^1.9.3" + +"@sentry/types@5.30.0": + version "5.30.0" + resolved "https://registry.yarnpkg.com/@sentry/types/-/types-5.30.0.tgz#19709bbe12a1a0115bc790b8942917da5636f402" + integrity sha512-R8xOqlSTZ+htqrfteCWU5Nk0CDN5ApUTvrlvBuiH1DyP6czDZ4ktbZB0hAgBlVcK0U+qpD3ag3Tqqpa5Q67rPw== + +"@sentry/utils@5.30.0": + version "5.30.0" + resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-5.30.0.tgz#9a5bd7ccff85ccfe7856d493bffa64cabc41e980" + integrity sha512-zaYmoH0NWWtvnJjC9/CBseXMtKHm/tm40sz3YfJRxeQjyzRqNQPgivpd9R/oDJCYj999mzdW382p/qi2ypjLww== + dependencies: + "@sentry/types" "5.30.0" + tslib "^1.9.3" + +"@solidity-parser/parser@^0.14.5": + version "0.14.5" + resolved "https://registry.yarnpkg.com/@solidity-parser/parser/-/parser-0.14.5.tgz#87bc3cc7b068e08195c219c91cd8ddff5ef1a804" + integrity sha512-6dKnHZn7fg/iQATVEzqyUOyEidbn05q7YA2mQ9hC0MMXhhV3/JrsxmFSYZAcr7j1yUP700LLhTruvJ3MiQmjJg== + dependencies: + antlr4ts "^0.5.0-alpha.4" + +"@tsconfig/node10@^1.0.7": + version "1.0.9" + resolved "https://registry.yarnpkg.com/@tsconfig/node10/-/node10-1.0.9.tgz#df4907fc07a886922637b15e02d4cebc4c0021b2" + integrity sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA== + +"@tsconfig/node12@^1.0.7": + version "1.0.11" + resolved "https://registry.yarnpkg.com/@tsconfig/node12/-/node12-1.0.11.tgz#ee3def1f27d9ed66dac6e46a295cffb0152e058d" + integrity sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag== + +"@tsconfig/node14@^1.0.0": + version "1.0.3" + resolved "https://registry.yarnpkg.com/@tsconfig/node14/-/node14-1.0.3.tgz#e4386316284f00b98435bf40f72f75a09dabf6c1" + integrity sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow== + +"@tsconfig/node16@^1.0.2": + version "1.0.3" + resolved "https://registry.yarnpkg.com/@tsconfig/node16/-/node16-1.0.3.tgz#472eaab5f15c1ffdd7f8628bd4c4f753995ec79e" + integrity sha512-yOlFc+7UtL/89t2ZhjPvvB/DeAr3r+Dq58IgzsFkOAvVC6NMJXmCGjbptdXdR9qsX7pKcTL+s87FtYREi2dEEQ== + +"@typechain/ethers-v5@^9.0.0": + version "9.0.0" + resolved "https://registry.yarnpkg.com/@typechain/ethers-v5/-/ethers-v5-9.0.0.tgz#6aa93bea7425c0463bd8a61eea3643540ef851bd" + integrity sha512-bAanuPl1L2itaUdMvor/QvwnIH+TM/CmG00q17Ilv3ZZMeJ2j8HcarhgJUZ9pBY1teBb85P8cC03dz3mSSx+tQ== + dependencies: + lodash "^4.17.15" + ts-essentials "^7.0.1" + +"@types/async-eventemitter@^0.2.1": + version "0.2.1" + resolved "https://registry.yarnpkg.com/@types/async-eventemitter/-/async-eventemitter-0.2.1.tgz#f8e6280e87e8c60b2b938624b0a3530fb3e24712" + integrity sha512-M2P4Ng26QbAeITiH7w1d7OxtldgfAe0wobpyJzVK/XOb0cUGKU2R4pfAhqcJBXAe2ife5ZOhSv4wk7p+ffURtg== + +"@types/bn.js@^4.11.3": + version "4.11.6" + resolved "https://registry.yarnpkg.com/@types/bn.js/-/bn.js-4.11.6.tgz#c306c70d9358aaea33cd4eda092a742b9505967c" + integrity sha512-pqr857jrp2kPuO9uRjZ3PwnJTjoQy+fcdxvBTvHm6dkmEL9q+hDD/2j/0ELOBPtPnS8LjCX0gI9nbl8lVkadpg== + dependencies: + "@types/node" "*" + +"@types/bn.js@^5.1.0": + version "5.1.1" + resolved "https://registry.yarnpkg.com/@types/bn.js/-/bn.js-5.1.1.tgz#b51e1b55920a4ca26e9285ff79936bbdec910682" + integrity sha512-qNrYbZqMx0uJAfKnKclPh+dTwK33KfLHYqtyODwd5HnXOjnkhc4qgn3BrK6RWyGZm5+sIFE7Q7Vz6QQtJB7w7g== + dependencies: + "@types/node" "*" + +"@types/lru-cache@^5.1.0": + version "5.1.1" + resolved "https://registry.yarnpkg.com/@types/lru-cache/-/lru-cache-5.1.1.tgz#c48c2e27b65d2a153b19bfc1a317e30872e01eef" + integrity sha512-ssE3Vlrys7sdIzs5LOxCzTVMsU7i9oa/IaW92wF32JFb3CVczqOkru2xspuKczHEbG3nvmPY7IFqVmGGHdNbYw== + +"@types/mocha@^9.1.1": + version "9.1.1" + resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-9.1.1.tgz#e7c4f1001eefa4b8afbd1eee27a237fee3bf29c4" + integrity sha512-Z61JK7DKDtdKTWwLeElSEBcWGRLY8g95ic5FoQqI9CMx0ns/Ghep3B4DfcEimiKMvtamNVULVNKEsiwV3aQmXw== + +"@types/node@*": + version "18.11.18" + resolved "https://registry.yarnpkg.com/@types/node/-/node-18.11.18.tgz#8dfb97f0da23c2293e554c5a50d61ef134d7697f" + integrity sha512-DHQpWGjyQKSHj3ebjFI/wRKcqQcdR+MoFBygntYOZytCqNfkd2ZC4ARDJ2DQqhjH5p85Nnd3jhUJIXrszFX/JA== + +"@types/pbkdf2@^3.0.0": + version "3.1.0" + resolved "https://registry.yarnpkg.com/@types/pbkdf2/-/pbkdf2-3.1.0.tgz#039a0e9b67da0cdc4ee5dab865caa6b267bb66b1" + integrity sha512-Cf63Rv7jCQ0LaL8tNXmEyqTHuIJxRdlS5vMh1mj5voN4+QFhVZnlZruezqpWYDiJ8UTzhP0VmeLXCmBk66YrMQ== + dependencies: + "@types/node" "*" + +"@types/prettier@^2.1.1": + version "2.7.2" + resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.7.2.tgz#6c2324641cc4ba050a8c710b2b251b377581fbf0" + integrity sha512-KufADq8uQqo1pYKVIYzfKbJfBAc0sOeXqGbFaSpv8MRmC/zXgowNZmFcbngndGk922QDmOASEXUZCaY48gs4cg== + +"@types/secp256k1@^4.0.1": + version "4.0.3" + resolved "https://registry.yarnpkg.com/@types/secp256k1/-/secp256k1-4.0.3.tgz#1b8e55d8e00f08ee7220b4d59a6abe89c37a901c" + integrity sha512-Da66lEIFeIz9ltsdMZcpQvmrmmoqrfju8pm1BH8WbYjZSwUgCwXLb9C+9XYogwBITnbsSaMdVPb2ekf7TV+03w== + dependencies: + "@types/node" "*" + +abort-controller@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/abort-controller/-/abort-controller-3.0.0.tgz#eaf54d53b62bae4138e809ca225c8439a6efb392" + integrity sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg== + dependencies: + event-target-shim "^5.0.0" + +abstract-level@^1.0.0, abstract-level@^1.0.2, abstract-level@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/abstract-level/-/abstract-level-1.0.3.tgz#78a67d3d84da55ee15201486ab44c09560070741" + integrity sha512-t6jv+xHy+VYwc4xqZMn2Pa9DjcdzvzZmQGRjTFc8spIbRGHgBrEKbPq+rYXc7CCo0lxgYvSgKVg9qZAhpVQSjA== + dependencies: + buffer "^6.0.3" + catering "^2.1.0" + is-buffer "^2.0.5" + level-supports "^4.0.0" + level-transcoder "^1.0.1" + module-error "^1.0.1" + queue-microtask "^1.2.3" + +acorn-jsx@^5.0.0: + version "5.3.2" + resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937" + integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== + +acorn-walk@^8.1.1: + version "8.2.0" + resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.2.0.tgz#741210f2e2426454508853a2f44d0ab83b7f69c1" + integrity sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA== + +acorn@^6.0.7: + version "6.4.2" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.4.2.tgz#35866fd710528e92de10cf06016498e47e39e1e6" + integrity sha512-XtGIhXwF8YM8bJhGxG5kXgjkEuNGLTkoYqVE+KMR+aspr4KGYmKYg7yUe3KghyQ9yheNwLnjmzh/7+gfDBmHCQ== + +acorn@^8.4.1: + version "8.8.2" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.8.2.tgz#1b2f25db02af965399b9776b0c2c391276d37c4a" + integrity sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw== + +adm-zip@^0.4.16: + version "0.4.16" + resolved "https://registry.yarnpkg.com/adm-zip/-/adm-zip-0.4.16.tgz#cf4c508fdffab02c269cbc7f471a875f05570365" + integrity sha512-TFi4HBKSGfIKsK5YCkKaaFG2m4PEDyViZmEwof3MTIgzimHLto6muaHVpbrljdIvIrFZzEq/p4nafOeLcYegrg== + +agent-base@6: + version "6.0.2" + resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-6.0.2.tgz#49fff58577cfee3f37176feab4c22e00f86d7f77" + integrity sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ== + dependencies: + debug "4" + +aggregate-error@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/aggregate-error/-/aggregate-error-3.1.0.tgz#92670ff50f5359bdb7a3e0d40d0ec30c5737687a" + integrity sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA== + dependencies: + clean-stack "^2.0.0" + indent-string "^4.0.0" + +ajv@^6.10.2, ajv@^6.6.1, ajv@^6.9.1: + version "6.12.6" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" + integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== + dependencies: + fast-deep-equal "^3.1.1" + fast-json-stable-stringify "^2.0.0" + json-schema-traverse "^0.4.1" + uri-js "^4.2.2" + +ansi-colors@4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.1.tgz#cbb9ae256bf750af1eab344f229aa27fe94ba348" + integrity sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA== + +ansi-colors@^4.1.1: + version "4.1.3" + resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.3.tgz#37611340eb2243e70cc604cad35d63270d48781b" + integrity sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw== + +ansi-escapes@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-3.2.0.tgz#8780b98ff9dbf5638152d1f1fe5c1d7b4442976b" + integrity sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ== + +ansi-escapes@^4.3.0: + version "4.3.2" + resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-4.3.2.tgz#6b2291d1db7d98b6521d5f1efa42d0f3a9feb65e" + integrity sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ== + dependencies: + type-fest "^0.21.3" + +ansi-regex@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.1.tgz#123d6479e92ad45ad897d4054e3c7ca7db4944e1" + integrity sha512-+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw== + +ansi-regex@^4.1.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-4.1.1.tgz#164daac87ab2d6f6db3a29875e2d1766582dabed" + integrity sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g== + +ansi-regex@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" + integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== + +ansi-styles@^3.2.0, ansi-styles@^3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" + integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== + dependencies: + color-convert "^1.9.0" + +ansi-styles@^4.0.0, ansi-styles@^4.1.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" + integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== + dependencies: + color-convert "^2.0.1" + +antlr4@4.7.1: + version "4.7.1" + resolved "https://registry.yarnpkg.com/antlr4/-/antlr4-4.7.1.tgz#69984014f096e9e775f53dd9744bf994d8959773" + integrity sha512-haHyTW7Y9joE5MVs37P2lNYfU2RWBLfcRDD8OWldcdZm5TiCE91B5Xl1oWSwiDUSd4rlExpt2pu1fksYQjRBYQ== + +antlr4ts@^0.5.0-alpha.4: + version "0.5.0-alpha.4" + resolved "https://registry.yarnpkg.com/antlr4ts/-/antlr4ts-0.5.0-alpha.4.tgz#71702865a87478ed0b40c0709f422cf14d51652a" + integrity sha512-WPQDt1B74OfPv/IMS2ekXAKkTZIHl88uMetg6q3OTqgFxZ/dxDXI0EWLyZid/1Pe6hTftyg5N7gel5wNAGxXyQ== + +anymatch@~3.1.2: + version "3.1.3" + resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.3.tgz#790c58b19ba1720a84205b57c618d5ad8524973e" + integrity sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw== + dependencies: + normalize-path "^3.0.0" + picomatch "^2.0.4" + +arg@^4.1.0: + version "4.1.3" + resolved "https://registry.yarnpkg.com/arg/-/arg-4.1.3.tgz#269fc7ad5b8e42cb63c896d5666017261c144089" + integrity sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA== + +argparse@^1.0.7: + version "1.0.10" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" + integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg== + dependencies: + sprintf-js "~1.0.2" + +argparse@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" + integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== + +array-back@^3.0.1, array-back@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/array-back/-/array-back-3.1.0.tgz#b8859d7a508871c9a7b2cf42f99428f65e96bfb0" + integrity sha512-TkuxA4UCOvxuDK6NZYXCalszEzj+TLszyASooky+i742l9TqsOdYCMJJupxRic61hwquNtppB3hgcuq9SVSH1Q== + +array-back@^4.0.1, array-back@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/array-back/-/array-back-4.0.2.tgz#8004e999a6274586beeb27342168652fdb89fa1e" + integrity sha512-NbdMezxqf94cnNfWLL7V/im0Ub+Anbb0IoZhvzie8+4HJ4nMQuzHuy49FkGYCJK2yAloZ3meiB6AVMClbrI1vg== + +ast-parents@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/ast-parents/-/ast-parents-0.0.1.tgz#508fd0f05d0c48775d9eccda2e174423261e8dd3" + integrity sha512-XHusKxKz3zoYk1ic8Un640joHbFMhbqneyoZfoKnEGtf2ey9Uh/IdpcQplODdO/kENaMIWsD0nJm4+wX3UNLHA== + +astral-regex@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-1.0.0.tgz#6c8c3fb827dd43ee3918f27b82782ab7658a6fd9" + integrity sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg== + +async-eventemitter@^0.2.4: + version "0.2.4" + resolved "https://registry.yarnpkg.com/async-eventemitter/-/async-eventemitter-0.2.4.tgz#f5e7c8ca7d3e46aab9ec40a292baf686a0bafaca" + integrity sha512-pd20BwL7Yt1zwDFy+8MX8F1+WCT8aQeKj0kQnTrH9WaeRETlRamVhD0JtRPmrV4GfOJ2F9CvdQkZeZhnh2TuHw== + dependencies: + async "^2.4.0" + +async@^2.4.0: + version "2.6.4" + resolved "https://registry.yarnpkg.com/async/-/async-2.6.4.tgz#706b7ff6084664cd7eae713f6f965433b5504221" + integrity sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA== + dependencies: + lodash "^4.17.14" + +balanced-match@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" + integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== + +base-x@^3.0.2: + version "3.0.9" + resolved "https://registry.yarnpkg.com/base-x/-/base-x-3.0.9.tgz#6349aaabb58526332de9f60995e548a53fe21320" + integrity sha512-H7JU6iBHTal1gp56aKoaa//YUxEaAOUiydvrV/pILqIHXTtqxSkATOnDA2u+jZ/61sD+L/412+7kzXRtWukhpQ== + dependencies: + safe-buffer "^5.0.1" + +base64-js@^1.3.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" + integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== + +bigint-crypto-utils@^3.0.23: + version "3.1.8" + resolved "https://registry.yarnpkg.com/bigint-crypto-utils/-/bigint-crypto-utils-3.1.8.tgz#e2e0f40cf45488f9d7f0e32ff84152aa73819d5d" + integrity sha512-+VMV9Laq8pXLBKKKK49nOoq9bfR3j7NNQAtbA617a4nw9bVLo8rsqkKMBgM2AJWlNX9fEIyYaYX+d0laqYV4tw== + dependencies: + bigint-mod-arith "^3.1.0" + +bigint-mod-arith@^3.1.0: + version "3.1.2" + resolved "https://registry.yarnpkg.com/bigint-mod-arith/-/bigint-mod-arith-3.1.2.tgz#658e416bc593a463d97b59766226d0a3021a76b1" + integrity sha512-nx8J8bBeiRR+NlsROFH9jHswW5HO8mgfOSqW0AmjicMMvaONDa8AO+5ViKDUUNytBPWiwfvZP4/Bj4Y3lUfvgQ== + +binary-extensions@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d" + integrity sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA== + +blakejs@^1.1.0: + version "1.2.1" + resolved "https://registry.yarnpkg.com/blakejs/-/blakejs-1.2.1.tgz#5057e4206eadb4a97f7c0b6e197a505042fc3814" + integrity sha512-QXUSXI3QVc/gJME0dBpXrag1kbzOqCjCX8/b54ntNyW6sjtoqxqRk3LTmXzaJoh71zMsDCjM+47jS7XiwN/+fQ== + +bn.js@^4.11.0, bn.js@^4.11.8, bn.js@^4.11.9: + version "4.12.0" + resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.12.0.tgz#775b3f278efbb9718eec7361f483fb36fbbfea88" + integrity sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA== + +bn.js@^5.2.0, bn.js@^5.2.1: + version "5.2.1" + resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.2.1.tgz#0bc527a6a0d18d0aa8d5b0538ce4a77dccfa7b70" + integrity sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ== + +brace-expansion@^1.1.7: + version "1.1.11" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" + integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== + dependencies: + balanced-match "^1.0.0" + concat-map "0.0.1" + +brace-expansion@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-2.0.1.tgz#1edc459e0f0c548486ecf9fc99f2221364b9a0ae" + integrity sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA== + dependencies: + balanced-match "^1.0.0" + +braces@~3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" + integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== + dependencies: + fill-range "^7.0.1" + +brorand@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f" + integrity sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w== + +browser-level@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/browser-level/-/browser-level-1.0.1.tgz#36e8c3183d0fe1c405239792faaab5f315871011" + integrity sha512-XECYKJ+Dbzw0lbydyQuJzwNXtOpbMSq737qxJN11sIRTErOMShvDpbzTlgju7orJKvx4epULolZAuJGLzCmWRQ== + dependencies: + abstract-level "^1.0.2" + catering "^2.1.1" + module-error "^1.0.2" + run-parallel-limit "^1.1.0" + +browser-stdout@1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.1.tgz#baa559ee14ced73452229bad7326467c61fabd60" + integrity sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw== + +browserify-aes@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/browserify-aes/-/browserify-aes-1.2.0.tgz#326734642f403dabc3003209853bb70ad428ef48" + integrity sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA== + dependencies: + buffer-xor "^1.0.3" + cipher-base "^1.0.0" + create-hash "^1.1.0" + evp_bytestokey "^1.0.3" + inherits "^2.0.1" + safe-buffer "^5.0.1" + +bs58@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/bs58/-/bs58-4.0.1.tgz#be161e76c354f6f788ae4071f63f34e8c4f0a42a" + integrity sha512-Ok3Wdf5vOIlBrgCvTq96gBkJw+JUEzdBgyaza5HLtPm7yTHkjRy8+JzNyHF7BHa0bNWOQIp3m5YF0nnFcOIKLw== + dependencies: + base-x "^3.0.2" + +bs58check@^2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/bs58check/-/bs58check-2.1.2.tgz#53b018291228d82a5aa08e7d796fdafda54aebfc" + integrity sha512-0TS1jicxdU09dwJMNZtVAfzPi6Q6QeN0pM1Fkzrjn+XYHvzMKPU3pHVpva+769iNVSfIYWf7LJ6WR+BuuMf8cA== + dependencies: + bs58 "^4.0.0" + create-hash "^1.1.0" + safe-buffer "^5.1.2" + +buffer-from@^1.0.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5" + integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== + +buffer-xor@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/buffer-xor/-/buffer-xor-1.0.3.tgz#26e61ed1422fb70dd42e6e36729ed51d855fe8d9" + integrity sha512-571s0T7nZWK6vB67HI5dyUF7wXiNcfaPPPTl6zYCNApANjIvYJTg7hlud/+cJpdAhS7dVzqMLmfhfHR3rAcOjQ== + +buffer@^6.0.3: + version "6.0.3" + resolved "https://registry.yarnpkg.com/buffer/-/buffer-6.0.3.tgz#2ace578459cc8fbe2a70aaa8f52ee63b6a74c6c6" + integrity sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA== + dependencies: + base64-js "^1.3.1" + ieee754 "^1.2.1" + +busboy@^1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/busboy/-/busboy-1.6.0.tgz#966ea36a9502e43cdb9146962523b92f531f6893" + integrity sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA== + dependencies: + streamsearch "^1.1.0" + +bytes@3.1.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.2.tgz#8b0beeb98605adf1b128fa4386403c009e0221a5" + integrity sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg== + +call-bind@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.2.tgz#b1d4e89e688119c3c9a903ad30abb2f6a919be3c" + integrity sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA== + dependencies: + function-bind "^1.1.1" + get-intrinsic "^1.0.2" + +caller-callsite@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/caller-callsite/-/caller-callsite-2.0.0.tgz#847e0fce0a223750a9a027c54b33731ad3154134" + integrity sha512-JuG3qI4QOftFsZyOn1qq87fq5grLIyk1JYd5lJmdA+fG7aQ9pA/i3JIJGcO3q0MrRcHlOt1U+ZeHW8Dq9axALQ== + dependencies: + callsites "^2.0.0" + +caller-path@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/caller-path/-/caller-path-2.0.0.tgz#468f83044e369ab2010fac5f06ceee15bb2cb1f4" + integrity sha512-MCL3sf6nCSXOwCTzvPKhN18TU7AHTvdtam8DAogxcrJ8Rjfbbg7Lgng64H9Iy+vUV6VGFClN/TyxBkAebLRR4A== + dependencies: + caller-callsite "^2.0.0" + +callsites@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/callsites/-/callsites-2.0.0.tgz#06eb84f00eea413da86affefacbffb36093b3c50" + integrity sha512-ksWePWBloaWPxJYQ8TL0JHvtci6G5QTKwQ95RcWAa/lzoAKuAOflGdAK92hpHXjkwb8zLxoLNUoNYZgVsaJzvQ== + +callsites@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" + integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== + +camelcase@^6.0.0: + version "6.3.0" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.3.0.tgz#5685b95eb209ac9c0c177467778c9c84df58ba9a" + integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== + +catering@^2.1.0, catering@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/catering/-/catering-2.1.1.tgz#66acba06ed5ee28d5286133982a927de9a04b510" + integrity sha512-K7Qy8O9p76sL3/3m7/zLKbRkyOlSZAgzEaLhyj2mXS8PsCud2Eo4hAb8aLtZqHh0QGqLcb9dlJSu6lHRVENm1w== + +chalk@^2.0.0, chalk@^2.1.0, chalk@^2.4.2: + version "2.4.2" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" + integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== + dependencies: + ansi-styles "^3.2.1" + escape-string-regexp "^1.0.5" + supports-color "^5.3.0" + +chalk@^4.1.0: + version "4.1.2" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" + integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== + dependencies: + ansi-styles "^4.1.0" + supports-color "^7.1.0" + +chardet@^0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.7.0.tgz#90094849f0937f2eedc2425d0d28a9e5f0cbad9e" + integrity sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA== + +chokidar@3.5.3, chokidar@^3.4.0: + version "3.5.3" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.3.tgz#1cf37c8707b932bd1af1ae22c0432e2acd1903bd" + integrity sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw== + dependencies: + anymatch "~3.1.2" + braces "~3.0.2" + glob-parent "~5.1.2" + is-binary-path "~2.1.0" + is-glob "~4.0.1" + normalize-path "~3.0.0" + readdirp "~3.6.0" + optionalDependencies: + fsevents "~2.3.2" + +ci-info@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-2.0.0.tgz#67a9e964be31a51e15e5010d58e6f12834002f46" + integrity sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ== + +cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/cipher-base/-/cipher-base-1.0.4.tgz#8760e4ecc272f4c363532f926d874aae2c1397de" + integrity sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q== + dependencies: + inherits "^2.0.1" + safe-buffer "^5.0.1" + +classic-level@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/classic-level/-/classic-level-1.2.0.tgz#2d52bdec8e7a27f534e67fdeb890abef3e643c27" + integrity sha512-qw5B31ANxSluWz9xBzklRWTUAJ1SXIdaVKTVS7HcTGKOAmExx65Wo5BUICW+YGORe2FOUaDghoI9ZDxj82QcFg== + dependencies: + abstract-level "^1.0.2" + catering "^2.1.0" + module-error "^1.0.1" + napi-macros "~2.0.0" + node-gyp-build "^4.3.0" + +clean-stack@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/clean-stack/-/clean-stack-2.2.0.tgz#ee8472dbb129e727b31e8a10a427dee9dfe4008b" + integrity sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A== + +cli-cursor@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-2.1.0.tgz#b35dac376479facc3e94747d41d0d0f5238ffcb5" + integrity sha512-8lgKz8LmCRYZZQDpRyT2m5rKJ08TnU4tR9FFFW2rxpxR1FzWi4PQ/NfyODchAatHaUgnSPVcx/R5w6NuTBzFiw== + dependencies: + restore-cursor "^2.0.0" + +cli-width@^2.0.0: + version "2.2.1" + resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.2.1.tgz#b0433d0b4e9c847ef18868a4ef16fd5fc8271c48" + integrity sha512-GRMWDxpOB6Dgk2E5Uo+3eEBvtOOlimMmpbFiKuLFnQzYDavtLFY3K5ona41jgN/WdRZtG7utuVSVTL4HbZHGkw== + +cliui@^7.0.2: + version "7.0.4" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-7.0.4.tgz#a0265ee655476fc807aea9df3df8df7783808b4f" + integrity sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ== + dependencies: + string-width "^4.2.0" + strip-ansi "^6.0.0" + wrap-ansi "^7.0.0" + +color-convert@^1.9.0: + version "1.9.3" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" + integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== + dependencies: + color-name "1.1.3" + +color-convert@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" + integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== + dependencies: + color-name "~1.1.4" + +color-name@1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" + integrity sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw== + +color-name@~1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" + integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== + +command-exists@^1.2.8: + version "1.2.9" + resolved "https://registry.yarnpkg.com/command-exists/-/command-exists-1.2.9.tgz#c50725af3808c8ab0260fd60b01fbfa25b954f69" + integrity sha512-LTQ/SGc+s0Xc0Fu5WaKnR0YiygZkm9eKFvyS+fRsU7/ZWFF8ykFM6Pc9aCVf1+xasOOZpO3BAVgVrKvsqKHV7w== + +command-line-args@^5.1.1: + version "5.2.1" + resolved "https://registry.yarnpkg.com/command-line-args/-/command-line-args-5.2.1.tgz#c44c32e437a57d7c51157696893c5909e9cec42e" + integrity sha512-H4UfQhZyakIjC74I9d34fGYDwk3XpSr17QhEd0Q3I9Xq1CETHo4Hcuo87WyWHpAF1aSLjLRf5lD9ZGX2qStUvg== + dependencies: + array-back "^3.1.0" + find-replace "^3.0.0" + lodash.camelcase "^4.3.0" + typical "^4.0.0" + +command-line-usage@^6.1.0: + version "6.1.3" + resolved "https://registry.yarnpkg.com/command-line-usage/-/command-line-usage-6.1.3.tgz#428fa5acde6a838779dfa30e44686f4b6761d957" + integrity sha512-sH5ZSPr+7UStsloltmDh7Ce5fb8XPlHyoPzTpyyMuYCtervL65+ubVZ6Q61cFtFl62UyJlc8/JwERRbAFPUqgw== + dependencies: + array-back "^4.0.2" + chalk "^2.4.2" + table-layout "^1.0.2" + typical "^5.2.0" + +commander@2.18.0: + version "2.18.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.18.0.tgz#2bf063ddee7c7891176981a2cc798e5754bc6970" + integrity sha512-6CYPa+JP2ftfRU2qkDK+UTVeQYosOg/2GbcjIcKPHfinyOLPVGXu/ovN86RP49Re5ndJK1N0kuiidFFuepc4ZQ== + +commander@3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/commander/-/commander-3.0.2.tgz#6837c3fb677ad9933d1cfba42dd14d5117d6b39e" + integrity sha512-Gar0ASD4BDyKC4hl4DwHqDrmvjoxWKZigVnAbn5H1owvm4CxCPdb0HQDehwNYMJpla5+M2tPmPARzhtYuwpHow== + +concat-map@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== + +cookie@^0.4.1: + version "0.4.2" + resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.4.2.tgz#0e41f24de5ecf317947c82fc789e06a884824432" + integrity sha512-aSWTXFzaKWkvHO1Ny/s+ePFpvKsPnjc551iI41v3ny/ow6tBG5Vd+FuqGNhh1LxOmVzOlGUriIlOaokOvhaStA== + +cosmiconfig@^5.0.7: + version "5.2.1" + resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-5.2.1.tgz#040f726809c591e77a17c0a3626ca45b4f168b1a" + integrity sha512-H65gsXo1SKjf8zmrJ67eJk8aIRKV5ff2D4uKZIBZShbhGSpEmsQOPW/SKMKYhSTrqR7ufy6RP69rPogdaPh/kA== + dependencies: + import-fresh "^2.0.0" + is-directory "^0.3.1" + js-yaml "^3.13.1" + parse-json "^4.0.0" + +crc-32@^1.2.0: + version "1.2.2" + resolved "https://registry.yarnpkg.com/crc-32/-/crc-32-1.2.2.tgz#3cad35a934b8bf71f25ca524b6da51fb7eace2ff" + integrity sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ== + +create-hash@^1.1.0, create-hash@^1.1.2, create-hash@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/create-hash/-/create-hash-1.2.0.tgz#889078af11a63756bcfb59bd221996be3a9ef196" + integrity sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg== + dependencies: + cipher-base "^1.0.1" + inherits "^2.0.1" + md5.js "^1.3.4" + ripemd160 "^2.0.1" + sha.js "^2.4.0" + +create-hmac@^1.1.4, create-hmac@^1.1.7: + version "1.1.7" + resolved "https://registry.yarnpkg.com/create-hmac/-/create-hmac-1.1.7.tgz#69170c78b3ab957147b2b8b04572e47ead2243ff" + integrity sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg== + dependencies: + cipher-base "^1.0.3" + create-hash "^1.1.0" + inherits "^2.0.1" + ripemd160 "^2.0.0" + safe-buffer "^5.0.1" + sha.js "^2.4.8" + +create-require@^1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/create-require/-/create-require-1.1.1.tgz#c1d7e8f1e5f6cfc9ff65f9cd352d37348756c333" + integrity sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ== + +cross-spawn@^6.0.5: + version "6.0.5" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4" + integrity sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ== + dependencies: + nice-try "^1.0.4" + path-key "^2.0.1" + semver "^5.5.0" + shebang-command "^1.2.0" + which "^1.2.9" + +debug@4, debug@4.3.4, debug@^4.0.1, debug@^4.1.1, debug@^4.3.1, debug@^4.3.3: + version "4.3.4" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" + integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== + dependencies: + ms "2.1.2" + +decamelize@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-4.0.0.tgz#aa472d7bf660eb15f3494efd531cab7f2a709837" + integrity sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ== + +deep-extend@~0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac" + integrity sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA== + +deep-is@~0.1.3: + version "0.1.4" + resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.4.tgz#a6f2dce612fadd2ef1f519b73551f17e85199831" + integrity sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ== + +depd@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/depd/-/depd-2.0.0.tgz#b696163cc757560d09cf22cc8fad1571b79e76df" + integrity sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw== + +diff@5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/diff/-/diff-5.0.0.tgz#7ed6ad76d859d030787ec35855f5b1daf31d852b" + integrity sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w== + +diff@^4.0.1: + version "4.0.2" + resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.2.tgz#60f3aecb89d5fae520c11aa19efc2bb982aade7d" + integrity sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A== + +doctrine@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-3.0.0.tgz#addebead72a6574db783639dc87a121773973961" + integrity sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w== + dependencies: + esutils "^2.0.2" + +"ds-test@https://github.com/dapphub/ds-test.git#c7a36fb236f298e04edf28e2fee385b80f53945f": + version "0.0.0" + resolved "https://github.com/dapphub/ds-test.git#c7a36fb236f298e04edf28e2fee385b80f53945f" + +elliptic@6.5.4, elliptic@^6.5.2, elliptic@^6.5.4: + version "6.5.4" + resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.4.tgz#da37cebd31e79a1367e941b592ed1fbebd58abbb" + integrity sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ== + dependencies: + bn.js "^4.11.9" + brorand "^1.1.0" + hash.js "^1.0.0" + hmac-drbg "^1.0.1" + inherits "^2.0.4" + minimalistic-assert "^1.0.1" + minimalistic-crypto-utils "^1.0.1" + +emoji-regex@^7.0.1: + version "7.0.3" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-7.0.3.tgz#933a04052860c85e83c122479c4748a8e4c72156" + integrity sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA== + +emoji-regex@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" + integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== + +enquirer@^2.3.0: + version "2.3.6" + resolved "https://registry.yarnpkg.com/enquirer/-/enquirer-2.3.6.tgz#2a7fe5dd634a1e4125a975ec994ff5456dc3734d" + integrity sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg== + dependencies: + ansi-colors "^4.1.1" + +env-paths@^2.2.0: + version "2.2.1" + resolved "https://registry.yarnpkg.com/env-paths/-/env-paths-2.2.1.tgz#420399d416ce1fbe9bc0a07c62fa68d67fd0f8f2" + integrity sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A== + +error-ex@^1.3.1: + version "1.3.2" + resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" + integrity sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g== + dependencies: + is-arrayish "^0.2.1" + +escalade@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" + integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw== + +escape-string-regexp@4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" + integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== + +escape-string-regexp@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" + integrity sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg== + +eslint-scope@^4.0.3: + version "4.0.3" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-4.0.3.tgz#ca03833310f6889a3264781aa82e63eb9cfe7848" + integrity sha512-p7VutNr1O/QrxysMo3E45FjYDTeXBy0iTltPFNSqKAIfjDSXC+4dj+qfyuD8bfAXrW/y6lW3O76VaYNPKfpKrg== + dependencies: + esrecurse "^4.1.0" + estraverse "^4.1.1" + +eslint-utils@^1.3.1: + version "1.4.3" + resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-1.4.3.tgz#74fec7c54d0776b6f67e0251040b5806564e981f" + integrity sha512-fbBN5W2xdY45KulGXmLHZ3c3FHfVYmKg0IrAKGOkT/464PQsx2UeIzfz1RmEci+KLm1bBaAzZAh8+/E+XAeZ8Q== + dependencies: + eslint-visitor-keys "^1.1.0" + +eslint-visitor-keys@^1.0.0, eslint-visitor-keys@^1.1.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz#30ebd1ef7c2fdff01c3a4f151044af25fab0523e" + integrity sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ== + +eslint@^5.6.0: + version "5.16.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-5.16.0.tgz#a1e3ac1aae4a3fbd8296fcf8f7ab7314cbb6abea" + integrity sha512-S3Rz11i7c8AA5JPv7xAH+dOyq/Cu/VXHiHXBPOU1k/JAM5dXqQPt3qcrhpHSorXmrpu2g0gkIBVXAqCpzfoZIg== + dependencies: + "@babel/code-frame" "^7.0.0" + ajv "^6.9.1" + chalk "^2.1.0" + cross-spawn "^6.0.5" + debug "^4.0.1" + doctrine "^3.0.0" + eslint-scope "^4.0.3" + eslint-utils "^1.3.1" + eslint-visitor-keys "^1.0.0" + espree "^5.0.1" + esquery "^1.0.1" + esutils "^2.0.2" + file-entry-cache "^5.0.1" + functional-red-black-tree "^1.0.1" + glob "^7.1.2" + globals "^11.7.0" + ignore "^4.0.6" + import-fresh "^3.0.0" + imurmurhash "^0.1.4" + inquirer "^6.2.2" + js-yaml "^3.13.0" + json-stable-stringify-without-jsonify "^1.0.1" + levn "^0.3.0" + lodash "^4.17.11" + minimatch "^3.0.4" + mkdirp "^0.5.1" + natural-compare "^1.4.0" + optionator "^0.8.2" + path-is-inside "^1.0.2" + progress "^2.0.0" + regexpp "^2.0.1" + semver "^5.5.1" + strip-ansi "^4.0.0" + strip-json-comments "^2.0.1" + table "^5.2.3" + text-table "^0.2.0" + +espree@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/espree/-/espree-5.0.1.tgz#5d6526fa4fc7f0788a5cf75b15f30323e2f81f7a" + integrity sha512-qWAZcWh4XE/RwzLJejfcofscgMc9CamR6Tn1+XRXNzrvUSSbiAjGOI/fggztjIi7y9VLPqnICMIPiGyr8JaZ0A== + dependencies: + acorn "^6.0.7" + acorn-jsx "^5.0.0" + eslint-visitor-keys "^1.0.0" + +esprima@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" + integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== + +esquery@^1.0.1: + version "1.4.0" + resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.4.0.tgz#2148ffc38b82e8c7057dfed48425b3e61f0f24a5" + integrity sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w== + dependencies: + estraverse "^5.1.0" + +esrecurse@^4.1.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.3.0.tgz#7ad7964d679abb28bee72cec63758b1c5d2c9921" + integrity sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag== + dependencies: + estraverse "^5.2.0" + +estraverse@^4.1.1: + version "4.3.0" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.3.0.tgz#398ad3f3c5a24948be7725e83d11a7de28cdbd1d" + integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw== + +estraverse@^5.1.0, estraverse@^5.2.0: + version "5.3.0" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.3.0.tgz#2eea5290702f26ab8fe5370370ff86c965d21123" + integrity sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA== + +esutils@^2.0.2: + version "2.0.3" + resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" + integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== + +ethereum-cryptography@0.1.3, ethereum-cryptography@^0.1.3: + version "0.1.3" + resolved "https://registry.yarnpkg.com/ethereum-cryptography/-/ethereum-cryptography-0.1.3.tgz#8d6143cfc3d74bf79bbd8edecdf29e4ae20dd191" + integrity sha512-w8/4x1SGGzc+tO97TASLja6SLd3fRIK2tLVcV2Gx4IB21hE19atll5Cq9o3d0ZmAYC/8aw0ipieTSiekAea4SQ== + dependencies: + "@types/pbkdf2" "^3.0.0" + "@types/secp256k1" "^4.0.1" + blakejs "^1.1.0" + browserify-aes "^1.2.0" + bs58check "^2.1.2" + create-hash "^1.2.0" + create-hmac "^1.1.7" + hash.js "^1.1.7" + keccak "^3.0.0" + pbkdf2 "^3.0.17" + randombytes "^2.1.0" + safe-buffer "^5.1.2" + scrypt-js "^3.0.0" + secp256k1 "^4.0.1" + setimmediate "^1.0.5" + +ethereum-cryptography@^1.0.3: + version "1.1.2" + resolved "https://registry.yarnpkg.com/ethereum-cryptography/-/ethereum-cryptography-1.1.2.tgz#74f2ac0f0f5fe79f012c889b3b8446a9a6264e6d" + integrity sha512-XDSJlg4BD+hq9N2FjvotwUET9Tfxpxc3kWGE2AqUG5vcbeunnbImVk3cj6e/xT3phdW21mE8R5IugU4fspQDcQ== + dependencies: + "@noble/hashes" "1.1.2" + "@noble/secp256k1" "1.6.3" + "@scure/bip32" "1.1.0" + "@scure/bip39" "1.1.0" + +ethereumjs-abi@^0.6.8: + version "0.6.8" + resolved "https://registry.yarnpkg.com/ethereumjs-abi/-/ethereumjs-abi-0.6.8.tgz#71bc152db099f70e62f108b7cdfca1b362c6fcae" + integrity sha512-Tx0r/iXI6r+lRsdvkFDlut0N08jWMnKRZ6Gkq+Nmw75lZe4e6o3EkSnkaBP5NF6+m5PTGAr9JP43N3LyeoglsA== + dependencies: + bn.js "^4.11.8" + ethereumjs-util "^6.0.0" + +ethereumjs-util@^6.0.0, ethereumjs-util@^6.2.1: + version "6.2.1" + resolved "https://registry.yarnpkg.com/ethereumjs-util/-/ethereumjs-util-6.2.1.tgz#fcb4e4dd5ceacb9d2305426ab1a5cd93e3163b69" + integrity sha512-W2Ktez4L01Vexijrm5EB6w7dg4n/TgpoYU4avuT5T3Vmnw/eCRtiBrJfQYS/DCSvDIOLn2k57GcHdeBcgVxAqw== + dependencies: + "@types/bn.js" "^4.11.3" + bn.js "^4.11.0" + create-hash "^1.1.2" + elliptic "^6.5.2" + ethereum-cryptography "^0.1.3" + ethjs-util "0.1.6" + rlp "^2.2.3" + +ethjs-util@0.1.6, ethjs-util@^0.1.6: + version "0.1.6" + resolved "https://registry.yarnpkg.com/ethjs-util/-/ethjs-util-0.1.6.tgz#f308b62f185f9fe6237132fb2a9818866a5cd536" + integrity sha512-CUnVOQq7gSpDHZVVrQW8ExxUETWrnrvXYvYz55wOU8Uj4VCgw56XC2B/fVqQN+f7gmrnRHSLVnFAwsCuNwji8w== + dependencies: + is-hex-prefixed "1.0.0" + strip-hex-prefix "1.0.0" + +event-target-shim@^5.0.0: + version "5.0.1" + resolved "https://registry.yarnpkg.com/event-target-shim/-/event-target-shim-5.0.1.tgz#5d4d3ebdf9583d63a5333ce2deb7480ab2b05789" + integrity sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ== + +evp_bytestokey@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz#7fcbdb198dc71959432efe13842684e0525acb02" + integrity sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA== + dependencies: + md5.js "^1.3.4" + safe-buffer "^5.1.1" + +external-editor@^3.0.3: + version "3.1.0" + resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-3.1.0.tgz#cb03f740befae03ea4d283caed2741a83f335495" + integrity sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew== + dependencies: + chardet "^0.7.0" + iconv-lite "^0.4.24" + tmp "^0.0.33" + +fast-deep-equal@^3.1.1: + version "3.1.3" + resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" + integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== + +fast-diff@^1.1.2: + version "1.2.0" + resolved "https://registry.yarnpkg.com/fast-diff/-/fast-diff-1.2.0.tgz#73ee11982d86caaf7959828d519cfe927fac5f03" + integrity sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w== + +fast-json-stable-stringify@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" + integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== + +fast-levenshtein@~2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" + integrity sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw== + +figures@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/figures/-/figures-2.0.0.tgz#3ab1a2d2a62c8bfb431a0c94cb797a2fce27c962" + integrity sha512-Oa2M9atig69ZkfwiApY8F2Yy+tzMbazyvqv21R0NsSC8floSOC09BbT1ITWAdoMGQvJ/aZnR1KMwdx9tvHnTNA== + dependencies: + escape-string-regexp "^1.0.5" + +file-entry-cache@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-5.0.1.tgz#ca0f6efa6dd3d561333fb14515065c2fafdf439c" + integrity sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g== + dependencies: + flat-cache "^2.0.1" + +fill-range@^7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" + integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== + dependencies: + to-regex-range "^5.0.1" + +find-replace@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/find-replace/-/find-replace-3.0.0.tgz#3e7e23d3b05167a76f770c9fbd5258b0def68c38" + integrity sha512-6Tb2myMioCAgv5kfvP5/PkZZ/ntTpVK39fHY7WkWBgvbeE+VHd/tZuZ4mrC+bxh4cfOZeYKVPaJIZtZXV7GNCQ== + dependencies: + array-back "^3.0.1" + +find-up@5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-5.0.0.tgz#4c92819ecb7083561e4f4a240a86be5198f536fc" + integrity sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng== + dependencies: + locate-path "^6.0.0" + path-exists "^4.0.0" + +find-up@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7" + integrity sha512-NWzkk0jSJtTt08+FBFMvXoeZnOJD+jTtsRmBYbAIzJdX6l7dLgR7CTubCM5/eDdPUBvLCeVasP1brfVR/9/EZQ== + dependencies: + locate-path "^2.0.0" + +flat-cache@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-2.0.1.tgz#5d296d6f04bda44a4630a301413bdbc2ec085ec0" + integrity sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA== + dependencies: + flatted "^2.0.0" + rimraf "2.6.3" + write "1.0.3" + +flat@^5.0.2: + version "5.0.2" + resolved "https://registry.yarnpkg.com/flat/-/flat-5.0.2.tgz#8ca6fe332069ffa9d324c327198c598259ceb241" + integrity sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ== + +flatted@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/flatted/-/flatted-2.0.2.tgz#4575b21e2bcee7434aa9be662f4b7b5f9c2b5138" + integrity sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA== + +follow-redirects@^1.12.1: + version "1.15.2" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.2.tgz#b460864144ba63f2681096f274c4e57026da2c13" + integrity sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA== + +"forge-std@https://github.com/foundry-rs/forge-std.git#37a3fe48c3a4d8239cda93445f0b5e76b1507436": + version "0.0.0" + resolved "https://github.com/foundry-rs/forge-std.git#37a3fe48c3a4d8239cda93445f0b5e76b1507436" + +fp-ts@1.19.3: + version "1.19.3" + resolved "https://registry.yarnpkg.com/fp-ts/-/fp-ts-1.19.3.tgz#261a60d1088fbff01f91256f91d21d0caaaaa96f" + integrity sha512-H5KQDspykdHuztLTg+ajGN0Z2qUjcEf3Ybxc6hLt0k7/zPkn29XnKnxlBPyW2XIddWrGaJBzBl4VLYOtk39yZg== + +fp-ts@^1.0.0: + version "1.19.5" + resolved "https://registry.yarnpkg.com/fp-ts/-/fp-ts-1.19.5.tgz#3da865e585dfa1fdfd51785417357ac50afc520a" + integrity sha512-wDNqTimnzs8QqpldiId9OavWK2NptormjXnRJTQecNjzwfyp6P/8s/zG8e4h3ja3oqkKaY72UlTjQYt/1yXf9A== + +fs-extra@^0.30.0: + version "0.30.0" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-0.30.0.tgz#f233ffcc08d4da7d432daa449776989db1df93f0" + integrity sha512-UvSPKyhMn6LEd/WpUaV9C9t3zATuqoqfWc3QdPhPLb58prN9tqYPlPWi8Krxi44loBoUzlobqZ3+8tGpxxSzwA== + dependencies: + graceful-fs "^4.1.2" + jsonfile "^2.1.0" + klaw "^1.0.0" + path-is-absolute "^1.0.0" + rimraf "^2.2.8" + +fs-extra@^7.0.0, fs-extra@^7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-7.0.1.tgz#4f189c44aa123b895f722804f55ea23eadc348e9" + integrity sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw== + dependencies: + graceful-fs "^4.1.2" + jsonfile "^4.0.0" + universalify "^0.1.0" + +fs.realpath@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" + integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== + +fsevents@~2.3.2: + version "2.3.2" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a" + integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA== + +function-bind@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" + integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== + +functional-red-black-tree@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327" + integrity sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g== + +get-caller-file@^2.0.5: + version "2.0.5" + resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" + integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== + +get-intrinsic@^1.0.2: + version "1.2.0" + resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.2.0.tgz#7ad1dc0535f3a2904bba075772763e5051f6d05f" + integrity sha512-L049y6nFOuom5wGyRc3/gdTLO94dySVKRACj1RmJZBQXlbTMhtNIgkWkUHq+jYmZvKf14EW1EoJnnjbmoHij0Q== + dependencies: + function-bind "^1.1.1" + has "^1.0.3" + has-symbols "^1.0.3" + +glob-parent@~5.1.2: + version "5.1.2" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" + integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== + dependencies: + is-glob "^4.0.1" + +glob@7.1.7: + version "7.1.7" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.7.tgz#3b193e9233f01d42d0b3f78294bbeeb418f94a90" + integrity sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.4" + once "^1.3.0" + path-is-absolute "^1.0.0" + +glob@7.2.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.0.tgz#d15535af7732e02e948f4c41628bd910293f6023" + integrity sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.4" + once "^1.3.0" + path-is-absolute "^1.0.0" + +glob@^7.1.2, glob@^7.1.3: + version "7.2.3" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" + integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.1.1" + once "^1.3.0" + path-is-absolute "^1.0.0" + +globals@^11.7.0: + version "11.12.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" + integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== + +graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.1.9: + version "4.2.10" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.10.tgz#147d3a006da4ca3ce14728c7aefc287c367d7a6c" + integrity sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA== + +handlebars@^4.7.7: + version "4.7.7" + resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.7.7.tgz#9ce33416aad02dbd6c8fafa8240d5d98004945a1" + integrity sha512-aAcXm5OAfE/8IXkcZvCepKU3VzW1/39Fb5ZuqMtgI/hT8X2YgoMvBY5dLhq/cpOvw7Lk1nK/UF71aLG/ZnVYRA== + dependencies: + minimist "^1.2.5" + neo-async "^2.6.0" + source-map "^0.6.1" + wordwrap "^1.0.0" + optionalDependencies: + uglify-js "^3.1.4" + +hardhat@^2.10.1: + version "2.12.6" + resolved "https://registry.yarnpkg.com/hardhat/-/hardhat-2.12.6.tgz#ea3c058bbd81850867389d10f76037cfa52a0019" + integrity sha512-0Ent1O5DsPgvaVb5sxEgsQ3bJRt/Ex92tsoO+xjoNH2Qc4bFmhI5/CHVlFikulalxOPjNmw5XQ2vJFuVQFESAA== + dependencies: + "@ethersproject/abi" "^5.1.2" + "@metamask/eth-sig-util" "^4.0.0" + "@nomicfoundation/ethereumjs-block" "^4.0.0" + "@nomicfoundation/ethereumjs-blockchain" "^6.0.0" + "@nomicfoundation/ethereumjs-common" "^3.0.0" + "@nomicfoundation/ethereumjs-evm" "^1.0.0" + "@nomicfoundation/ethereumjs-rlp" "^4.0.0" + "@nomicfoundation/ethereumjs-statemanager" "^1.0.0" + "@nomicfoundation/ethereumjs-trie" "^5.0.0" + "@nomicfoundation/ethereumjs-tx" "^4.0.0" + "@nomicfoundation/ethereumjs-util" "^8.0.0" + "@nomicfoundation/ethereumjs-vm" "^6.0.0" + "@nomicfoundation/solidity-analyzer" "^0.1.0" + "@sentry/node" "^5.18.1" + "@types/bn.js" "^5.1.0" + "@types/lru-cache" "^5.1.0" + abort-controller "^3.0.0" + adm-zip "^0.4.16" + aggregate-error "^3.0.0" + ansi-escapes "^4.3.0" + chalk "^2.4.2" + chokidar "^3.4.0" + ci-info "^2.0.0" + debug "^4.1.1" + enquirer "^2.3.0" + env-paths "^2.2.0" + ethereum-cryptography "^1.0.3" + ethereumjs-abi "^0.6.8" + find-up "^2.1.0" + fp-ts "1.19.3" + fs-extra "^7.0.1" + glob "7.2.0" + immutable "^4.0.0-rc.12" + io-ts "1.10.4" + keccak "^3.0.2" + lodash "^4.17.11" + mnemonist "^0.38.0" + mocha "^10.0.0" + p-map "^4.0.0" + qs "^6.7.0" + raw-body "^2.4.1" + resolve "1.17.0" + semver "^6.3.0" + solc "0.7.3" + source-map-support "^0.5.13" + stacktrace-parser "^0.1.10" + tsort "0.0.1" + undici "^5.14.0" + uuid "^8.3.2" + ws "^7.4.6" + +has-flag@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" + integrity sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw== + +has-flag@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" + integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== + +has-symbols@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.3.tgz#bb7b2c4349251dce87b125f7bdf874aa7c8b39f8" + integrity sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A== + +has@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" + integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== + dependencies: + function-bind "^1.1.1" + +hash-base@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/hash-base/-/hash-base-3.1.0.tgz#55c381d9e06e1d2997a883b4a3fddfe7f0d3af33" + integrity sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA== + dependencies: + inherits "^2.0.4" + readable-stream "^3.6.0" + safe-buffer "^5.2.0" + +hash.js@1.1.7, hash.js@^1.0.0, hash.js@^1.0.3, hash.js@^1.1.7: + version "1.1.7" + resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.7.tgz#0babca538e8d4ee4a0f8988d68866537a003cf42" + integrity sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA== + dependencies: + inherits "^2.0.3" + minimalistic-assert "^1.0.1" + +he@1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f" + integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw== + +hmac-drbg@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1" + integrity sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg== + dependencies: + hash.js "^1.0.3" + minimalistic-assert "^1.0.0" + minimalistic-crypto-utils "^1.0.1" + +http-errors@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-2.0.0.tgz#b7774a1486ef73cf7667ac9ae0858c012c57b9d3" + integrity sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ== + dependencies: + depd "2.0.0" + inherits "2.0.4" + setprototypeof "1.2.0" + statuses "2.0.1" + toidentifier "1.0.1" + +https-proxy-agent@^5.0.0: + version "5.0.1" + resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz#c59ef224a04fe8b754f3db0063a25ea30d0005d6" + integrity sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA== + dependencies: + agent-base "6" + debug "4" + +iconv-lite@0.4.24, iconv-lite@^0.4.24: + version "0.4.24" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" + integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== + dependencies: + safer-buffer ">= 2.1.2 < 3" + +ieee754@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" + integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== + +ignore@^4.0.6: + version "4.0.6" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc" + integrity sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg== + +immutable@^4.0.0-rc.12: + version "4.2.2" + resolved "https://registry.yarnpkg.com/immutable/-/immutable-4.2.2.tgz#2da9ff4384a4330c36d4d1bc88e90f9e0b0ccd16" + integrity sha512-fTMKDwtbvO5tldky9QZ2fMX7slR0mYpY5nbnFWYp0fOzDhHqhgIw9KoYgxLWsoNTS9ZHGauHj18DTyEw6BK3Og== + +import-fresh@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-2.0.0.tgz#d81355c15612d386c61f9ddd3922d4304822a546" + integrity sha512-eZ5H8rcgYazHbKC3PG4ClHNykCSxtAhxSSEM+2mb+7evD2CKF5V7c0dNum7AdpDh0ZdICwZY9sRSn8f+KH96sg== + dependencies: + caller-path "^2.0.0" + resolve-from "^3.0.0" + +import-fresh@^3.0.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.3.0.tgz#37162c25fcb9ebaa2e6e53d5b4d88ce17d9e0c2b" + integrity sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw== + dependencies: + parent-module "^1.0.0" + resolve-from "^4.0.0" + +imurmurhash@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" + integrity sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA== + +indent-string@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-4.0.0.tgz#624f8f4497d619b2d9768531d58f4122854d7251" + integrity sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg== + +inflight@^1.0.4: + version "1.0.6" + resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" + integrity sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA== + dependencies: + once "^1.3.0" + wrappy "1" + +inherits@2, inherits@2.0.4, inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" + integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== + +inquirer@^6.2.2: + version "6.5.2" + resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-6.5.2.tgz#ad50942375d036d327ff528c08bd5fab089928ca" + integrity sha512-cntlB5ghuB0iuO65Ovoi8ogLHiWGs/5yNrtUcKjFhSSiVeAIVpD7koaSU9RM8mpXw5YDi9RdYXGQMaOURB7ycQ== + dependencies: + ansi-escapes "^3.2.0" + chalk "^2.4.2" + cli-cursor "^2.1.0" + cli-width "^2.0.0" + external-editor "^3.0.3" + figures "^2.0.0" + lodash "^4.17.12" + mute-stream "0.0.7" + run-async "^2.2.0" + rxjs "^6.4.0" + string-width "^2.1.0" + strip-ansi "^5.1.0" + through "^2.3.6" + +io-ts@1.10.4: + version "1.10.4" + resolved "https://registry.yarnpkg.com/io-ts/-/io-ts-1.10.4.tgz#cd5401b138de88e4f920adbcb7026e2d1967e6e2" + integrity sha512-b23PteSnYXSONJ6JQXRAlvJhuw8KOtkqa87W4wDtvMrud/DTJd5X+NpOOI+O/zZwVq6v0VLAaJ+1EDViKEuN9g== + dependencies: + fp-ts "^1.0.0" + +is-arrayish@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" + integrity sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg== + +is-binary-path@~2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09" + integrity sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw== + dependencies: + binary-extensions "^2.0.0" + +is-buffer@^2.0.5: + version "2.0.5" + resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-2.0.5.tgz#ebc252e400d22ff8d77fa09888821a24a658c191" + integrity sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ== + +is-directory@^0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/is-directory/-/is-directory-0.3.1.tgz#61339b6f2475fc772fd9c9d83f5c8575dc154ae1" + integrity sha512-yVChGzahRFvbkscn2MlwGismPO12i9+znNruC5gVEntG3qu0xQMzsGg/JFbrsqDOHtHFPci+V5aP5T9I+yeKqw== + +is-extglob@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" + integrity sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ== + +is-fullwidth-code-point@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" + integrity sha512-VHskAKYM8RfSFXwee5t5cbN5PZeq1Wrh6qd5bkyiXIf6UQcN6w/A0eXM9r6t8d+GYOh+o6ZhiEnb88LN/Y8m2w== + +is-fullwidth-code-point@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" + integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== + +is-glob@^4.0.1, is-glob@~4.0.1: + version "4.0.3" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084" + integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== + dependencies: + is-extglob "^2.1.1" + +is-hex-prefixed@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-hex-prefixed/-/is-hex-prefixed-1.0.0.tgz#7d8d37e6ad77e5d127148913c573e082d777f554" + integrity sha512-WvtOiug1VFrE9v1Cydwm+FnXd3+w9GaeVUss5W4v/SLy3UW00vP+6iNF2SdnfiBoLy4bTqVdkftNGTUeOFVsbA== + +is-number@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" + integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== + +is-plain-obj@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-2.1.0.tgz#45e42e37fccf1f40da8e5f76ee21515840c09287" + integrity sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA== + +is-unicode-supported@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz#3f26c76a809593b52bfa2ecb5710ed2779b522a7" + integrity sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw== + +isexe@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" + integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== + +js-sha3@0.8.0, js-sha3@^0.8.0: + version "0.8.0" + resolved "https://registry.yarnpkg.com/js-sha3/-/js-sha3-0.8.0.tgz#b9b7a5da73afad7dedd0f8c463954cbde6818840" + integrity sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q== + +js-tokens@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" + integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== + +js-yaml@4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602" + integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== + dependencies: + argparse "^2.0.1" + +js-yaml@^3.12.0, js-yaml@^3.13.0, js-yaml@^3.13.1: + version "3.14.1" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.1.tgz#dae812fdb3825fa306609a8717383c50c36a0537" + integrity sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g== + dependencies: + argparse "^1.0.7" + esprima "^4.0.0" + +json-parse-better-errors@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz#bb867cfb3450e69107c131d1c514bab3dc8bcaa9" + integrity sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw== + +json-schema-traverse@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" + integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== + +json-stable-stringify-without-jsonify@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" + integrity sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw== + +jsonc-parser@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-3.2.0.tgz#31ff3f4c2b9793f89c67212627c51c6394f88e76" + integrity sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w== + +jsonfile@^2.1.0: + version "2.4.0" + resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-2.4.0.tgz#3736a2b428b87bbda0cc83b53fa3d633a35c2ae8" + integrity sha512-PKllAqbgLgxHaj8TElYymKCAgrASebJrWpTnEkOaTowt23VKXXN0sUeriJ+eh7y6ufb/CC5ap11pz71/cM0hUw== + optionalDependencies: + graceful-fs "^4.1.6" + +jsonfile@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb" + integrity sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg== + optionalDependencies: + graceful-fs "^4.1.6" + +keccak@^3.0.0, keccak@^3.0.2: + version "3.0.3" + resolved "https://registry.yarnpkg.com/keccak/-/keccak-3.0.3.tgz#4bc35ad917be1ef54ff246f904c2bbbf9ac61276" + integrity sha512-JZrLIAJWuZxKbCilMpNz5Vj7Vtb4scDG3dMXLOsbzBmQGyjwE61BbW7bJkfKKCShXiQZt3T6sBgALRtmd+nZaQ== + dependencies: + node-addon-api "^2.0.0" + node-gyp-build "^4.2.0" + readable-stream "^3.6.0" + +klaw@^1.0.0: + version "1.3.1" + resolved "https://registry.yarnpkg.com/klaw/-/klaw-1.3.1.tgz#4088433b46b3b1ba259d78785d8e96f73ba02439" + integrity sha512-TED5xi9gGQjGpNnvRWknrwAB1eL5GciPfVFOt3Vk1OJCVDQbzuSfrF3hkUQKlsgKrG1F+0t5W0m+Fje1jIt8rw== + optionalDependencies: + graceful-fs "^4.1.9" + +level-supports@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/level-supports/-/level-supports-4.0.1.tgz#431546f9d81f10ff0fea0e74533a0e875c08c66a" + integrity sha512-PbXpve8rKeNcZ9C1mUicC9auIYFyGpkV9/i6g76tLgANwWhtG2v7I4xNBUlkn3lE2/dZF3Pi0ygYGtLc4RXXdA== + +level-transcoder@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/level-transcoder/-/level-transcoder-1.0.1.tgz#f8cef5990c4f1283d4c86d949e73631b0bc8ba9c" + integrity sha512-t7bFwFtsQeD8cl8NIoQ2iwxA0CL/9IFw7/9gAjOonH0PWTTiRfY7Hq+Ejbsxh86tXobDQ6IOiddjNYIfOBs06w== + dependencies: + buffer "^6.0.3" + module-error "^1.0.1" + +level@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/level/-/level-8.0.0.tgz#41b4c515dabe28212a3e881b61c161ffead14394" + integrity sha512-ypf0jjAk2BWI33yzEaaotpq7fkOPALKAgDBxggO6Q9HGX2MRXn0wbP1Jn/tJv1gtL867+YOjOB49WaUF3UoJNQ== + dependencies: + browser-level "^1.0.1" + classic-level "^1.2.0" + +levn@^0.3.0, levn@~0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee" + integrity sha512-0OO4y2iOHix2W6ujICbKIaEQXvFQHue65vUG3pb5EUomzPI90z9hsA1VsO/dbIIpC53J8gxM9Q4Oho0jrCM/yA== + dependencies: + prelude-ls "~1.1.2" + type-check "~0.3.2" + +locate-path@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e" + integrity sha512-NCI2kiDkyR7VeEKm27Kda/iQHyKJe1Bu0FlTbYp3CqJu+9IFe9bLyAjMxf5ZDDbEg+iMPzB5zYyUTSm8wVTKmA== + dependencies: + p-locate "^2.0.0" + path-exists "^3.0.0" + +locate-path@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-6.0.0.tgz#55321eb309febbc59c4801d931a72452a681d286" + integrity sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw== + dependencies: + p-locate "^5.0.0" + +lodash.camelcase@^4.3.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz#b28aa6288a2b9fc651035c7711f65ab6190331a6" + integrity sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA== + +lodash@^4.17.11, lodash@^4.17.12, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.16: + version "4.17.21" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" + integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== + +log-symbols@4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-4.1.0.tgz#3fbdbb95b4683ac9fc785111e792e558d4abd503" + integrity sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg== + dependencies: + chalk "^4.1.0" + is-unicode-supported "^0.1.0" + +lru-cache@^5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-5.1.1.tgz#1da27e6710271947695daf6848e847f01d84b920" + integrity sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w== + dependencies: + yallist "^3.0.2" + +lru-cache@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94" + integrity sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA== + dependencies: + yallist "^4.0.0" + +lru_map@^0.3.3: + version "0.3.3" + resolved "https://registry.yarnpkg.com/lru_map/-/lru_map-0.3.3.tgz#b5c8351b9464cbd750335a79650a0ec0e56118dd" + integrity sha512-Pn9cox5CsMYngeDbmChANltQl+5pi6XmTrraMSzhPmMBbmgcxmqWry0U3PGapCU1yB4/LqCcom7qhHZiF/jGfQ== + +lunr@^2.3.9: + version "2.3.9" + resolved "https://registry.yarnpkg.com/lunr/-/lunr-2.3.9.tgz#18b123142832337dd6e964df1a5a7707b25d35e1" + integrity sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow== + +make-error@^1.1.1: + version "1.3.6" + resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2" + integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw== + +marked@^4.2.5: + version "4.2.12" + resolved "https://registry.yarnpkg.com/marked/-/marked-4.2.12.tgz#d69a64e21d71b06250da995dcd065c11083bebb5" + integrity sha512-yr8hSKa3Fv4D3jdZmtMMPghgVt6TWbk86WQaWhDloQjRSQhMMYCAro7jP7VDJrjjdV8pxVxMssXS8B8Y5DZ5aw== + +mcl-wasm@^0.7.1: + version "0.7.9" + resolved "https://registry.yarnpkg.com/mcl-wasm/-/mcl-wasm-0.7.9.tgz#c1588ce90042a8700c3b60e40efb339fc07ab87f" + integrity sha512-iJIUcQWA88IJB/5L15GnJVnSQJmf/YaxxV6zRavv83HILHaJQb6y0iFyDMdDO0gN8X37tdxmAOrH/P8B6RB8sQ== + +md5.js@^1.3.4: + version "1.3.5" + resolved "https://registry.yarnpkg.com/md5.js/-/md5.js-1.3.5.tgz#b5d07b8e3216e3e27cd728d72f70d1e6a342005f" + integrity sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg== + dependencies: + hash-base "^3.0.0" + inherits "^2.0.1" + safe-buffer "^5.1.2" + +memory-level@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/memory-level/-/memory-level-1.0.0.tgz#7323c3fd368f9af2f71c3cd76ba403a17ac41692" + integrity sha512-UXzwewuWeHBz5krr7EvehKcmLFNoXxGcvuYhC41tRnkrTbJohtS7kVn9akmgirtRygg+f7Yjsfi8Uu5SGSQ4Og== + dependencies: + abstract-level "^1.0.0" + functional-red-black-tree "^1.0.1" + module-error "^1.0.1" + +memorystream@^0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/memorystream/-/memorystream-0.3.1.tgz#86d7090b30ce455d63fbae12dda51a47ddcaf9b2" + integrity sha512-S3UwM3yj5mtUSEfP41UZmt/0SCoVYUcU1rkXv+BQ5Ig8ndL4sPoJNBUJERafdPb5jjHJGuMgytgKvKIf58XNBw== + +mimic-fn@^1.0.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.2.0.tgz#820c86a39334640e99516928bd03fca88057d022" + integrity sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ== + +minimalistic-assert@^1.0.0, minimalistic-assert@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz#2e194de044626d4a10e7f7fbc00ce73e83e4d5c7" + integrity sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A== + +minimalistic-crypto-utils@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" + integrity sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg== + +minimatch@5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-5.0.1.tgz#fb9022f7528125187c92bd9e9b6366be1cf3415b" + integrity sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g== + dependencies: + brace-expansion "^2.0.1" + +minimatch@^3.0.4, minimatch@^3.1.1: + version "3.1.2" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" + integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== + dependencies: + brace-expansion "^1.1.7" + +minimatch@^5.1.2: + version "5.1.6" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-5.1.6.tgz#1cfcb8cf5522ea69952cd2af95ae09477f122a96" + integrity sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g== + dependencies: + brace-expansion "^2.0.1" + +minimist@^1.2.5, minimist@^1.2.6: + version "1.2.7" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.7.tgz#daa1c4d91f507390437c6a8bc01078e7000c4d18" + integrity sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g== + +mkdirp@^0.5.1: + version "0.5.6" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.6.tgz#7def03d2432dcae4ba1d611445c48396062255f6" + integrity sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw== + dependencies: + minimist "^1.2.6" + +mkdirp@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" + integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== + +mnemonist@^0.38.0: + version "0.38.5" + resolved "https://registry.yarnpkg.com/mnemonist/-/mnemonist-0.38.5.tgz#4adc7f4200491237fe0fa689ac0b86539685cade" + integrity sha512-bZTFT5rrPKtPJxj8KSV0WkPyNxl72vQepqqVUAW2ARUpUSF2qXMB6jZj7hW5/k7C1rtpzqbD/IIbJwLXUjCHeg== + dependencies: + obliterator "^2.0.0" + +mocha@^10.0.0: + version "10.2.0" + resolved "https://registry.yarnpkg.com/mocha/-/mocha-10.2.0.tgz#1fd4a7c32ba5ac372e03a17eef435bd00e5c68b8" + integrity sha512-IDY7fl/BecMwFHzoqF2sg/SHHANeBoMMXFlS9r0OXKDssYE1M5O43wUY/9BVPeIvfH2zmEbBfseqN9gBQZzXkg== + dependencies: + ansi-colors "4.1.1" + browser-stdout "1.3.1" + chokidar "3.5.3" + debug "4.3.4" + diff "5.0.0" + escape-string-regexp "4.0.0" + find-up "5.0.0" + glob "7.2.0" + he "1.2.0" + js-yaml "4.1.0" + log-symbols "4.1.0" + minimatch "5.0.1" + ms "2.1.3" + nanoid "3.3.3" + serialize-javascript "6.0.0" + strip-json-comments "3.1.1" + supports-color "8.1.1" + workerpool "6.2.1" + yargs "16.2.0" + yargs-parser "20.2.4" + yargs-unparser "2.0.0" + +module-error@^1.0.1, module-error@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/module-error/-/module-error-1.0.2.tgz#8d1a48897ca883f47a45816d4fb3e3c6ba404d86" + integrity sha512-0yuvsqSCv8LbaOKhnsQ/T5JhyFlCYLPXK3U2sgV10zoKQwzs/MyfuQUOZQ1V/6OCOJsK/TRgNVrPuPDqtdMFtA== + +ms@2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" + integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== + +ms@2.1.3: + version "2.1.3" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" + integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== + +mute-stream@0.0.7: + version "0.0.7" + resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab" + integrity sha512-r65nCZhrbXXb6dXOACihYApHw2Q6pV0M3V0PSxd74N0+D8nzAdEAITq2oAjA1jVnKI+tGvEBUpqiMh0+rW6zDQ== + +nanoid@3.3.3: + version "3.3.3" + resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.3.tgz#fd8e8b7aa761fe807dba2d1b98fb7241bb724a25" + integrity sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w== + +napi-macros@~2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/napi-macros/-/napi-macros-2.0.0.tgz#2b6bae421e7b96eb687aa6c77a7858640670001b" + integrity sha512-A0xLykHtARfueITVDernsAWdtIMbOJgKgcluwENp3AlsKN/PloyO10HtmoqnFAQAcxPkgZN7wdfPfEd0zNGxbg== + +natural-compare@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" + integrity sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw== + +neo-async@^2.6.0: + version "2.6.2" + resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.2.tgz#b4aafb93e3aeb2d8174ca53cf163ab7d7308305f" + integrity sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw== + +nice-try@^1.0.4: + version "1.0.5" + resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366" + integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ== + +node-addon-api@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-2.0.2.tgz#432cfa82962ce494b132e9d72a15b29f71ff5d32" + integrity sha512-Ntyt4AIXyaLIuMHF6IOoTakB3K+RWxwtsHNRxllEoA6vPwP9o4866g6YWDLUdnucilZhmkxiHwHr11gAENw+QA== + +node-gyp-build@^4.2.0, node-gyp-build@^4.3.0: + version "4.6.0" + resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-4.6.0.tgz#0c52e4cbf54bbd28b709820ef7b6a3c2d6209055" + integrity sha512-NTZVKn9IylLwUzaKjkas1e4u2DLNcV4rdYagA4PWdPwW87Bi7z+BznyKSRwS/761tV/lzCGXplWsiaMjLqP2zQ== + +normalize-path@^3.0.0, normalize-path@~3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" + integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== + +object-inspect@^1.9.0: + version "1.12.3" + resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.12.3.tgz#ba62dffd67ee256c8c086dfae69e016cd1f198b9" + integrity sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g== + +obliterator@^2.0.0: + version "2.0.4" + resolved "https://registry.yarnpkg.com/obliterator/-/obliterator-2.0.4.tgz#fa650e019b2d075d745e44f1effeb13a2adbe816" + integrity sha512-lgHwxlxV1qIg1Eap7LgIeoBWIMFibOjbrYPIPJZcI1mmGAI2m3lNYpK12Y+GBdPQ0U1hRwSord7GIaawz962qQ== + +once@^1.3.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" + integrity sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w== + dependencies: + wrappy "1" + +onetime@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/onetime/-/onetime-2.0.1.tgz#067428230fd67443b2794b22bba528b6867962d4" + integrity sha512-oyyPpiMaKARvvcgip+JV+7zci5L8D1W9RZIz2l1o08AM3pfspitVWnPt3mzHcBPp12oYMTy0pqrFs/C+m3EwsQ== + dependencies: + mimic-fn "^1.0.0" + +optionator@^0.8.2: + version "0.8.3" + resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.3.tgz#84fa1d036fe9d3c7e21d99884b601167ec8fb495" + integrity sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA== + dependencies: + deep-is "~0.1.3" + fast-levenshtein "~2.0.6" + levn "~0.3.0" + prelude-ls "~1.1.2" + type-check "~0.3.2" + word-wrap "~1.2.3" + +os-tmpdir@~1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" + integrity sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g== + +p-limit@^1.1.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.3.0.tgz#b86bd5f0c25690911c7590fcbfc2010d54b3ccb8" + integrity sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q== + dependencies: + p-try "^1.0.0" + +p-limit@^3.0.2: + version "3.1.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b" + integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== + dependencies: + yocto-queue "^0.1.0" + +p-locate@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43" + integrity sha512-nQja7m7gSKuewoVRen45CtVfODR3crN3goVQ0DDZ9N3yHxgpkuBhZqsaiotSQRrADUrne346peY7kT3TSACykg== + dependencies: + p-limit "^1.1.0" + +p-locate@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-5.0.0.tgz#83c8315c6785005e3bd021839411c9e110e6d834" + integrity sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw== + dependencies: + p-limit "^3.0.2" + +p-map@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/p-map/-/p-map-4.0.0.tgz#bb2f95a5eda2ec168ec9274e06a747c3e2904d2b" + integrity sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ== + dependencies: + aggregate-error "^3.0.0" + +p-try@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/p-try/-/p-try-1.0.0.tgz#cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3" + integrity sha512-U1etNYuMJoIz3ZXSrrySFjsXQTWOx2/jdi86L+2pRvph/qMKL6sbcCYdH23fqsbm8TH2Gn0OybpT4eSFlCVHww== + +parent-module@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/parent-module/-/parent-module-1.0.1.tgz#691d2709e78c79fae3a156622452d00762caaaa2" + integrity sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g== + dependencies: + callsites "^3.0.0" + +parse-json@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-4.0.0.tgz#be35f5425be1f7f6c747184f98a788cb99477ee0" + integrity sha512-aOIos8bujGN93/8Ox/jPLh7RwVnPEysynVFE+fQZyg6jKELEHwzgKdLRFHUgXJL6kylijVSBC4BvN9OmsB48Rw== + dependencies: + error-ex "^1.3.1" + json-parse-better-errors "^1.0.1" + +path-exists@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" + integrity sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ== + +path-exists@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" + integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== + +path-is-absolute@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" + integrity sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg== + +path-is-inside@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/path-is-inside/-/path-is-inside-1.0.2.tgz#365417dede44430d1c11af61027facf074bdfc53" + integrity sha512-DUWJr3+ULp4zXmol/SZkFf3JGsS9/SIv+Y3Rt93/UjPpDpklB5f1er4O3POIbUuUJ3FXgqte2Q7SrU6zAqwk8w== + +path-key@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" + integrity sha512-fEHGKCSmUSDPv4uoj8AlD+joPlq3peND+HRYyxFz4KPw4z926S/b8rIuFs2FYJg3BwsxJf6A9/3eIdLaYC+9Dw== + +path-parse@^1.0.6: + version "1.0.7" + resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" + integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== + +pbkdf2@^3.0.17: + version "3.1.2" + resolved "https://registry.yarnpkg.com/pbkdf2/-/pbkdf2-3.1.2.tgz#dd822aa0887580e52f1a039dc3eda108efae3075" + integrity sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA== + dependencies: + create-hash "^1.1.2" + create-hmac "^1.1.4" + ripemd160 "^2.0.1" + safe-buffer "^5.0.1" + sha.js "^2.4.8" + +picomatch@^2.0.4, picomatch@^2.2.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" + integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== + +prelude-ls@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" + integrity sha512-ESF23V4SKG6lVSGZgYNpbsiaAkdab6ZgOxe52p7+Kid3W3u3bxR4Vfd/o21dmN7jSt0IwgZ4v5MUd26FEtXE9w== + +prettier-plugin-solidity@^1.0.0-beta.19: + version "1.1.1" + resolved "https://registry.yarnpkg.com/prettier-plugin-solidity/-/prettier-plugin-solidity-1.1.1.tgz#4d3375b85f97812ffcbe48d5a8b3fe914d69c91f" + integrity sha512-uD24KO26tAHF+zMN2nt1OUzfknzza5AgxjogQQrMLZc7j8xiQrDoNWNeOlfFC0YLTwo12CLD10b9niLyP6AqXg== + dependencies: + "@solidity-parser/parser" "^0.14.5" + semver "^7.3.8" + solidity-comments-extractor "^0.0.7" + +prettier@^1.14.3: + version "1.19.1" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.19.1.tgz#f7d7f5ff8a9cd872a7be4ca142095956a60797cb" + integrity sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew== + +prettier@^2.3.1, prettier@^2.6.2: + version "2.8.3" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.3.tgz#ab697b1d3dd46fb4626fbe2f543afe0cc98d8632" + integrity sha512-tJ/oJ4amDihPoufT5sM0Z1SKEuKay8LfVAMlbbhnnkvt6BUserZylqo2PN+p9KeljLr0OHa2rXHU1T8reeoTrw== + +progress@^2.0.0: + version "2.0.3" + resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8" + integrity sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA== + +punycode@^2.1.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.3.0.tgz#f67fa67c94da8f4d0cfff981aee4118064199b8f" + integrity sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA== + +qs@^6.7.0: + version "6.11.0" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.11.0.tgz#fd0d963446f7a65e1367e01abd85429453f0c37a" + integrity sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q== + dependencies: + side-channel "^1.0.4" + +queue-microtask@^1.2.2, queue-microtask@^1.2.3: + version "1.2.3" + resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243" + integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A== + +randombytes@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a" + integrity sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ== + dependencies: + safe-buffer "^5.1.0" + +raw-body@^2.4.1: + version "2.5.1" + resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.5.1.tgz#fe1b1628b181b700215e5fd42389f98b71392857" + integrity sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig== + dependencies: + bytes "3.1.2" + http-errors "2.0.0" + iconv-lite "0.4.24" + unpipe "1.0.0" + +readable-stream@^3.6.0: + version "3.6.0" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.0.tgz#337bbda3adc0706bd3e024426a286d4b4b2c9198" + integrity sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA== + dependencies: + inherits "^2.0.3" + string_decoder "^1.1.1" + util-deprecate "^1.0.1" + +readdirp@~3.6.0: + version "3.6.0" + resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.6.0.tgz#74a370bd857116e245b29cc97340cd431a02a6c7" + integrity sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA== + dependencies: + picomatch "^2.2.1" + +reduce-flatten@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/reduce-flatten/-/reduce-flatten-2.0.0.tgz#734fd84e65f375d7ca4465c69798c25c9d10ae27" + integrity sha512-EJ4UNY/U1t2P/2k6oqotuX2Cc3T6nxJwsM0N0asT7dhrtH1ltUxDn4NalSYmPE2rCkVpcf/X6R0wDwcFpzhd4w== + +regexpp@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-2.0.1.tgz#8d19d31cf632482b589049f8281f93dbcba4d07f" + integrity sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw== + +require-directory@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" + integrity sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q== + +require-from-string@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-2.0.2.tgz#89a7fdd938261267318eafe14f9c32e598c36909" + integrity sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw== + +resolve-from@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-3.0.0.tgz#b22c7af7d9d6881bc8b6e653335eebcb0a188748" + integrity sha512-GnlH6vxLymXJNMBo7XP1fJIzBFbdYt49CuTwmB/6N53t+kMPRMFKz783LlQ4tv28XoQfMWinAJX6WCGf2IlaIw== + +resolve-from@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6" + integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g== + +resolve@1.17.0: + version "1.17.0" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.17.0.tgz#b25941b54968231cc2d1bb76a79cb7f2c0bf8444" + integrity sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w== + dependencies: + path-parse "^1.0.6" + +restore-cursor@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-2.0.0.tgz#9f7ee287f82fd326d4fd162923d62129eee0dfaf" + integrity sha512-6IzJLuGi4+R14vwagDHX+JrXmPVtPpn4mffDJ1UdR7/Edm87fl6yi8mMBIVvFtJaNTUvjughmW4hwLhRG7gC1Q== + dependencies: + onetime "^2.0.0" + signal-exit "^3.0.2" + +rimraf@2.6.3: + version "2.6.3" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.3.tgz#b2d104fe0d8fb27cf9e0a1cda8262dd3833c6cab" + integrity sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA== + dependencies: + glob "^7.1.3" + +rimraf@^2.2.8: + version "2.7.1" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec" + integrity sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w== + dependencies: + glob "^7.1.3" + +rimraf@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" + integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== + dependencies: + glob "^7.1.3" + +ripemd160@^2.0.0, ripemd160@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/ripemd160/-/ripemd160-2.0.2.tgz#a1c1a6f624751577ba5d07914cbc92850585890c" + integrity sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA== + dependencies: + hash-base "^3.0.0" + inherits "^2.0.1" + +rlp@^2.2.3: + version "2.2.7" + resolved "https://registry.yarnpkg.com/rlp/-/rlp-2.2.7.tgz#33f31c4afac81124ac4b283e2bd4d9720b30beaf" + integrity sha512-d5gdPmgQ0Z+AklL2NVXr/IoSjNZFfTVvQWzL/AM2AOcSzYP2xjlb0AC8YyCLc41MSNf6P6QVtjgPdmVtzb+4lQ== + dependencies: + bn.js "^5.2.0" + +run-async@^2.2.0: + version "2.4.1" + resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.4.1.tgz#8440eccf99ea3e70bd409d49aab88e10c189a455" + integrity sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ== + +run-parallel-limit@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/run-parallel-limit/-/run-parallel-limit-1.1.0.tgz#be80e936f5768623a38a963262d6bef8ff11e7ba" + integrity sha512-jJA7irRNM91jaKc3Hcl1npHsFLOXOoTkPCUL1JEa1R82O2miplXXRaGdjW/KM/98YQWDhJLiSs793CnXfblJUw== + dependencies: + queue-microtask "^1.2.2" + +rustbn.js@~0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/rustbn.js/-/rustbn.js-0.2.0.tgz#8082cb886e707155fd1cb6f23bd591ab8d55d0ca" + integrity sha512-4VlvkRUuCJvr2J6Y0ImW7NvTCriMi7ErOAqWk1y69vAdoNIzCF3yPmgeNzx+RQTLEDFq5sHfscn1MwHxP9hNfA== + +rxjs@^6.4.0: + version "6.6.7" + resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.6.7.tgz#90ac018acabf491bf65044235d5863c4dab804c9" + integrity sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ== + dependencies: + tslib "^1.9.0" + +safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@^5.2.0, safe-buffer@~5.2.0: + version "5.2.1" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" + integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== + +"safer-buffer@>= 2.1.2 < 3": + version "2.1.2" + resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" + integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== + +scrypt-js@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/scrypt-js/-/scrypt-js-3.0.1.tgz#d314a57c2aef69d1ad98a138a21fe9eafa9ee312" + integrity sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA== + +secp256k1@^4.0.1: + version "4.0.3" + resolved "https://registry.yarnpkg.com/secp256k1/-/secp256k1-4.0.3.tgz#c4559ecd1b8d3c1827ed2d1b94190d69ce267303" + integrity sha512-NLZVf+ROMxwtEj3Xa562qgv2BK5e2WNmXPiOdVIPLgs6lyTzMvBq0aWTYMI5XCP9jZMVKOcqZLw/Wc4vDkuxhA== + dependencies: + elliptic "^6.5.4" + node-addon-api "^2.0.0" + node-gyp-build "^4.2.0" + +semver@^5.5.0, semver@^5.5.1: + version "5.7.1" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" + integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== + +semver@^6.3.0: + version "6.3.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" + integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== + +semver@^7.3.8: + version "7.3.8" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.8.tgz#07a78feafb3f7b32347d725e33de7e2a2df67798" + integrity sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A== + dependencies: + lru-cache "^6.0.0" + +serialize-javascript@6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-6.0.0.tgz#efae5d88f45d7924141da8b5c3a7a7e663fefeb8" + integrity sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag== + dependencies: + randombytes "^2.1.0" + +setimmediate@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285" + integrity sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA== + +setprototypeof@1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.2.0.tgz#66c9a24a73f9fc28cbe66b09fed3d33dcaf1b424" + integrity sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw== + +sha.js@^2.4.0, sha.js@^2.4.8: + version "2.4.11" + resolved "https://registry.yarnpkg.com/sha.js/-/sha.js-2.4.11.tgz#37a5cf0b81ecbc6943de109ba2960d1b26584ae7" + integrity sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ== + dependencies: + inherits "^2.0.1" + safe-buffer "^5.0.1" + +shebang-command@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" + integrity sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg== + dependencies: + shebang-regex "^1.0.0" + +shebang-regex@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" + integrity sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ== + +shiki@^0.12.1: + version "0.12.1" + resolved "https://registry.yarnpkg.com/shiki/-/shiki-0.12.1.tgz#26fce51da12d055f479a091a5307470786f300cd" + integrity sha512-aieaV1m349rZINEBkjxh2QbBvFFQOlgqYTNtCal82hHj4dDZ76oMlQIX+C7ryerBTDiga3e5NfH6smjdJ02BbQ== + dependencies: + jsonc-parser "^3.2.0" + vscode-oniguruma "^1.7.0" + vscode-textmate "^8.0.0" + +side-channel@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.4.tgz#efce5c8fdc104ee751b25c58d4290011fa5ea2cf" + integrity sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw== + dependencies: + call-bind "^1.0.0" + get-intrinsic "^1.0.2" + object-inspect "^1.9.0" + +signal-exit@^3.0.2: + version "3.0.7" + resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9" + integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== + +slice-ansi@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-2.1.0.tgz#cacd7693461a637a5788d92a7dd4fba068e81636" + integrity sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ== + dependencies: + ansi-styles "^3.2.0" + astral-regex "^1.0.0" + is-fullwidth-code-point "^2.0.0" + +solc@0.7.3: + version "0.7.3" + resolved "https://registry.yarnpkg.com/solc/-/solc-0.7.3.tgz#04646961bd867a744f63d2b4e3c0701ffdc7d78a" + integrity sha512-GAsWNAjGzIDg7VxzP6mPjdurby3IkGCjQcM8GFYZT6RyaoUZKmMU6Y7YwG+tFGhv7dwZ8rmR4iwFDrrD99JwqA== + dependencies: + command-exists "^1.2.8" + commander "3.0.2" + follow-redirects "^1.12.1" + fs-extra "^0.30.0" + js-sha3 "0.8.0" + memorystream "^0.3.1" + require-from-string "^2.0.0" + semver "^5.5.0" + tmp "0.0.33" + +solhint@^3.3.7: + version "3.3.8" + resolved "https://registry.yarnpkg.com/solhint/-/solhint-3.3.8.tgz#b1773c881cfaf0b5008c78ad658a69603d3fa051" + integrity sha512-TkYyJ6uUJCaiqRKuhHhFuoAoyco9Ia+RDKhl3usjG/rkaNk8/LdLRla2Xln7MVdBTaPKNAU8ezTRSit50Yy4qw== + dependencies: + "@solidity-parser/parser" "^0.14.5" + ajv "^6.6.1" + antlr4 "4.7.1" + ast-parents "0.0.1" + chalk "^2.4.2" + commander "2.18.0" + cosmiconfig "^5.0.7" + eslint "^5.6.0" + fast-diff "^1.1.2" + glob "^7.1.3" + ignore "^4.0.6" + js-yaml "^3.12.0" + lodash "^4.17.11" + semver "^6.3.0" + optionalDependencies: + prettier "^1.14.3" + +solidity-ast@^0.4.38: + version "0.4.44" + resolved "https://registry.yarnpkg.com/solidity-ast/-/solidity-ast-0.4.44.tgz#dd6732bd65bb1d01777fc537de99cbb3d4e0089d" + integrity sha512-Ct3ppqWS0uTWNYxM2cgruUeWYzqYmeikANsCHgGBnMjAMsqONgqnYrlpifQxNFwXOPHD3vZQLmCjaYnQ+i3eQA== + +solidity-comments-extractor@^0.0.7: + version "0.0.7" + resolved "https://registry.yarnpkg.com/solidity-comments-extractor/-/solidity-comments-extractor-0.0.7.tgz#99d8f1361438f84019795d928b931f4e5c39ca19" + integrity sha512-wciNMLg/Irp8OKGrh3S2tfvZiZ0NEyILfcRCXCD4mp7SgK/i9gzLfhY2hY7VMCQJ3kH9UB9BzNdibIVMchzyYw== + +solidity-docgen@^0.6.0-beta.22: + version "0.6.0-beta.34" + resolved "https://registry.yarnpkg.com/solidity-docgen/-/solidity-docgen-0.6.0-beta.34.tgz#f1766b13ea864ea71b8e727796d30a69ea90014a" + integrity sha512-igdGrkg8gT1jn+B2NwzjEtSf+7NTrSi/jz88zO7MZWgETmcWbXaxgAsQP4BQeC4YFeH0Pie1NsLP7+9qDgvFtA== + dependencies: + handlebars "^4.7.7" + solidity-ast "^0.4.38" + +source-map-support@^0.5.13: + version "0.5.21" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.21.tgz#04fe7c7f9e1ed2d662233c28cb2b35b9f63f6e4f" + integrity sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w== + dependencies: + buffer-from "^1.0.0" + source-map "^0.6.0" + +source-map@^0.6.0, source-map@^0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" + integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== + +sprintf-js@~1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" + integrity sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g== + +stacktrace-parser@^0.1.10: + version "0.1.10" + resolved "https://registry.yarnpkg.com/stacktrace-parser/-/stacktrace-parser-0.1.10.tgz#29fb0cae4e0d0b85155879402857a1639eb6051a" + integrity sha512-KJP1OCML99+8fhOHxwwzyWrlUuVX5GQ0ZpJTd1DFXhdkrvg1szxfHhawXUZ3g9TkXORQd4/WG68jMlQZ2p8wlg== + dependencies: + type-fest "^0.7.1" + +statuses@2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/statuses/-/statuses-2.0.1.tgz#55cb000ccf1d48728bd23c685a063998cf1a1b63" + integrity sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ== + +streamsearch@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/streamsearch/-/streamsearch-1.1.0.tgz#404dd1e2247ca94af554e841a8ef0eaa238da764" + integrity sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg== + +string-format@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/string-format/-/string-format-2.0.0.tgz#f2df2e7097440d3b65de31b6d40d54c96eaffb9b" + integrity sha512-bbEs3scLeYNXLecRRuk6uJxdXUSj6le/8rNPHChIJTn2V79aXVTR1EH2OH5zLKKoz0V02fOUKZZcw01pLUShZA== + +string-width@^2.1.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" + integrity sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw== + dependencies: + is-fullwidth-code-point "^2.0.0" + strip-ansi "^4.0.0" + +string-width@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-3.1.0.tgz#22767be21b62af1081574306f69ac51b62203961" + integrity sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w== + dependencies: + emoji-regex "^7.0.1" + is-fullwidth-code-point "^2.0.0" + strip-ansi "^5.1.0" + +string-width@^4.1.0, string-width@^4.2.0: + version "4.2.3" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" + integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== + dependencies: + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.1" + +string_decoder@^1.1.1: + version "1.3.0" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e" + integrity sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA== + dependencies: + safe-buffer "~5.2.0" + +strip-ansi@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f" + integrity sha512-4XaJ2zQdCzROZDivEVIDPkcQn8LMFSa8kj8Gxb/Lnwzv9A8VctNZ+lfivC/sV3ivW8ElJTERXZoPBRrZKkNKow== + dependencies: + ansi-regex "^3.0.0" + +strip-ansi@^5.1.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-5.2.0.tgz#8c9a536feb6afc962bdfa5b104a5091c1ad9c0ae" + integrity sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA== + dependencies: + ansi-regex "^4.1.0" + +strip-ansi@^6.0.0, strip-ansi@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" + integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== + dependencies: + ansi-regex "^5.0.1" + +strip-hex-prefix@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/strip-hex-prefix/-/strip-hex-prefix-1.0.0.tgz#0c5f155fef1151373377de9dbb588da05500e36f" + integrity sha512-q8d4ue7JGEiVcypji1bALTos+0pWtyGlivAWyPuTkHzuTCJqrK9sWxYQZUq6Nq3cuyv3bm734IhHvHtGGURU6A== + dependencies: + is-hex-prefixed "1.0.0" + +strip-json-comments@3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" + integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== + +strip-json-comments@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" + integrity sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ== + +supports-color@8.1.1: + version "8.1.1" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-8.1.1.tgz#cd6fc17e28500cff56c1b86c0a7fd4a54a73005c" + integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q== + dependencies: + has-flag "^4.0.0" + +supports-color@^5.3.0: + version "5.5.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" + integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== + dependencies: + has-flag "^3.0.0" + +supports-color@^7.1.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" + integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== + dependencies: + has-flag "^4.0.0" + +table-layout@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/table-layout/-/table-layout-1.0.2.tgz#c4038a1853b0136d63365a734b6931cf4fad4a04" + integrity sha512-qd/R7n5rQTRFi+Zf2sk5XVVd9UQl6ZkduPFC3S7WEGJAmetDTjY3qPN50eSKzwuzEyQKy5TN2TiZdkIjos2L6A== + dependencies: + array-back "^4.0.1" + deep-extend "~0.6.0" + typical "^5.2.0" + wordwrapjs "^4.0.0" + +table@^5.2.3: + version "5.4.6" + resolved "https://registry.yarnpkg.com/table/-/table-5.4.6.tgz#1292d19500ce3f86053b05f0e8e7e4a3bb21079e" + integrity sha512-wmEc8m4fjnob4gt5riFRtTu/6+4rSe12TpAELNSqHMfF3IqnA+CH37USM6/YR3qRZv7e56kAEAtd6nKZaxe0Ug== + dependencies: + ajv "^6.10.2" + lodash "^4.17.14" + slice-ansi "^2.1.0" + string-width "^3.0.0" + +text-table@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" + integrity sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw== + +through@^2.3.6: + version "2.3.8" + resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" + integrity sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg== + +tmp@0.0.33, tmp@^0.0.33: + version "0.0.33" + resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9" + integrity sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw== + dependencies: + os-tmpdir "~1.0.2" + +to-regex-range@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" + integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== + dependencies: + is-number "^7.0.0" + +toidentifier@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.1.tgz#3be34321a88a820ed1bd80dfaa33e479fbb8dd35" + integrity sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA== + +ts-command-line-args@^2.2.0: + version "2.4.2" + resolved "https://registry.yarnpkg.com/ts-command-line-args/-/ts-command-line-args-2.4.2.tgz#b4815b23c35f8a0159d4e69e01012d95690bc448" + integrity sha512-mJLQQBOdyD4XI/ZWQY44PIdYde47JhV2xl380O7twPkTQ+Y5vFDHsk8LOeXKuz7dVY5aDCfAzRarNfSqtKOkQQ== + dependencies: + "@morgan-stanley/ts-mocking-bird" "^0.6.2" + chalk "^4.1.0" + command-line-args "^5.1.1" + command-line-usage "^6.1.0" + string-format "^2.0.0" + +ts-essentials@^7.0.1: + version "7.0.3" + resolved "https://registry.yarnpkg.com/ts-essentials/-/ts-essentials-7.0.3.tgz#686fd155a02133eedcc5362dc8b5056cde3e5a38" + integrity sha512-8+gr5+lqO3G84KdiTSMRLtuyJ+nTBVRKuCrK4lidMPdVeEp0uqC875uE5NMcaA7YYMN7XsNiFQuMvasF8HT/xQ== + +ts-node@10.7: + version "10.7.0" + resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-10.7.0.tgz#35d503d0fab3e2baa672a0e94f4b40653c2463f5" + integrity sha512-TbIGS4xgJoX2i3do417KSaep1uRAW/Lu+WAL2doDHC0D6ummjirVOXU5/7aiZotbQ5p1Zp9tP7U6cYhA0O7M8A== + dependencies: + "@cspotcode/source-map-support" "0.7.0" + "@tsconfig/node10" "^1.0.7" + "@tsconfig/node12" "^1.0.7" + "@tsconfig/node14" "^1.0.0" + "@tsconfig/node16" "^1.0.2" + acorn "^8.4.1" + acorn-walk "^8.1.1" + arg "^4.1.0" + create-require "^1.1.0" + diff "^4.0.1" + make-error "^1.1.1" + v8-compile-cache-lib "^3.0.0" + yn "3.1.1" + +tslib@^1.9.0, tslib@^1.9.3: + version "1.14.1" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" + integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== + +tsort@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/tsort/-/tsort-0.0.1.tgz#e2280f5e817f8bf4275657fd0f9aebd44f5a2786" + integrity sha512-Tyrf5mxF8Ofs1tNoxA13lFeZ2Zrbd6cKbuH3V+MQ5sb6DtBj5FjrXVsRWT8YvNAQTqNoz66dz1WsbigI22aEnw== + +tweetnacl-util@^0.15.1: + version "0.15.1" + resolved "https://registry.yarnpkg.com/tweetnacl-util/-/tweetnacl-util-0.15.1.tgz#b80fcdb5c97bcc508be18c44a4be50f022eea00b" + integrity sha512-RKJBIj8lySrShN4w6i/BonWp2Z/uxwC3h4y7xsRrpP59ZboCd0GpEVsOnMDYLMmKBpYhb5TgHzZXy7wTfYFBRw== + +tweetnacl@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-1.0.3.tgz#ac0af71680458d8a6378d0d0d050ab1407d35596" + integrity sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw== + +type-check@~0.3.2: + version "0.3.2" + resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72" + integrity sha512-ZCmOJdvOWDBYJlzAoFkC+Q0+bUyEOS1ltgp1MGU03fqHG+dbi9tBFU2Rd9QKiDZFAYrhPh2JUf7rZRIuHRKtOg== + dependencies: + prelude-ls "~1.1.2" + +type-fest@^0.21.3: + version "0.21.3" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.21.3.tgz#d260a24b0198436e133fa26a524a6d65fa3b2e37" + integrity sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w== + +type-fest@^0.7.1: + version "0.7.1" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.7.1.tgz#8dda65feaf03ed78f0a3f9678f1869147f7c5c48" + integrity sha512-Ne2YiiGN8bmrmJJEuTWTLJR32nh/JdL1+PSicowtNb0WFpn59GK8/lfD61bVtzguz7b3PBt74nxpv/Pw5po5Rg== + +typechain@^8.1.1: + version "8.1.1" + resolved "https://registry.yarnpkg.com/typechain/-/typechain-8.1.1.tgz#9c2e8012c2c4c586536fc18402dcd7034c4ff0bd" + integrity sha512-uF/sUvnXTOVF2FHKhQYnxHk4su4JjZR8vr4mA2mBaRwHTbwh0jIlqARz9XJr1tA0l7afJGvEa1dTSi4zt039LQ== + dependencies: + "@types/prettier" "^2.1.1" + debug "^4.3.1" + fs-extra "^7.0.0" + glob "7.1.7" + js-sha3 "^0.8.0" + lodash "^4.17.15" + mkdirp "^1.0.4" + prettier "^2.3.1" + ts-command-line-args "^2.2.0" + ts-essentials "^7.0.1" + +typedoc@^0.23.10: + version "0.23.24" + resolved "https://registry.yarnpkg.com/typedoc/-/typedoc-0.23.24.tgz#01cf32c09f2c19362e72a9ce1552d6e5b48c4fef" + integrity sha512-bfmy8lNQh+WrPYcJbtjQ6JEEsVl/ce1ZIXyXhyW+a1vFrjO39t6J8sL/d6FfAGrJTc7McCXgk9AanYBSNvLdIA== + dependencies: + lunr "^2.3.9" + marked "^4.2.5" + minimatch "^5.1.2" + shiki "^0.12.1" + +typical@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/typical/-/typical-4.0.0.tgz#cbeaff3b9d7ae1e2bbfaf5a4e6f11eccfde94fc4" + integrity sha512-VAH4IvQ7BDFYglMd7BPRDfLgxZZX4O4TFcRDA6EN5X7erNJJq+McIEp8np9aVtxrCJ6qx4GTYVfOWNjcqwZgRw== + +typical@^5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/typical/-/typical-5.2.0.tgz#4daaac4f2b5315460804f0acf6cb69c52bb93066" + integrity sha512-dvdQgNDNJo+8B2uBQoqdb11eUCE1JQXhvjC/CZtgvZseVd5TYMXnq0+vuUemXbd/Se29cTaUuPX3YIc2xgbvIg== + +uglify-js@^3.1.4: + version "3.17.4" + resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.17.4.tgz#61678cf5fa3f5b7eb789bb345df29afb8257c22c" + integrity sha512-T9q82TJI9e/C1TAxYvfb16xO120tMVFZrGA3f9/P4424DNu6ypK103y0GPFVa17yotwSyZW5iYXgjYHkGrJW/g== + +undici@^5.14.0: + version "5.16.0" + resolved "https://registry.yarnpkg.com/undici/-/undici-5.16.0.tgz#6b64f9b890de85489ac6332bd45ca67e4f7d9943" + integrity sha512-KWBOXNv6VX+oJQhchXieUznEmnJMqgXMbs0xxH2t8q/FUAWSJvOSr/rMaZKnX5RIVq7JDn0JbP4BOnKG2SGXLQ== + dependencies: + busboy "^1.6.0" + +universalify@^0.1.0: + version "0.1.2" + resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66" + integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg== + +unpipe@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" + integrity sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ== + +uri-js@^4.2.2: + version "4.4.1" + resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e" + integrity sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg== + dependencies: + punycode "^2.1.0" + +util-deprecate@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" + integrity sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw== + +uuid@^7.0.3: + version "7.0.3" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-7.0.3.tgz#c5c9f2c8cf25dc0a372c4df1441c41f5bd0c680b" + integrity sha512-DPSke0pXhTZgoF/d+WSt2QaKMCFSfx7QegxEWT+JOuHF5aWrKEn0G+ztjuJg/gG8/ItK+rbPCD/yNv8yyih6Cg== + +uuid@^8.3.2: + version "8.3.2" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2" + integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== + +v8-compile-cache-lib@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz#6336e8d71965cb3d35a1bbb7868445a7c05264bf" + integrity sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg== + +vscode-oniguruma@^1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/vscode-oniguruma/-/vscode-oniguruma-1.7.0.tgz#439bfad8fe71abd7798338d1cd3dc53a8beea94b" + integrity sha512-L9WMGRfrjOhgHSdOYgCt/yRMsXzLDJSL7BPrOZt73gU0iWO4mpqzqQzOz5srxqTvMBaR0XZTSrVWo4j55Rc6cA== + +vscode-textmate@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/vscode-textmate/-/vscode-textmate-8.0.0.tgz#2c7a3b1163ef0441097e0b5d6389cd5504b59e5d" + integrity sha512-AFbieoL7a5LMqcnOF04ji+rpXadgOXnZsxQr//r83kLPr7biP7am3g9zbaZIaBGwBRWeSvoMD4mgPdX3e4NWBg== + +which@^1.2.9: + version "1.3.1" + resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" + integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ== + dependencies: + isexe "^2.0.0" + +word-wrap@~1.2.3: + version "1.2.3" + resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c" + integrity sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ== + +wordwrap@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" + integrity sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q== + +wordwrapjs@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/wordwrapjs/-/wordwrapjs-4.0.1.tgz#d9790bccfb110a0fc7836b5ebce0937b37a8b98f" + integrity sha512-kKlNACbvHrkpIw6oPeYDSmdCTu2hdMHoyXLTcUKala++lx5Y+wjJ/e474Jqv5abnVmwxw08DiTuHmw69lJGksA== + dependencies: + reduce-flatten "^2.0.0" + typical "^5.2.0" + +workerpool@6.2.1: + version "6.2.1" + resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.2.1.tgz#46fc150c17d826b86a008e5a4508656777e9c343" + integrity sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw== + +wrap-ansi@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" + integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== + dependencies: + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + +wrappy@1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== + +write@1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/write/-/write-1.0.3.tgz#0800e14523b923a387e415123c865616aae0f5c3" + integrity sha512-/lg70HAjtkUgWPVZhZcm+T4hkL8Zbtp1nFNOn3lRrxnlv50SRBv7cR7RqR+GMsd3hUXy9hWBo4CHTbFTcOYwig== + dependencies: + mkdirp "^0.5.1" + +ws@^7.4.6: + version "7.5.9" + resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.9.tgz#54fa7db29f4c7cec68b1ddd3a89de099942bb591" + integrity sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q== + +y18n@^5.0.5: + version "5.0.8" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55" + integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA== + +yallist@^3.0.2: + version "3.1.1" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd" + integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g== + +yallist@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" + integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== + +yargs-parser@20.2.4: + version "20.2.4" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.4.tgz#b42890f14566796f85ae8e3a25290d205f154a54" + integrity sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA== + +yargs-parser@^20.2.2: + version "20.2.9" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee" + integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w== + +yargs-unparser@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/yargs-unparser/-/yargs-unparser-2.0.0.tgz#f131f9226911ae5d9ad38c432fe809366c2325eb" + integrity sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA== + dependencies: + camelcase "^6.0.0" + decamelize "^4.0.0" + flat "^5.0.2" + is-plain-obj "^2.1.0" + +yargs@16.2.0: + version "16.2.0" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.2.0.tgz#1c82bf0f6b6a66eafce7ef30e376f49a12477f66" + integrity sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw== + dependencies: + cliui "^7.0.2" + escalade "^3.1.1" + get-caller-file "^2.0.5" + require-directory "^2.1.1" + string-width "^4.2.0" + y18n "^5.0.5" + yargs-parser "^20.2.2" + +yn@3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/yn/-/yn-3.1.1.tgz#1e87401a09d767c1d5eab26a6e4c185182d2eb50" + integrity sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q== + +yocto-queue@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" + integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== diff --git a/yarn.lock b/yarn.lock index 04642ed950..c16fd6af15 100644 --- a/yarn.lock +++ b/yarn.lock @@ -69,15 +69,6 @@ json5 "^2.2.2" semver "^6.3.0" -"@babel/generator@7.18.2": - version "7.18.2" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.18.2.tgz#33873d6f89b21efe2da63fe554460f3df1c5880d" - integrity sha512-W1lG5vUwFvfMd8HVXqdfbuG7RuaSrTCCD8cl8fP8wOivdbtbIg2Db3IWUcgvfxKbbn6ZBGYRW/Zk1MIwK49mgw== - dependencies: - "@babel/types" "^7.18.2" - "@jridgewell/gen-mapping" "^0.3.0" - jsesc "^2.5.1" - "@babel/generator@^7.18.10", "@babel/generator@^7.7.2": version "7.18.12" resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.18.12.tgz#fa58daa303757bd6f5e4bbca91b342040463d9f4" @@ -216,7 +207,7 @@ resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.19.4.tgz#38d3acb654b4701a9b77fb0615a96f775c3a9e63" integrity sha512-nHtDoQcuqFmwYNYPz3Rah5ph2p8PFeFCsZk9A/48dPc/rGocJ5J3hAAZ7pb76VWX3fZKu+uEr/FhH5jLx7umrw== -"@babel/helper-validator-identifier@^7.16.7", "@babel/helper-validator-identifier@^7.18.6": +"@babel/helper-validator-identifier@^7.18.6": version "7.18.6" resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.18.6.tgz#9c97e30d31b2b8c72a1d08984f2ca9b574d7a076" integrity sha512-MmetCkz9ej86nJQV+sFCxoGGrUbU3q02kgLciwkrt9QqEB7cP39oKEY0PakknEO0Gu20SskMRi+AYZ3b1TpN9g== @@ -258,11 +249,6 @@ chalk "^2.0.0" js-tokens "^4.0.0" -"@babel/parser@7.18.4": - version "7.18.4" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.18.4.tgz#6774231779dd700e0af29f6ad8d479582d7ce5ef" - integrity sha512-FDge0dFazETFcxGw/EXzOkN8uJp0PC7Qbm+Pe9T+av2zlBpOgunFHkQPPn+eRuClU73JF+98D531UgayY89tow== - "@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.18.10", "@babel/parser@^7.18.11": version "7.18.11" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.18.11.tgz#68bb07ab3d380affa9a3f96728df07969645d2d9" @@ -428,15 +414,7 @@ debug "^4.1.0" globals "^11.1.0" -"@babel/types@7.18.4": - version "7.18.4" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.18.4.tgz#27eae9b9fd18e9dccc3f9d6ad051336f307be354" - integrity sha512-ThN1mBcMq5pG/Vm2IcBmPPfyPXbd8S02rS+OBIDENdufvqC7Z/jHPCv9IcP01277aKtDI8g/2XysBN4hA8niiw== - dependencies: - "@babel/helper-validator-identifier" "^7.16.7" - to-fast-properties "^2.0.0" - -"@babel/types@^7.0.0", "@babel/types@^7.18.10", "@babel/types@^7.18.2", "@babel/types@^7.18.6", "@babel/types@^7.18.9", "@babel/types@^7.3.0", "@babel/types@^7.3.3": +"@babel/types@^7.0.0", "@babel/types@^7.18.10", "@babel/types@^7.18.6", "@babel/types@^7.18.9", "@babel/types@^7.3.0", "@babel/types@^7.3.3": version "7.18.10" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.18.10.tgz#4908e81b6b339ca7c6b7a555a5fc29446f26dde6" integrity sha512-MJvnbEiiNkpjo+LknnmRrqbY1GPUUggjv+wQVjetM/AONoupqRALB7I6jGqNUAZsKcRIEu2J6FRFvsczljjsaQ== @@ -679,6 +657,16 @@ dependencies: "@jridgewell/trace-mapping" "0.3.9" +"@esbuild/android-arm64@0.16.17": + version "0.16.17" + resolved "https://registry.yarnpkg.com/@esbuild/android-arm64/-/android-arm64-0.16.17.tgz#cf91e86df127aa3d141744edafcba0abdc577d23" + integrity sha512-MIGl6p5sc3RDTLLkYL1MyL8BMRN4tLMRCn+yRJJmEDvYZ2M7tmAf80hx1kbNEUX2KJ50RRtxZ4JHLvCfuB6kBg== + +"@esbuild/android-arm64@0.17.8": + version "0.17.8" + resolved "https://registry.yarnpkg.com/@esbuild/android-arm64/-/android-arm64-0.17.8.tgz#b3d5b65a3b2e073a6c7ee36b1f3c30c8f000315b" + integrity sha512-oa/N5j6v1svZQs7EIRPqR8f+Bf8g6HBDjD/xHC02radE/NjKHK7oQmtmLxPs1iVwYyvE+Kolo6lbpfEQ9xnhxQ== + "@esbuild/android-arm@0.15.16": version "0.15.16" resolved "https://registry.yarnpkg.com/@esbuild/android-arm/-/android-arm-0.15.16.tgz#0642926178b15e3d1545efae6eee05c4f3451d15" @@ -689,6 +677,96 @@ resolved "https://registry.yarnpkg.com/@esbuild/android-arm/-/android-arm-0.15.18.tgz#266d40b8fdcf87962df8af05b76219bc786b4f80" integrity sha512-5GT+kcs2WVGjVs7+boataCkO5Fg0y4kCjzkB5bAip7H4jfnOS3dA6KPiww9W1OEKTKeAcUVhdZGvgI65OXmUnw== +"@esbuild/android-arm@0.16.17": + version "0.16.17" + resolved "https://registry.yarnpkg.com/@esbuild/android-arm/-/android-arm-0.16.17.tgz#025b6246d3f68b7bbaa97069144fb5fb70f2fff2" + integrity sha512-N9x1CMXVhtWEAMS7pNNONyA14f71VPQN9Cnavj1XQh6T7bskqiLLrSca4O0Vr8Wdcga943eThxnVp3JLnBMYtw== + +"@esbuild/android-arm@0.17.8": + version "0.17.8" + resolved "https://registry.yarnpkg.com/@esbuild/android-arm/-/android-arm-0.17.8.tgz#c41e496af541e175369d48164d0cf01a5f656cf6" + integrity sha512-0/rb91GYKhrtbeglJXOhAv9RuYimgI8h623TplY2X+vA4EXnk3Zj1fXZreJ0J3OJJu1bwmb0W7g+2cT/d8/l/w== + +"@esbuild/android-x64@0.16.17": + version "0.16.17" + resolved "https://registry.yarnpkg.com/@esbuild/android-x64/-/android-x64-0.16.17.tgz#c820e0fef982f99a85c4b8bfdd582835f04cd96e" + integrity sha512-a3kTv3m0Ghh4z1DaFEuEDfz3OLONKuFvI4Xqczqx4BqLyuFaFkuaG4j2MtA6fuWEFeC5x9IvqnX7drmRq/fyAQ== + +"@esbuild/android-x64@0.17.8": + version "0.17.8" + resolved "https://registry.yarnpkg.com/@esbuild/android-x64/-/android-x64-0.17.8.tgz#080fa67c29be77f5a3ca5ee4cc78d5bf927e3a3b" + integrity sha512-bTliMLqD7pTOoPg4zZkXqCDuzIUguEWLpeqkNfC41ODBHwoUgZ2w5JBeYimv4oP6TDVocoYmEhZrCLQTrH89bg== + +"@esbuild/darwin-arm64@0.16.17": + version "0.16.17" + resolved "https://registry.yarnpkg.com/@esbuild/darwin-arm64/-/darwin-arm64-0.16.17.tgz#edef4487af6b21afabba7be5132c26d22379b220" + integrity sha512-/2agbUEfmxWHi9ARTX6OQ/KgXnOWfsNlTeLcoV7HSuSTv63E4DqtAc+2XqGw1KHxKMHGZgbVCZge7HXWX9Vn+w== + +"@esbuild/darwin-arm64@0.17.8": + version "0.17.8" + resolved "https://registry.yarnpkg.com/@esbuild/darwin-arm64/-/darwin-arm64-0.17.8.tgz#053622bf9a82f43d5c075b7818e02618f7b4a397" + integrity sha512-ghAbV3ia2zybEefXRRm7+lx8J/rnupZT0gp9CaGy/3iolEXkJ6LYRq4IpQVI9zR97ID80KJVoUlo3LSeA/sMAg== + +"@esbuild/darwin-x64@0.16.17": + version "0.16.17" + resolved "https://registry.yarnpkg.com/@esbuild/darwin-x64/-/darwin-x64-0.16.17.tgz#42829168730071c41ef0d028d8319eea0e2904b4" + integrity sha512-2By45OBHulkd9Svy5IOCZt376Aa2oOkiE9QWUK9fe6Tb+WDr8hXL3dpqi+DeLiMed8tVXspzsTAvd0jUl96wmg== + +"@esbuild/darwin-x64@0.17.8": + version "0.17.8" + resolved "https://registry.yarnpkg.com/@esbuild/darwin-x64/-/darwin-x64-0.17.8.tgz#8a1aadb358d537d8efad817bb1a5bff91b84734b" + integrity sha512-n5WOpyvZ9TIdv2V1K3/iIkkJeKmUpKaCTdun9buhGRWfH//osmUjlv4Z5mmWdPWind/VGcVxTHtLfLCOohsOXw== + +"@esbuild/freebsd-arm64@0.16.17": + version "0.16.17" + resolved "https://registry.yarnpkg.com/@esbuild/freebsd-arm64/-/freebsd-arm64-0.16.17.tgz#1f4af488bfc7e9ced04207034d398e793b570a27" + integrity sha512-mt+cxZe1tVx489VTb4mBAOo2aKSnJ33L9fr25JXpqQqzbUIw/yzIzi+NHwAXK2qYV1lEFp4OoVeThGjUbmWmdw== + +"@esbuild/freebsd-arm64@0.17.8": + version "0.17.8" + resolved "https://registry.yarnpkg.com/@esbuild/freebsd-arm64/-/freebsd-arm64-0.17.8.tgz#e6738d0081ba0721a5c6c674e84c6e7fcea61989" + integrity sha512-a/SATTaOhPIPFWvHZDoZYgxaZRVHn0/LX1fHLGfZ6C13JqFUZ3K6SMD6/HCtwOQ8HnsNaEeokdiDSFLuizqv5A== + +"@esbuild/freebsd-x64@0.16.17": + version "0.16.17" + resolved "https://registry.yarnpkg.com/@esbuild/freebsd-x64/-/freebsd-x64-0.16.17.tgz#636306f19e9bc981e06aa1d777302dad8fddaf72" + integrity sha512-8ScTdNJl5idAKjH8zGAsN7RuWcyHG3BAvMNpKOBaqqR7EbUhhVHOqXRdL7oZvz8WNHL2pr5+eIT5c65kA6NHug== + +"@esbuild/freebsd-x64@0.17.8": + version "0.17.8" + resolved "https://registry.yarnpkg.com/@esbuild/freebsd-x64/-/freebsd-x64-0.17.8.tgz#1855e562f2b730f4483f6e94086e9e2597feb4c3" + integrity sha512-xpFJb08dfXr5+rZc4E+ooZmayBW6R3q59daCpKZ/cDU96/kvDM+vkYzNeTJCGd8rtO6fHWMq5Rcv/1cY6p6/0Q== + +"@esbuild/linux-arm64@0.16.17": + version "0.16.17" + resolved "https://registry.yarnpkg.com/@esbuild/linux-arm64/-/linux-arm64-0.16.17.tgz#a003f7ff237c501e095d4f3a09e58fc7b25a4aca" + integrity sha512-7S8gJnSlqKGVJunnMCrXHU9Q8Q/tQIxk/xL8BqAP64wchPCTzuM6W3Ra8cIa1HIflAvDnNOt2jaL17vaW+1V0g== + +"@esbuild/linux-arm64@0.17.8": + version "0.17.8" + resolved "https://registry.yarnpkg.com/@esbuild/linux-arm64/-/linux-arm64-0.17.8.tgz#481da38952721a3fdb77c17a36ceaacc4270b5c5" + integrity sha512-v3iwDQuDljLTxpsqQDl3fl/yihjPAyOguxuloON9kFHYwopeJEf1BkDXODzYyXEI19gisEsQlG1bM65YqKSIww== + +"@esbuild/linux-arm@0.16.17": + version "0.16.17" + resolved "https://registry.yarnpkg.com/@esbuild/linux-arm/-/linux-arm-0.16.17.tgz#b591e6a59d9c4fe0eeadd4874b157ab78cf5f196" + integrity sha512-iihzrWbD4gIT7j3caMzKb/RsFFHCwqqbrbH9SqUSRrdXkXaygSZCZg1FybsZz57Ju7N/SHEgPyaR0LZ8Zbe9gQ== + +"@esbuild/linux-arm@0.17.8": + version "0.17.8" + resolved "https://registry.yarnpkg.com/@esbuild/linux-arm/-/linux-arm-0.17.8.tgz#18127072b270bb6321c6d11be20bfd30e0d6ad17" + integrity sha512-6Ij8gfuGszcEwZpi5jQIJCVIACLS8Tz2chnEBfYjlmMzVsfqBP1iGmHQPp7JSnZg5xxK9tjCc+pJ2WtAmPRFVA== + +"@esbuild/linux-ia32@0.16.17": + version "0.16.17" + resolved "https://registry.yarnpkg.com/@esbuild/linux-ia32/-/linux-ia32-0.16.17.tgz#24333a11027ef46a18f57019450a5188918e2a54" + integrity sha512-kiX69+wcPAdgl3Lonh1VI7MBr16nktEvOfViszBSxygRQqSpzv7BffMKRPMFwzeJGPxcio0pdD3kYQGpqQ2SSg== + +"@esbuild/linux-ia32@0.17.8": + version "0.17.8" + resolved "https://registry.yarnpkg.com/@esbuild/linux-ia32/-/linux-ia32-0.17.8.tgz#ee400af7b3bc69e8ca2e593ca35156ffb9abd54f" + integrity sha512-8svILYKhE5XetuFk/B6raFYIyIqydQi+GngEXJgdPdI7OMKUbSd7uzR02wSY4kb53xBrClLkhH4Xs8P61Q2BaA== + "@esbuild/linux-loong64@0.14.54": version "0.14.54" resolved "https://registry.yarnpkg.com/@esbuild/linux-loong64/-/linux-loong64-0.14.54.tgz#de2a4be678bd4d0d1ffbb86e6de779cde5999028" @@ -704,6 +782,126 @@ resolved "https://registry.yarnpkg.com/@esbuild/linux-loong64/-/linux-loong64-0.15.18.tgz#128b76ecb9be48b60cf5cfc1c63a4f00691a3239" integrity sha512-L4jVKS82XVhw2nvzLg/19ClLWg0y27ulRwuP7lcyL6AbUWB5aPglXY3M21mauDQMDfRLs8cQmeT03r/+X3cZYQ== +"@esbuild/linux-loong64@0.16.17": + version "0.16.17" + resolved "https://registry.yarnpkg.com/@esbuild/linux-loong64/-/linux-loong64-0.16.17.tgz#d5ad459d41ed42bbd4d005256b31882ec52227d8" + integrity sha512-dTzNnQwembNDhd654cA4QhbS9uDdXC3TKqMJjgOWsC0yNCbpzfWoXdZvp0mY7HU6nzk5E0zpRGGx3qoQg8T2DQ== + +"@esbuild/linux-loong64@0.17.8": + version "0.17.8" + resolved "https://registry.yarnpkg.com/@esbuild/linux-loong64/-/linux-loong64-0.17.8.tgz#8c509d8a454693d39824b83b3f66c400872fce82" + integrity sha512-B6FyMeRJeV0NpyEOYlm5qtQfxbdlgmiGdD+QsipzKfFky0K5HW5Td6dyK3L3ypu1eY4kOmo7wW0o94SBqlqBSA== + +"@esbuild/linux-mips64el@0.16.17": + version "0.16.17" + resolved "https://registry.yarnpkg.com/@esbuild/linux-mips64el/-/linux-mips64el-0.16.17.tgz#4e5967a665c38360b0a8205594377d4dcf9c3726" + integrity sha512-ezbDkp2nDl0PfIUn0CsQ30kxfcLTlcx4Foz2kYv8qdC6ia2oX5Q3E/8m6lq84Dj/6b0FrkgD582fJMIfHhJfSw== + +"@esbuild/linux-mips64el@0.17.8": + version "0.17.8" + resolved "https://registry.yarnpkg.com/@esbuild/linux-mips64el/-/linux-mips64el-0.17.8.tgz#f2b0d36e63fb26bc3f95b203b6a80638292101ca" + integrity sha512-CCb67RKahNobjm/eeEqeD/oJfJlrWyw29fgiyB6vcgyq97YAf3gCOuP6qMShYSPXgnlZe/i4a8WFHBw6N8bYAA== + +"@esbuild/linux-ppc64@0.16.17": + version "0.16.17" + resolved "https://registry.yarnpkg.com/@esbuild/linux-ppc64/-/linux-ppc64-0.16.17.tgz#206443a02eb568f9fdf0b438fbd47d26e735afc8" + integrity sha512-dzS678gYD1lJsW73zrFhDApLVdM3cUF2MvAa1D8K8KtcSKdLBPP4zZSLy6LFZ0jYqQdQ29bjAHJDgz0rVbLB3g== + +"@esbuild/linux-ppc64@0.17.8": + version "0.17.8" + resolved "https://registry.yarnpkg.com/@esbuild/linux-ppc64/-/linux-ppc64-0.17.8.tgz#1e628be003e036e90423716028cc884fe5ba25bd" + integrity sha512-bytLJOi55y55+mGSdgwZ5qBm0K9WOCh0rx+vavVPx+gqLLhxtSFU0XbeYy/dsAAD6xECGEv4IQeFILaSS2auXw== + +"@esbuild/linux-riscv64@0.16.17": + version "0.16.17" + resolved "https://registry.yarnpkg.com/@esbuild/linux-riscv64/-/linux-riscv64-0.16.17.tgz#c351e433d009bf256e798ad048152c8d76da2fc9" + integrity sha512-ylNlVsxuFjZK8DQtNUwiMskh6nT0vI7kYl/4fZgV1llP5d6+HIeL/vmmm3jpuoo8+NuXjQVZxmKuhDApK0/cKw== + +"@esbuild/linux-riscv64@0.17.8": + version "0.17.8" + resolved "https://registry.yarnpkg.com/@esbuild/linux-riscv64/-/linux-riscv64-0.17.8.tgz#419a815cb4c3fb9f1b78ef5295f5b48b8bf6427a" + integrity sha512-2YpRyQJmKVBEHSBLa8kBAtbhucaclb6ex4wchfY0Tj3Kg39kpjeJ9vhRU7x4mUpq8ISLXRXH1L0dBYjAeqzZAw== + +"@esbuild/linux-s390x@0.16.17": + version "0.16.17" + resolved "https://registry.yarnpkg.com/@esbuild/linux-s390x/-/linux-s390x-0.16.17.tgz#661f271e5d59615b84b6801d1c2123ad13d9bd87" + integrity sha512-gzy7nUTO4UA4oZ2wAMXPNBGTzZFP7mss3aKR2hH+/4UUkCOyqmjXiKpzGrY2TlEUhbbejzXVKKGazYcQTZWA/w== + +"@esbuild/linux-s390x@0.17.8": + version "0.17.8" + resolved "https://registry.yarnpkg.com/@esbuild/linux-s390x/-/linux-s390x-0.17.8.tgz#291c49ae5c3d11d226352755c0835911fe1a9e5c" + integrity sha512-QgbNY/V3IFXvNf11SS6exkpVcX0LJcob+0RWCgV9OiDAmVElnxciHIisoSix9uzYzScPmS6dJFbZULdSAEkQVw== + +"@esbuild/linux-x64@0.16.17": + version "0.16.17" + resolved "https://registry.yarnpkg.com/@esbuild/linux-x64/-/linux-x64-0.16.17.tgz#e4ba18e8b149a89c982351443a377c723762b85f" + integrity sha512-mdPjPxfnmoqhgpiEArqi4egmBAMYvaObgn4poorpUaqmvzzbvqbowRllQ+ZgzGVMGKaPkqUmPDOOFQRUFDmeUw== + +"@esbuild/linux-x64@0.17.8": + version "0.17.8" + resolved "https://registry.yarnpkg.com/@esbuild/linux-x64/-/linux-x64-0.17.8.tgz#03199d91c76faf80bd54104f5cbf0a489bc39f6a" + integrity sha512-mM/9S0SbAFDBc4OPoyP6SEOo5324LpUxdpeIUUSrSTOfhHU9hEfqRngmKgqILqwx/0DVJBzeNW7HmLEWp9vcOA== + +"@esbuild/netbsd-x64@0.16.17": + version "0.16.17" + resolved "https://registry.yarnpkg.com/@esbuild/netbsd-x64/-/netbsd-x64-0.16.17.tgz#7d4f4041e30c5c07dd24ffa295c73f06038ec775" + integrity sha512-/PzmzD/zyAeTUsduZa32bn0ORug+Jd1EGGAUJvqfeixoEISYpGnAezN6lnJoskauoai0Jrs+XSyvDhppCPoKOA== + +"@esbuild/netbsd-x64@0.17.8": + version "0.17.8" + resolved "https://registry.yarnpkg.com/@esbuild/netbsd-x64/-/netbsd-x64-0.17.8.tgz#b436d767e1b21852f9ed212e2bb57f77203b0ae2" + integrity sha512-eKUYcWaWTaYr9zbj8GertdVtlt1DTS1gNBWov+iQfWuWyuu59YN6gSEJvFzC5ESJ4kMcKR0uqWThKUn5o8We6Q== + +"@esbuild/openbsd-x64@0.16.17": + version "0.16.17" + resolved "https://registry.yarnpkg.com/@esbuild/openbsd-x64/-/openbsd-x64-0.16.17.tgz#970fa7f8470681f3e6b1db0cc421a4af8060ec35" + integrity sha512-2yaWJhvxGEz2RiftSk0UObqJa/b+rIAjnODJgv2GbGGpRwAfpgzyrg1WLK8rqA24mfZa9GvpjLcBBg8JHkoodg== + +"@esbuild/openbsd-x64@0.17.8": + version "0.17.8" + resolved "https://registry.yarnpkg.com/@esbuild/openbsd-x64/-/openbsd-x64-0.17.8.tgz#d1481d8539e21d4729cd04a0450a26c2c8789e89" + integrity sha512-Vc9J4dXOboDyMXKD0eCeW0SIeEzr8K9oTHJU+Ci1mZc5njPfhKAqkRt3B/fUNU7dP+mRyralPu8QUkiaQn7iIg== + +"@esbuild/sunos-x64@0.16.17": + version "0.16.17" + resolved "https://registry.yarnpkg.com/@esbuild/sunos-x64/-/sunos-x64-0.16.17.tgz#abc60e7c4abf8b89fb7a4fe69a1484132238022c" + integrity sha512-xtVUiev38tN0R3g8VhRfN7Zl42YCJvyBhRKw1RJjwE1d2emWTVToPLNEQj/5Qxc6lVFATDiy6LjVHYhIPrLxzw== + +"@esbuild/sunos-x64@0.17.8": + version "0.17.8" + resolved "https://registry.yarnpkg.com/@esbuild/sunos-x64/-/sunos-x64-0.17.8.tgz#2cfb8126e079b2c00fd1bf095541e9f5c47877e4" + integrity sha512-0xvOTNuPXI7ft1LYUgiaXtpCEjp90RuBBYovdd2lqAFxje4sEucurg30M1WIm03+3jxByd3mfo+VUmPtRSVuOw== + +"@esbuild/win32-arm64@0.16.17": + version "0.16.17" + resolved "https://registry.yarnpkg.com/@esbuild/win32-arm64/-/win32-arm64-0.16.17.tgz#7b0ff9e8c3265537a7a7b1fd9a24e7bd39fcd87a" + integrity sha512-ga8+JqBDHY4b6fQAmOgtJJue36scANy4l/rL97W+0wYmijhxKetzZdKOJI7olaBaMhWt8Pac2McJdZLxXWUEQw== + +"@esbuild/win32-arm64@0.17.8": + version "0.17.8" + resolved "https://registry.yarnpkg.com/@esbuild/win32-arm64/-/win32-arm64-0.17.8.tgz#7c6ecfd097ca23b82119753bf7072bbaefe51e3a" + integrity sha512-G0JQwUI5WdEFEnYNKzklxtBheCPkuDdu1YrtRrjuQv30WsYbkkoixKxLLv8qhJmNI+ATEWquZe/N0d0rpr55Mg== + +"@esbuild/win32-ia32@0.16.17": + version "0.16.17" + resolved "https://registry.yarnpkg.com/@esbuild/win32-ia32/-/win32-ia32-0.16.17.tgz#e90fe5267d71a7b7567afdc403dfd198c292eb09" + integrity sha512-WnsKaf46uSSF/sZhwnqE4L/F89AYNMiD4YtEcYekBt9Q7nj0DiId2XH2Ng2PHM54qi5oPrQ8luuzGszqi/veig== + +"@esbuild/win32-ia32@0.17.8": + version "0.17.8" + resolved "https://registry.yarnpkg.com/@esbuild/win32-ia32/-/win32-ia32-0.17.8.tgz#cffec63c3cb0ef8563a04df4e09fa71056171d00" + integrity sha512-Fqy63515xl20OHGFykjJsMnoIWS+38fqfg88ClvPXyDbLtgXal2DTlhb1TfTX34qWi3u4I7Cq563QcHpqgLx8w== + +"@esbuild/win32-x64@0.16.17": + version "0.16.17" + resolved "https://registry.yarnpkg.com/@esbuild/win32-x64/-/win32-x64-0.16.17.tgz#c5a1a4bfe1b57f0c3e61b29883525c6da3e5c091" + integrity sha512-y+EHuSchhL7FjHgvQL/0fnnFmO4T1bhvWANX6gcnqTjtnKWbTvUMCpGnv2+t+31d7RzyEAYAd4u2fnIhHL6N/Q== + +"@esbuild/win32-x64@0.17.8": + version "0.17.8" + resolved "https://registry.yarnpkg.com/@esbuild/win32-x64/-/win32-x64-0.17.8.tgz#200a0965cf654ac28b971358ecdca9cc5b44c335" + integrity sha512-1iuezdyDNngPnz8rLRDO2C/ZZ/emJLb72OsZeqQ6gL6Avko/XCXZw+NuxBSNhBAP13Hie418V7VMt9et1FMvpg== + "@eslint/eslintrc@^1.3.0": version "1.3.0" resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-1.3.0.tgz#29f92c30bb3e771e4a2048c95fa6855392dfac4f" @@ -2481,11 +2679,6 @@ resolved "https://registry.yarnpkg.com/@msgpackr-extract/msgpackr-extract-win32-x64/-/msgpackr-extract-win32-x64-2.1.2.tgz#f2d8b9ddd8d191205ed26ce54aba3dfc5ae3e7c9" integrity sha512-rIZVR48zA8hGkHIK7ED6+ZiXsjRCcAVBJbm8o89OKAMTmEAQ2QvoOxoiu3w2isAaWwzgtQIOFIqHwvZDyLKCvw== -"@netlify/open-api@^2.11.0": - version "2.12.0" - resolved "https://registry.yarnpkg.com/@netlify/open-api/-/open-api-2.12.0.tgz#62e467c0c6be7bcae9349dc681e71eb393c21b2a" - integrity sha512-1n9VvO/9qM7cRB5f7NgSNqeUrovM7j9WVAY7ZQ4LtQuXSquFmO9Fku7WrV3zAUC6v2Y62fxGyJ0fRllYz5uXLw== - "@noble/hashes@1.1.2", "@noble/hashes@~1.1.1": version "1.1.2" resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.1.2.tgz#e9e035b9b166ca0af657a7848eb2718f0f22f183" @@ -3612,6 +3805,13 @@ dependencies: antlr4ts "^0.5.0-alpha.4" +"@solidity-parser/parser@^0.15.0": + version "0.15.0" + resolved "https://registry.yarnpkg.com/@solidity-parser/parser/-/parser-0.15.0.tgz#1d359be40be84f174dd616ccfadcf43346c6bf63" + integrity sha512-5UFJJTzWi1hgFk6aGCZ5rxG2DJkCJOzJ74qg7UkWSNCDSigW+CJLoYUb5bLiKrtI34Nr9rpFSUNHfkqtlL+N/w== + dependencies: + antlr4ts "^0.5.0-alpha.4" + "@solidstate/contracts@^0.0.52": version "0.0.52" resolved "https://registry.yarnpkg.com/@solidstate/contracts/-/contracts-0.0.52.tgz#cfe7e2ef237421f6e150927d7338c1ef02daa7b8" @@ -3744,15 +3944,22 @@ dependencies: "@types/chai" "*" +"@types/chai-subset@^1.3.3": + version "1.3.3" + resolved "https://registry.yarnpkg.com/@types/chai-subset/-/chai-subset-1.3.3.tgz#97893814e92abd2c534de422cb377e0e0bdaac94" + integrity sha512-frBecisrNGz+F4T6bcc+NLeolfiojh5FxW2klu669+8BARtyQv2C/GkNW6FUodVe4BroGMP/wER/YDGc7rEllw== + dependencies: + "@types/chai" "*" + "@types/chai@*", "@types/chai@^4.3.3": version "4.3.3" resolved "https://registry.yarnpkg.com/@types/chai/-/chai-4.3.3.tgz#3c90752792660c4b562ad73b3fbd68bf3bc7ae07" integrity sha512-hC7OMnszpxhZPduX+m+nrx+uFoLkWOMiR4oa/AZF3MuSETYTZmFfJAHqZEM8MVlvfG7BEUcgvtwoCTxBp6hm3g== -"@types/clear@^0.1.2": - version "0.1.2" - resolved "https://registry.yarnpkg.com/@types/clear/-/clear-0.1.2.tgz#131050f8a7b429ae0e4ca390339ea9977ca977bd" - integrity sha512-h3GHp9BuPgY3X+WKWwJgTIl/h38KkcdU6JG28i1xdrlS8YXVi3V1YrhaZkjuvur97qZo8TMQjVXJorTf87LvfA== +"@types/chai@^4.3.4": + version "4.3.4" + resolved "https://registry.yarnpkg.com/@types/chai/-/chai-4.3.4.tgz#e913e8175db8307d78b4e8fa690408ba6b65dee4" + integrity sha512-KnRanxnpfpjUTqTCXslZSEdLfXExwgNxYPdiO2WGUj8+HDjFi8R3k5RVKPeSCzLjCcshCAtVO2QBbVuAV4kTnw== "@types/debug@^4.1.7": version "4.1.7" @@ -3776,11 +3983,6 @@ resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.39.tgz#e177e699ee1b8c22d23174caaa7422644389509f" integrity sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw== -"@types/figlet@^1.5.4": - version "1.5.4" - resolved "https://registry.yarnpkg.com/@types/figlet/-/figlet-1.5.4.tgz#54a426d63e921a9bca44102c5b1b1f206fa56d93" - integrity sha512-cskPTju7glYgzvkJy/hftqw7Fen3fsd0yrPOqcbBLJu+YdDQuA438akS1g+2XVKGzsQOnXGV2I9ePv6xUBnKMQ== - "@types/glob@^7.2.0": version "7.2.0" resolved "https://registry.yarnpkg.com/@types/glob/-/glob-7.2.0.tgz#bc1b5bf3aa92f25bd5dd39f35c57361bdce5b2eb" @@ -3808,13 +4010,6 @@ dependencies: "@types/node" "*" -"@types/inquirer@^8.2.1": - version "8.2.3" - resolved "https://registry.yarnpkg.com/@types/inquirer/-/inquirer-8.2.3.tgz#985515d04879a0d0c1f5f49ec375767410ba9dab" - integrity sha512-ZlBqD+8WIVNy3KIVkl+Qne6bGLW2erwN0GJXY9Ri/9EMbyupee3xw3H0Mmv5kJoLyNpfd/oHlwKxO0DUDH7yWA== - dependencies: - "@types/through" "*" - "@types/istanbul-lib-coverage@*", "@types/istanbul-lib-coverage@^2.0.0", "@types/istanbul-lib-coverage@^2.0.1": version "2.0.4" resolved "https://registry.yarnpkg.com/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.4.tgz#8467d4b3c087805d63580480890791277ce35c44" @@ -4003,13 +4198,6 @@ resolved "https://registry.yarnpkg.com/@types/stack-utils/-/stack-utils-2.0.1.tgz#20f18294f797f2209b5f65c8e3b5c8e8261d127c" integrity sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw== -"@types/through@*": - version "0.0.30" - resolved "https://registry.yarnpkg.com/@types/through/-/through-0.0.30.tgz#e0e42ce77e897bd6aead6f6ea62aeb135b8a3895" - integrity sha512-FvnCJljyxhPM3gkRgWmxmDZyAQSiBQQWLI0A0VFL0K7W1oRUrPJSqNO0NvTnLkBcotdlp3lKvaT0JrnyRDkzOg== - dependencies: - "@types/node" "*" - "@types/uuid@^8.3.4": version "8.3.4" resolved "https://registry.yarnpkg.com/@types/uuid/-/uuid-8.3.4.tgz#bd86a43617df0594787d38b735f55c805becf1bc" @@ -4145,6 +4333,42 @@ dependencies: "@use-gesture/core" "10.2.9" +"@vitest/expect@0.29.1": + version "0.29.1" + resolved "https://registry.yarnpkg.com/@vitest/expect/-/expect-0.29.1.tgz#befba6278167fc3d4d47a87557eaf41f3b06a7cf" + integrity sha512-VFt1u34D+/L4pqjLA8VGPdHbdF8dgjX9Nq573L9KG6/7MIAL9jmbEIKpXudmxjoTwcyczOXRyDuUWBQHZafjoA== + dependencies: + "@vitest/spy" "0.29.1" + "@vitest/utils" "0.29.1" + chai "^4.3.7" + +"@vitest/runner@0.29.1": + version "0.29.1" + resolved "https://registry.yarnpkg.com/@vitest/runner/-/runner-0.29.1.tgz#798184b710e6b4ebd81f7ae8efeab64ad1bc627a" + integrity sha512-VZ6D+kWpd/LVJjvxkt79OA29FUpyrI5L/EEwoBxH5m9KmKgs1QWNgobo/CGQtIWdifLQLvZdzYEK7Qj96w/ixQ== + dependencies: + "@vitest/utils" "0.29.1" + p-limit "^4.0.0" + pathe "^1.1.0" + +"@vitest/spy@0.29.1": + version "0.29.1" + resolved "https://registry.yarnpkg.com/@vitest/spy/-/spy-0.29.1.tgz#e84f4d96a268e555e8140aeddcda65d6fd4e1d7b" + integrity sha512-sRXXK44pPzaizpiZOIQP7YMhxIs80J/b6v1yR3SItpxG952c8tdA7n0O2j4OsVkjiO/ZDrjAYFrXL3gq6hLx6Q== + dependencies: + tinyspy "^1.0.2" + +"@vitest/utils@0.29.1": + version "0.29.1" + resolved "https://registry.yarnpkg.com/@vitest/utils/-/utils-0.29.1.tgz#b5de0f836becd18539a8bf9a68c1b06eee23307c" + integrity sha512-6npOEpmyE6zPS2wsWb7yX5oDpp6WY++cC5BX6/qaaMhGC3ZlPd8BbTz3RtGPi1PfPerPvfs4KqS/JDOIaB6J3w== + dependencies: + cli-truncate "^3.1.0" + diff "^5.1.0" + loupe "^2.3.6" + picocolors "^1.0.0" + pretty-format "^27.5.1" + JSONStream@^1.0.4: version "1.3.5" resolved "https://registry.yarnpkg.com/JSONStream/-/JSONStream-1.3.5.tgz#3208c1f08d3a4d99261ab64f92302bc15e111ca0" @@ -4230,7 +4454,7 @@ acorn-walk@^7.1.1: resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-7.2.0.tgz#0de889a601203909b0fbe07b8938dc21d2e967bc" integrity sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA== -acorn-walk@^8.1.1: +acorn-walk@^8.1.1, acorn-walk@^8.2.0: version "8.2.0" resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.2.0.tgz#741210f2e2426454508853a2f44d0ab83b7f69c1" integrity sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA== @@ -4250,6 +4474,11 @@ acorn@^8.2.4, acorn@^8.4.1, acorn@^8.5.0, acorn@^8.8.0: resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.8.0.tgz#88c0187620435c7f6015803f5539dae05a9dbea8" integrity sha512-QOxyigPVrpZ2GXT+PFyZTl6TtOFc5egxHIP9IlQ+RbupQuX4RkT/Bee4/kQuC02Xkzg84JcT7oLYtDIQxp+v7w== +acorn@^8.8.1, acorn@^8.8.2: + version "8.8.2" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.8.2.tgz#1b2f25db02af965399b9776b0c2c391276d37c4a" + integrity sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw== + add-stream@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/add-stream/-/add-stream-1.0.0.tgz#6a7990437ca736d5e1288db92bd3266d5f5cb2aa" @@ -4329,7 +4558,7 @@ ansi-colors@^4.1.1: resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.3.tgz#37611340eb2243e70cc604cad35d63270d48781b" integrity sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw== -ansi-escapes@^3.0.0, ansi-escapes@^3.2.0: +ansi-escapes@^3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-3.2.0.tgz#8780b98ff9dbf5638152d1f1fe5c1d7b4442976b" integrity sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ== @@ -4927,7 +5156,7 @@ bl@^1.0.0: readable-stream "^2.3.5" safe-buffer "^5.1.1" -bl@^4.0.3, bl@^4.1.0: +bl@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/bl/-/bl-4.1.0.tgz#451535264182bec2fbbc83a62ab98cf11d9f7b3a" integrity sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w== @@ -5154,6 +5383,13 @@ bundle-require@^3.0.2, bundle-require@^3.1.2: dependencies: load-tsconfig "^0.2.0" +bundle-require@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/bundle-require/-/bundle-require-4.0.1.tgz#2cc1ad76428043d15e0e7f30990ee3d5404aa2e3" + integrity sha512-9NQkRHlNdNpDBGmLpngF3EFDcwodhMUuLz9PaWYciVcQF9SE4LFjM2DB/xV1Li5JiuDMv7ZUWuC3rGbqR0MAXQ== + dependencies: + load-tsconfig "^0.2.3" + byline@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/byline/-/byline-5.0.0.tgz#741c5216468eadc457b03410118ad77de8c1ddb1" @@ -5169,7 +5405,7 @@ bytes@3.1.2: resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.2.tgz#8b0beeb98605adf1b128fa4386403c009e0221a5" integrity sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg== -cac@^6.7.12: +cac@^6.7.12, cac@^6.7.14: version "6.7.14" resolved "https://registry.yarnpkg.com/cac/-/cac-6.7.14.tgz#804e1e6f506ee363cb0e3ccbb09cad5dd9870959" integrity sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ== @@ -5317,6 +5553,19 @@ chai@^4.3.6: pathval "^1.1.1" type-detect "^4.0.5" +chai@^4.3.7: + version "4.3.7" + resolved "https://registry.yarnpkg.com/chai/-/chai-4.3.7.tgz#ec63f6df01829088e8bf55fca839bcd464a8ec51" + integrity sha512-HLnAzZ2iupm25PlN0xFreAlBA5zaBSv3og0DdeGA4Ar6h6rJ3A0rolRUKJhSF2V10GZKDgWF/VmAEsNWjCRB+A== + dependencies: + assertion-error "^1.1.0" + check-error "^1.0.2" + deep-eql "^4.1.2" + get-func-name "^2.0.0" + loupe "^2.3.1" + pathval "^1.1.1" + type-detect "^4.0.5" + chalk@^1.0.0: version "1.1.3" resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" @@ -5355,11 +5604,6 @@ char-regex@^1.0.2: resolved "https://registry.yarnpkg.com/char-regex/-/char-regex-1.0.2.tgz#d744358226217f981ed58f479b1d6bcc29545dcf" integrity sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw== -chardet@^0.4.0: - version "0.4.2" - resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.4.2.tgz#b5473b33dc97c424e5d98dc87d55d4d8a29c8bf2" - integrity sha512-j/Toj7f1z98Hh2cYo2BVr85EpIRWqUi7rtRSGxh/cqUjqrnJe9l9UE7IUGd2vQ2p+kSHLkSzObQPZPLUC6TQwg== - chardet@^0.7.0: version "0.7.0" resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.7.0.tgz#90094849f0937f2eedc2425d0d28a9e5f0cbad9e" @@ -5370,7 +5614,7 @@ check-error@^1.0.2: resolved "https://registry.yarnpkg.com/check-error/-/check-error-1.0.2.tgz#574d312edd88bb5dd8912e9286dd6c0aed4aac82" integrity sha512-BrgHpW9NURQgzoNyjfq0Wu6VFO6D7IZEmJNdtgNqpzGG8RuNFHt2jQxWlAs4HMe119chBnv+34syEZtc6IhLtA== -chokidar@3.5.3, chokidar@^3.4.0, chokidar@^3.5.1, chokidar@^3.5.2, chokidar@^3.5.3: +chokidar@3.5.3, chokidar@^3.4.0, chokidar@^3.5.1, chokidar@^3.5.3: version "3.5.3" resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.3.tgz#1cf37c8707b932bd1af1ae22c0432e2acd1903bd" integrity sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw== @@ -5385,7 +5629,7 @@ chokidar@3.5.3, chokidar@^3.4.0, chokidar@^3.5.1, chokidar@^3.5.2, chokidar@^3.5 optionalDependencies: fsevents "~2.3.2" -chownr@^1.1.1, chownr@^1.1.4: +chownr@^1.1.4: version "1.1.4" resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.4.tgz#6fc9d7b42d32a583596337666e7d08084da2cc6b" integrity sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg== @@ -5428,11 +5672,6 @@ clean-stack@^2.0.0: resolved "https://registry.yarnpkg.com/clean-stack/-/clean-stack-2.2.0.tgz#ee8472dbb129e727b31e8a10a427dee9dfe4008b" integrity sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A== -clear@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/clear/-/clear-0.1.0.tgz#b81b1e03437a716984fd7ac97c87d73bdfe7048a" - integrity sha512-qMjRnoL+JDPJHeLePZJuao6+8orzHMGP04A8CdwCNsKhRbOnKRjefxONR7bwILT3MHecxKBjHkKL/tkZ8r4Uzw== - cli-color@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/cli-color/-/cli-color-1.4.0.tgz#7d10738f48526824f8fe7da51857cb0f572fe01f" @@ -5672,7 +5911,7 @@ commander@^7.0.0, commander@^7.2.0: resolved "https://registry.yarnpkg.com/commander/-/commander-7.2.0.tgz#a36cb57d0b501ce108e4d20559a150a391d97ab7" integrity sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw== -commander@^9.2.0, commander@^9.3.0: +commander@^9.3.0: version "9.4.0" resolved "https://registry.yarnpkg.com/commander/-/commander-9.4.0.tgz#bc4a40918fefe52e22450c111ecd6b7acce6f11c" integrity sha512-sRPT+umqkz90UA8M1yqYfnHlZA7fF6nSphDtxeywPZ49ysjxDQybzk13CL+mXekDRG92skbcqCLVovuCusNmFw== @@ -6087,11 +6326,6 @@ dashdash@^1.12.0: dependencies: assert-plus "^1.0.0" -data-uri-to-buffer@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/data-uri-to-buffer/-/data-uri-to-buffer-4.0.0.tgz#b5db46aea50f6176428ac05b73be39a57701a64b" - integrity sha512-Vr3mLBA8qWmcuschSLAOogKgQ/Jwxulv3RNE4FXnYWRGujzrRWQI4m12fQqRkwX06C0KanhLr4hK+GydchZsaA== - data-urls@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/data-urls/-/data-urls-2.0.0.tgz#156485a72963a970f5d5821aaf642bef2bf2db9b" @@ -6130,13 +6364,6 @@ debug@4, debug@4.3.4, debug@^4.0.1, debug@^4.1.0, debug@^4.1.1, debug@^4.2.0, de dependencies: ms "2.1.2" -debug@^3.2.7: - version "3.2.7" - resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.7.tgz#72580b7e9145fb39b6676f9c5e5fb100b934179a" - integrity sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ== - dependencies: - ms "^2.1.1" - debuglog@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/debuglog/-/debuglog-1.0.1.tgz#aa24ffb9ac3df9a2351837cfb2d279360cd78492" @@ -6170,13 +6397,6 @@ decode-uri-component@^0.2.0: resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545" integrity sha512-hjf+xovcEn31w/EUYdTXQh/8smFL/dzYjohQGEIgjyNavaJfBY2p5F527Bo1VPATxv0VYTUC2bOcXvqFwk78Og== -decompress-response@^4.2.0: - version "4.2.1" - resolved "https://registry.yarnpkg.com/decompress-response/-/decompress-response-4.2.1.tgz#414023cc7a302da25ce2ec82d0d5238ccafd8986" - integrity sha512-jOSne2qbyE+/r8G1VU+G/82LBs2Fs4LAsTiLSHOCOMZQl2OKZ6i8i4IyHemTe+/yIXOtTcRQMzPcgyhoFlqPkw== - dependencies: - mimic-response "^2.0.0" - decompress-tar@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/decompress-tar/-/decompress-tar-3.1.0.tgz#217c789f9b94450efaadc5c5e537978fc333c466" @@ -6261,6 +6481,13 @@ deep-eql@^4.0.1: dependencies: type-detect "^4.0.0" +deep-eql@^4.1.2: + version "4.1.3" + resolved "https://registry.yarnpkg.com/deep-eql/-/deep-eql-4.1.3.tgz#7c7775513092f7df98d8df9996dd085eb668cc6d" + integrity sha512-WaEtAOpRA1MQ0eohqZjpGD8zdI0Ovsm8mmFhaDN8dvDZzyoUMcYDnf5Y6iu7HTXxf8JDS23qWa4a+hKCDyOPzw== + dependencies: + type-detect "^4.0.0" + deep-extend@^0.6.0, deep-extend@~0.6.0: version "0.6.0" resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac" @@ -6377,6 +6604,11 @@ diff@^4.0.1: resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.2.tgz#60f3aecb89d5fae520c11aa19efc2bb982aade7d" integrity sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A== +diff@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/diff/-/diff-5.1.0.tgz#bc52d298c5ea8df9194800224445ed43ffc87e40" + integrity sha512-D+mk+qE8VC/PAUrlAU34N+VfXev0ghe5ywmpqrawphmVZc1bEfn56uo9qpyGp1p4xpzOHkSW4ztBd6L7Xx4ACw== + dir-glob@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-3.0.1.tgz#56dbf73d992a4a93ba1584f4534063fd2e41717f" @@ -6625,7 +6857,7 @@ encoding@^0.1.12: dependencies: iconv-lite "^0.6.2" -end-of-stream@^1.0.0, end-of-stream@^1.1.0, end-of-stream@^1.4.1: +end-of-stream@^1.0.0: version "1.4.4" resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.4.tgz#5ae64a5f45057baf3626ec14da0ca5e4b2431eb0" integrity sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q== @@ -7188,6 +7420,62 @@ esbuild@^0.15.16: esbuild-windows-64 "0.15.16" esbuild-windows-arm64 "0.15.16" +esbuild@^0.16.14: + version "0.16.17" + resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.16.17.tgz#fc2c3914c57ee750635fee71b89f615f25065259" + integrity sha512-G8LEkV0XzDMNwXKgM0Jwu3nY3lSTwSGY6XbxM9cr9+s0T/qSV1q1JVPBGzm3dcjhCic9+emZDmMffkwgPeOeLg== + optionalDependencies: + "@esbuild/android-arm" "0.16.17" + "@esbuild/android-arm64" "0.16.17" + "@esbuild/android-x64" "0.16.17" + "@esbuild/darwin-arm64" "0.16.17" + "@esbuild/darwin-x64" "0.16.17" + "@esbuild/freebsd-arm64" "0.16.17" + "@esbuild/freebsd-x64" "0.16.17" + "@esbuild/linux-arm" "0.16.17" + "@esbuild/linux-arm64" "0.16.17" + "@esbuild/linux-ia32" "0.16.17" + "@esbuild/linux-loong64" "0.16.17" + "@esbuild/linux-mips64el" "0.16.17" + "@esbuild/linux-ppc64" "0.16.17" + "@esbuild/linux-riscv64" "0.16.17" + "@esbuild/linux-s390x" "0.16.17" + "@esbuild/linux-x64" "0.16.17" + "@esbuild/netbsd-x64" "0.16.17" + "@esbuild/openbsd-x64" "0.16.17" + "@esbuild/sunos-x64" "0.16.17" + "@esbuild/win32-arm64" "0.16.17" + "@esbuild/win32-ia32" "0.16.17" + "@esbuild/win32-x64" "0.16.17" + +esbuild@^0.17.6: + version "0.17.8" + resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.17.8.tgz#f7f799abc7cdce3f0f2e3e0c01f120d4d55193b4" + integrity sha512-g24ybC3fWhZddZK6R3uD2iF/RIPnRpwJAqLov6ouX3hMbY4+tKolP0VMF3zuIYCaXun+yHwS5IPQ91N2BT191g== + optionalDependencies: + "@esbuild/android-arm" "0.17.8" + "@esbuild/android-arm64" "0.17.8" + "@esbuild/android-x64" "0.17.8" + "@esbuild/darwin-arm64" "0.17.8" + "@esbuild/darwin-x64" "0.17.8" + "@esbuild/freebsd-arm64" "0.17.8" + "@esbuild/freebsd-x64" "0.17.8" + "@esbuild/linux-arm" "0.17.8" + "@esbuild/linux-arm64" "0.17.8" + "@esbuild/linux-ia32" "0.17.8" + "@esbuild/linux-loong64" "0.17.8" + "@esbuild/linux-mips64el" "0.17.8" + "@esbuild/linux-ppc64" "0.17.8" + "@esbuild/linux-riscv64" "0.17.8" + "@esbuild/linux-s390x" "0.17.8" + "@esbuild/linux-x64" "0.17.8" + "@esbuild/netbsd-x64" "0.17.8" + "@esbuild/openbsd-x64" "0.17.8" + "@esbuild/sunos-x64" "0.17.8" + "@esbuild/win32-arm64" "0.17.8" + "@esbuild/win32-ia32" "0.17.8" + "@esbuild/win32-x64" "0.17.8" + escalade@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" @@ -7745,11 +8033,6 @@ expand-range@^1.8.1: dependencies: fill-range "^2.1.0" -expand-template@^2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/expand-template/-/expand-template-2.0.3.tgz#6e14b3fcee0f3a6340ecb57d2e8918692052a47c" - integrity sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg== - expand-tilde@^2.0.0, expand-tilde@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/expand-tilde/-/expand-tilde-2.0.2.tgz#97e801aa052df02454de46b02bf621642cdc8502" @@ -7797,15 +8080,6 @@ extend@^3.0.0, extend@^3.0.2, extend@~3.0.2: resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa" integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g== -external-editor@^2.1.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-2.2.0.tgz#045511cfd8d133f3846673d1047c154e214ad3d5" - integrity sha512-bSn6gvGxKt+b7+6TKEv1ZycHleA7aHhRHyAqJyp5pbUFuYYNIzpZnQDk7AsYckyWdEnTeAnay0aCy2aV6iTk9A== - dependencies: - chardet "^0.4.0" - iconv-lite "^0.4.17" - tmp "^0.0.33" - external-editor@^3.0.3: version "3.1.0" resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-3.1.0.tgz#cb03f740befae03ea4d283caed2741a83f335495" @@ -7901,19 +8175,6 @@ fd-slicer@~1.1.0: dependencies: pend "~1.2.0" -fetch-blob@^3.1.2, fetch-blob@^3.1.4: - version "3.2.0" - resolved "https://registry.yarnpkg.com/fetch-blob/-/fetch-blob-3.2.0.tgz#f09b8d4bbd45adc6f0c20b7e787e793e309dcce9" - integrity sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ== - dependencies: - node-domexception "^1.0.0" - web-streams-polyfill "^3.0.3" - -figlet@^1.5.2: - version "1.5.2" - resolved "https://registry.yarnpkg.com/figlet/-/figlet-1.5.2.tgz#dda34ff233c9a48e36fcff6741aeb5bafe49b634" - integrity sha512-WOn21V8AhyE1QqVfPIVxe3tupJacq1xGkPTB4iagT6o+P2cAgEOOwIxMftr4+ZCTI6d551ij9j61DFr0nsP2uQ== - figures@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/figures/-/figures-2.0.0.tgz#3ab1a2d2a62c8bfb431a0c94cb797a2fce27c962" @@ -8054,6 +8315,14 @@ find-up@^4.0.0, find-up@^4.1.0: locate-path "^5.0.0" path-exists "^4.0.0" +find-up@^6.3.0: + version "6.3.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-6.3.0.tgz#2abab3d3280b2dc7ac10199ef324c4e002c8c790" + integrity sha512-v2ZsoEuVHYy8ZIlYqwPe/39Cy+cFDzp4dXPaxNvkEuouymu+2Jbz0PxpKarJHYJTmv2HWT3O382qY8l4jMWthw== + dependencies: + locate-path "^7.1.0" + path-exists "^5.0.0" + find-versions@^1.0.0: version "1.2.1" resolved "https://registry.yarnpkg.com/find-versions/-/find-versions-1.2.1.tgz#cbde9f12e38575a0af1be1b9a2c5d5fd8f186b62" @@ -8142,6 +8411,10 @@ forever-agent@~0.6.1: version "1.2.0" resolved "https://github.com/foundry-rs/forge-std.git#b4f121555729b3afb3c5ffccb62ff4b6e2818fd3" +"forge-std@https://github.com/foundry-rs/forge-std.git#f36dab24d63d1c1945a05ed375ce341d3c1a49ed": + version "0.1.0" + resolved "https://github.com/foundry-rs/forge-std.git#f36dab24d63d1c1945a05ed375ce341d3c1a49ed" + form-data@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/form-data/-/form-data-3.0.1.tgz#ebd53791b78356a99af9a300d4282c4d5eb9755f" @@ -8160,13 +8433,6 @@ form-data@~2.3.2: combined-stream "^1.0.6" mime-types "^2.1.12" -formdata-polyfill@^4.0.10: - version "4.0.10" - resolved "https://registry.yarnpkg.com/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz#24807c31c9d402e002ab3d8c720144ceb8848423" - integrity sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g== - dependencies: - fetch-blob "^3.1.2" - fp-ts@1.19.3: version "1.19.3" resolved "https://registry.yarnpkg.com/fp-ts/-/fp-ts-1.19.3.tgz#261a60d1088fbff01f91256f91d21d0caaaaa96f" @@ -8177,14 +8443,6 @@ fp-ts@^1.0.0: resolved "https://registry.yarnpkg.com/fp-ts/-/fp-ts-1.19.5.tgz#3da865e585dfa1fdfd51785417357ac50afc520a" integrity sha512-wDNqTimnzs8QqpldiId9OavWK2NptormjXnRJTQecNjzwfyp6P/8s/zG8e4h3ja3oqkKaY72UlTjQYt/1yXf9A== -from2@^2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/from2/-/from2-2.3.0.tgz#8bfb5502bde4a4d36cfdeea007fcca21d7e382af" - integrity sha512-OMcX/4IC/uqEPVgGeyfN22LJk6AZrMkRZHxcHBMBvHScDGgwTm2GT2Wkgtocyd3JfZffjj2kYUDXXII0Fk9W0g== - dependencies: - inherits "^2.0.1" - readable-stream "^2.0.0" - fs-constants@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/fs-constants/-/fs-constants-1.0.0.tgz#6be0de9be998ce16af8afc24497b9ee9b7ccd9ad" @@ -8444,11 +8702,6 @@ gitconfiglocal@^1.0.0: dependencies: ini "^1.3.2" -github-from-package@0.0.0: - version "0.0.0" - resolved "https://registry.yarnpkg.com/github-from-package/-/github-from-package-0.0.0.tgz#97fb5d96bfde8973313f20e8288ef9a167fa64ce" - integrity sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw== - glob-base@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/glob-base/-/glob-base-0.3.0.tgz#dbb164f6221b1c0b1ccf82aea328b497df0ea3c4" @@ -9029,7 +9282,7 @@ husky@>=6: resolved "https://registry.yarnpkg.com/husky/-/husky-8.0.1.tgz#511cb3e57de3e3190514ae49ed50f6bc3f50b3e9" integrity sha512-xs7/chUH/CKdOCs7Zy0Aev9e/dKOMZf3K1Az1nar3tzlv0jfqnYtu235bstsWTmXOR0EfINrPa97yy4Lz6RiKw== -iconv-lite@0.4.24, iconv-lite@^0.4.17, iconv-lite@^0.4.24: +iconv-lite@0.4.24, iconv-lite@^0.4.24: version "0.4.24" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== @@ -9060,11 +9313,6 @@ iftype@^4.0.9: resolved "https://registry.yarnpkg.com/iftype/-/iftype-4.0.9.tgz#3803c91d518a699720cfba7a9e47c0268664f106" integrity sha512-01Klo+04dkDzY193D1GVfOdQzmpqaYFJTAlZKRztkT/BOaU7sSnvxGimSln+7DMqLUP4tpDTNFgxqVPLYZVypA== -ignore-by-default@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/ignore-by-default/-/ignore-by-default-1.0.1.tgz#48ca6d72f6c6a3af00a9ad4ae6876be3889e2b09" - integrity sha512-Ius2VYcGNk7T90CppJqcIkS5ooHUZyIQK+ClZfMfMNFEF9VSE73Fq+906u/CWu92x4gzZMWOwfFYckPObzdEbA== - ignore-walk@^3.0.3: version "3.0.4" resolved "https://registry.yarnpkg.com/ignore-walk/-/ignore-walk-3.0.4.tgz#c9a09f69b7c7b479a5d74ac1a3c0d4236d2a6335" @@ -9179,15 +9427,7 @@ init-package-json@^2.0.2: validate-npm-package-license "^3.0.4" validate-npm-package-name "^3.0.0" -inquirer-prompt-suggest@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/inquirer-prompt-suggest/-/inquirer-prompt-suggest-0.1.0.tgz#2b5b4ca8e0d48261a4add75c91498afa6e530a24" - integrity sha512-RC5XKDeBSsf0nBOQ380NloJcI+WTbGNo049aJsXRZXxxnRDCL5PqvftIe81zUPSUqF8hI0UxR+v77L74xJB40w== - dependencies: - chalk "^2.4.1" - inquirer "^5.2.0" - -inquirer@8.2.4, inquirer@^8.2.4: +inquirer@8.2.4: version "8.2.4" resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-8.2.4.tgz#ddbfe86ca2f67649a67daa6f1051c128f684f0b4" integrity sha512-nn4F01dxU8VeKfq192IjLsxu0/OmMZ4Lg3xKAns148rCaXP6ntAoEkVYZThWjwON8AlzdZZi6oqnhNbxUG9hVg== @@ -9208,25 +9448,6 @@ inquirer@8.2.4, inquirer@^8.2.4: through "^2.3.6" wrap-ansi "^7.0.0" -inquirer@^5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-5.2.0.tgz#db350c2b73daca77ff1243962e9f22f099685726" - integrity sha512-E9BmnJbAKLPGonz0HeWHtbKf+EeSP93paWO3ZYoUpq/aowXvYGjjCSuashhXPpzbArIjBbji39THkxTz9ZeEUQ== - dependencies: - ansi-escapes "^3.0.0" - chalk "^2.0.0" - cli-cursor "^2.1.0" - cli-width "^2.0.0" - external-editor "^2.1.0" - figures "^2.0.0" - lodash "^4.3.0" - mute-stream "0.0.7" - run-async "^2.2.0" - rxjs "^5.5.2" - string-width "^2.1.0" - strip-ansi "^4.0.0" - through "^2.3.6" - inquirer@^6.2.2: version "6.5.2" resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-6.5.2.tgz#ad50942375d036d327ff528c08bd5fab089928ca" @@ -9279,14 +9500,6 @@ interpret@^1.0.0: resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.4.0.tgz#665ab8bc4da27a774a40584e812e3e0fa45b1a1e" integrity sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA== -into-stream@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/into-stream/-/into-stream-6.0.0.tgz#4bfc1244c0128224e18b8870e85b2de8e66c6702" - integrity sha512-XHbaOAvP+uFKUFsOgoNPRjLkwB+I22JFPFe5OjTkQ0nwgj6+pSjb4NmB6VMxaPshLiOf+zcpOCBQuLwC1KHhZA== - dependencies: - from2 "^2.3.0" - p-is-promise "^3.0.0" - io-ts@1.10.4: version "1.10.4" resolved "https://registry.yarnpkg.com/io-ts/-/io-ts-1.10.4.tgz#cd5401b138de88e4f920adbcb7026e2d1967e6e2" @@ -9367,13 +9580,6 @@ is-ci@^2.0.0: dependencies: ci-info "^2.0.0" -is-core-module@2.9.0: - version "2.9.0" - resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.9.0.tgz#e1c34429cd51c6dd9e09e0799e396e27b19a9c69" - integrity sha512-+5FPy5PnwmO3lvfMb0AsoPaBG+5KHUI0wYFXOtYPnVVVspTFUuMZNfNaNVRt3FZadstu2c8x23vykRW/NBoU6A== - dependencies: - has "^1.0.3" - is-core-module@^2.5.0, is-core-module@^2.9.0: version "2.10.0" resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.10.0.tgz#9012ede0a91c69587e647514e1d5277019e728ed" @@ -10719,6 +10925,11 @@ jsonc-parser@^3.0.0: resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-3.1.0.tgz#73b8f0e5c940b83d03476bc2e51a20ef0932615d" integrity sha512-DRf0QjnNeCUds3xTjKlQQ3DpJD51GvDjJfnxUVWg6PZTo2otSm+slzNAxU/35hF8/oJIKoG9slq30JYOsF2azg== +jsonc-parser@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-3.2.0.tgz#31ff3f4c2b9793f89c67212627c51c6394f88e76" + integrity sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w== + jsonfile@^2.1.0: version "2.4.0" resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-2.4.0.tgz#3736a2b428b87bbda0cc83b53fa3d633a35c2ae8" @@ -11056,11 +11267,16 @@ load-json-file@^6.2.0: strip-bom "^4.0.0" type-fest "^0.6.0" -load-tsconfig@^0.2.0: +load-tsconfig@^0.2.0, load-tsconfig@^0.2.3: version "0.2.3" resolved "https://registry.yarnpkg.com/load-tsconfig/-/load-tsconfig-0.2.3.tgz#08af3e7744943caab0c75f8af7f1703639c3ef1f" integrity sha512-iyT2MXws+dc2Wi6o3grCFtGXpeMvHmJqS27sMPGtV2eUu4PeFnG+33I8BlFK1t1NWMjOpcx9bridn5yxLDX2gQ== +local-pkg@^0.4.2: + version "0.4.3" + resolved "https://registry.yarnpkg.com/local-pkg/-/local-pkg-0.4.3.tgz#0ff361ab3ae7f1c19113d9bb97b98b905dbc4963" + integrity sha512-SFppqq5p42fe2qcZQqqEOiVRXl+WCP1MdT6k7BDEW1j++sp5fIY+/fdRQitvKgB5BrBcmrs5m/L0v2FrU5MY1g== + locate-path@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e" @@ -11091,6 +11307,13 @@ locate-path@^6.0.0: dependencies: p-locate "^5.0.0" +locate-path@^7.1.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-7.2.0.tgz#69cb1779bd90b35ab1e771e1f2f89a202c2a8a8a" + integrity sha512-gvVijfZvn7R+2qyPX8mAuKcFGDf6Nc61GdvGafQsHL0sBIxfKzA+usWn4GFC/bk+QdwPUD4kWFJLhElipq+0VA== + dependencies: + p-locate "^6.0.0" + lodash._basecopy@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/lodash._basecopy/-/lodash._basecopy-3.0.1.tgz#8da0e6a876cf344c0ad8a54882111dd3c5c7ca36" @@ -11250,7 +11473,7 @@ lodash.truncate@^4.4.2: resolved "https://registry.yarnpkg.com/lodash.truncate/-/lodash.truncate-4.4.2.tgz#5a350da0b1113b837ecfffd5812cbe58d6eae193" integrity sha512-jttmRe7bRse52OsWIMDLaXxWqRAmtIUccAQ3garviCqJjafXOfNMO0yMfNpdD6zbGaTU0P5Nz7e7gAT6cKmJRw== -lodash@4.17.21, lodash@^4.17.11, lodash@^4.17.12, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.21, lodash@^4.3.0, lodash@^4.7.0: +lodash@4.17.21, lodash@^4.17.11, lodash@^4.17.12, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.21, lodash@^4.7.0: version "4.17.21" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== @@ -11315,6 +11538,13 @@ loupe@^2.3.1: dependencies: get-func-name "^2.0.0" +loupe@^2.3.6: + version "2.3.6" + resolved "https://registry.yarnpkg.com/loupe/-/loupe-2.3.6.tgz#76e4af498103c532d1ecc9be102036a21f787b53" + integrity sha512-RaPMZKiMy8/JruncMU5Bt6na1eftNoo++R4Y+N2FrxkDVTrGvcyzFTsaGif4QTeKESheMGegbhw6iUAq+5A8zA== + dependencies: + get-func-name "^2.0.0" + lowercase-keys@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-1.0.1.tgz#6f9e30b47084d971a7c820ff15a6c5167b74c26f" @@ -11574,11 +11804,6 @@ merkle-patricia-tree@^4.2.4: readable-stream "^3.6.0" semaphore-async-await "^1.5.1" -micro-api-client@^3.3.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/micro-api-client/-/micro-api-client-3.3.0.tgz#52dd567d322f10faffe63d19d4feeac4e4ffd215" - integrity sha512-y0y6CUB9RLVsy3kfgayU28746QrNMpSm9O/AYGNsBgOkJr/X/Jk0VLGoO8Ude7Bpa8adywzF+MzXNZRFRsNPhg== - micromatch@^2.3.7: version "2.3.11" resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-2.3.11.tgz#86677c97d1720b363431d04d0d15293bd38c1565" @@ -11646,11 +11871,6 @@ mimic-fn@^4.0.0: resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-4.0.0.tgz#60a90550d5cb0b239cca65d893b1a53b29871ecc" integrity sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw== -mimic-response@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-2.1.0.tgz#d13763d35f613d09ec37ebb30bac0469c0ee8f43" - integrity sha512-wXqjST+SLt7R009ySCglWBCFpjUygmCIfD790/kVbiGmUgfYGuB14PiTd5DwVxSV4NcYHjzMkoj5LjQZwTQLEA== - min-indent@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/min-indent/-/min-indent-1.0.1.tgz#a63f681673b30571fbe8bc25686ae746eefa9869" @@ -11783,11 +12003,6 @@ minizlib@^2.0.0, minizlib@^2.1.1: minipass "^3.0.0" yallist "^4.0.0" -mkdirp-classic@^0.5.2, mkdirp-classic@^0.5.3: - version "0.5.3" - resolved "https://registry.yarnpkg.com/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz#fa10c9115cc6d8865be221ba47ee9bed78601113" - integrity sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A== - mkdirp-infer-owner@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/mkdirp-infer-owner/-/mkdirp-infer-owner-2.0.0.tgz#55d3b368e7d89065c38f32fd38e638f0ab61d316" @@ -11809,6 +12024,16 @@ mkdirp@^1.0.3, mkdirp@^1.0.4: resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== +mlly@^1.1.0, mlly@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/mlly/-/mlly-1.1.1.tgz#f1838b14795e2cc284aa4ebcc76a258a52e6f537" + integrity sha512-Jnlh4W/aI4GySPo6+DyTN17Q75KKbLTyFK8BrGhjNP4rxuUjbRWhE6gHg3bs33URWAF44FRm7gdQA348i3XxRw== + dependencies: + acorn "^8.8.2" + pathe "^1.1.0" + pkg-types "^1.0.1" + ufo "^1.1.0" + mnemonist@^0.38.0: version "0.38.5" resolved "https://registry.yarnpkg.com/mnemonist/-/mnemonist-0.38.5.tgz#4adc7f4200491237fe0fa689ac0b86539685cade" @@ -11869,7 +12094,7 @@ ms@2.1.2: resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== -ms@2.1.3, ms@^2.0.0, ms@^2.1.1: +ms@2.1.3, ms@^2.0.0: version "2.1.3" resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== @@ -11913,14 +12138,6 @@ multipipe@^0.1.2: dependencies: duplexer2 "0.0.2" -multistream@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/multistream/-/multistream-4.1.0.tgz#7bf00dfd119556fbc153cff3de4c6d477909f5a8" - integrity sha512-J1XDiAmmNpRCBfIWJv+n0ymC4ABcf/Pl+5YvC5B/D2f/2+8PtHvCNxMPKiQcZyi922Hq69J2YOpb1pTywfifyw== - dependencies: - once "^1.4.0" - readable-stream "^3.6.0" - mute-stream@0.0.7: version "0.0.7" resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab" @@ -11950,10 +12167,10 @@ nanoid@3.3.3: resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.3.tgz#fd8e8b7aa761fe807dba2d1b98fb7241bb724a25" integrity sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w== -napi-build-utils@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/napi-build-utils/-/napi-build-utils-1.0.2.tgz#b1fddc0b2c46e380a0b7a76f984dd47c41a13806" - integrity sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg== +nanoid@^3.3.4: + version "3.3.4" + resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.4.tgz#730b67e3cd09e2deacf03c027c81c9d9dbc5e8ab" + integrity sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw== natural-compare@^1.4.0: version "1.4.0" @@ -11970,19 +12187,6 @@ neo-async@^2.6.0: resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.2.tgz#b4aafb93e3aeb2d8174ca53cf163ab7d7308305f" integrity sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw== -netlify@^11.0.1: - version "11.0.4" - resolved "https://registry.yarnpkg.com/netlify/-/netlify-11.0.4.tgz#f7de45a1432b90ff32e6143011121e65e12175a4" - integrity sha512-pvaFCKkc0pi4CYnM21pNTlQ79zxbnPi8saxT1aslc4zC7gG6A97iIfCQYF7bGWOQgLyaDbmv6A4AWQ7vncDjBg== - dependencies: - "@netlify/open-api" "^2.11.0" - lodash.camelcase "^4.3.0" - micro-api-client "^3.3.0" - node-fetch "^3.0.0" - omit.js "^2.0.2" - p-wait-for "^4.0.0" - qs "^6.9.6" - next-tick@1, next-tick@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/next-tick/-/next-tick-1.1.0.tgz#1836ee30ad56d67ef281b22bd199f709449b35eb" @@ -12020,13 +12224,6 @@ nice-try@^1.0.4: resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366" integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ== -node-abi@^2.21.0: - version "2.30.1" - resolved "https://registry.yarnpkg.com/node-abi/-/node-abi-2.30.1.tgz#c437d4b1fe0e285aaf290d45b45d4d7afedac4cf" - integrity sha512-/2D0wOQPgaUWzVSVgRMx+trKJRC2UG4SUc4oCJoXx9Uxjtp0Vy3/kt7zcbxHF8+Z/pK3UloLWzBISg72brfy1w== - dependencies: - semver "^5.4.1" - node-addon-api@^2.0.0: version "2.0.2" resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-2.0.2.tgz#432cfa82962ce494b132e9d72a15b29f71ff5d32" @@ -12042,27 +12239,13 @@ node-addon-api@^4.3.0: resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-4.3.0.tgz#52a1a0b475193e0928e98e0426a0d1254782b77f" integrity sha512-73sE9+3UaLYYFmDsFZnqCInzPyh3MqIwZO9cw58yIqAZhONrrabrYyYe3TuIqtIiOuTXVhsGau8hcrhhwSsDIQ== -node-domexception@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/node-domexception/-/node-domexception-1.0.0.tgz#6888db46a1f71c0b76b3f7555016b63fe64766e5" - integrity sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ== - -node-fetch@^2.6.1, node-fetch@^2.6.6, node-fetch@^2.6.7: +node-fetch@^2.6.1, node-fetch@^2.6.7: version "2.6.7" resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.7.tgz#24de9fba827e3b4ae44dc8b20256a379160052ad" integrity sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ== dependencies: whatwg-url "^5.0.0" -node-fetch@^3.0.0, node-fetch@^3.2.6: - version "3.2.10" - resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-3.2.10.tgz#e8347f94b54ae18b57c9c049ef641cef398a85c8" - integrity sha512-MhuzNwdURnZ1Cp4XTazr69K0BTizsBroX7Zx3UgDSVcZYKF/6p0CBe4EUb/hLqmzVhl0UpYfgRljQ4yxE+iCxA== - dependencies: - data-uri-to-buffer "^4.0.0" - fetch-blob "^3.1.4" - formdata-polyfill "^4.0.10" - node-gyp-build-optional-packages@5.0.3: version "5.0.3" resolved "https://registry.yarnpkg.com/node-gyp-build-optional-packages/-/node-gyp-build-optional-packages-5.0.3.tgz#92a89d400352c44ad3975010368072b41ad66c17" @@ -12128,22 +12311,6 @@ node-status-codes@^1.0.0: resolved "https://registry.yarnpkg.com/node-status-codes/-/node-status-codes-1.0.0.tgz#5ae5541d024645d32a58fcddc9ceecea7ae3ac2f" integrity sha512-1cBMgRxdMWE8KeWCqk2RIOrvUb0XCwYfEsY5/y2NlXyq4Y/RumnOZvTj4Nbr77+Vb2C+kyBoRTdkNOS8L3d/aQ== -nodemon@^2.0.16: - version "2.0.19" - resolved "https://registry.yarnpkg.com/nodemon/-/nodemon-2.0.19.tgz#cac175f74b9cb8b57e770d47841995eebe4488bd" - integrity sha512-4pv1f2bMDj0Eeg/MhGqxrtveeQ5/G/UVe9iO6uTZzjnRluSA4PVWf8CW99LUPwGB3eNIA7zUFoP77YuI7hOc0A== - dependencies: - chokidar "^3.5.2" - debug "^3.2.7" - ignore-by-default "^1.0.1" - minimatch "^3.0.4" - pstree.remy "^1.1.8" - semver "^5.7.1" - simple-update-notifier "^1.0.7" - supports-color "^5.5.0" - touch "^3.1.0" - undefsafe "^2.0.5" - nopt@^4.0.1: version "4.0.3" resolved "https://registry.yarnpkg.com/nopt/-/nopt-4.0.3.tgz#a375cad9d02fd921278d954c2254d5aa57e15e48" @@ -12159,13 +12326,6 @@ nopt@^5.0.0: dependencies: abbrev "1" -nopt@~1.0.10: - version "1.0.10" - resolved "https://registry.yarnpkg.com/nopt/-/nopt-1.0.10.tgz#6ddd21bd2a31417b92727dd585f8a6f37608ebee" - integrity sha512-NWmpvLSqUrgrAC9HCuxEvb+PSloHpqVu+FqcO4eeF2h5qYRhA7ev6KvelyQAKtegUbC6RypJnlEOhd8vloNKYg== - dependencies: - abbrev "1" - normalize-package-data@^2.0.0, normalize-package-data@^2.3.2, normalize-package-data@^2.3.4, normalize-package-data@^2.5.0: version "2.5.0" resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.5.0.tgz#e66db1838b200c1dfc233225d12cb36520e234a8" @@ -12305,7 +12465,7 @@ npm-run-path@^5.1.0: dependencies: path-key "^4.0.0" -npmlog@^4.0.1, npmlog@^4.1.2: +npmlog@^4.1.2: version "4.1.2" resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.1.2.tgz#08a7f2a8bf734604779a9efa4ad5cc717abb954b" integrity sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg== @@ -12462,12 +12622,7 @@ observable-fns@^0.6.1: resolved "https://registry.yarnpkg.com/observable-fns/-/observable-fns-0.6.1.tgz#636eae4fdd1132e88c0faf38d33658cc79d87e37" integrity sha512-9gRK4+sRWzeN6AOewNBTLXir7Zl/i3GB6Yl26gK4flxz8BXVpD3kt8amREmWNb0mxYOGDotvE5a4N+PtGGKdkg== -omit.js@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/omit.js/-/omit.js-2.0.2.tgz#dd9b8436fab947a5f3ff214cb2538631e313ec2f" - integrity sha512-hJmu9D+bNB40YpL9jYebQl4lsTW6yEHRTroJzNLqQJYHm7c+NQnJGfZmIWh8S3q3KoaxV1aLhV6B3+0N0/kyJg== - -once@^1.3.0, once@^1.3.1, once@^1.4.0: +once@^1.3.0, once@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" integrity sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w== @@ -12590,11 +12745,6 @@ p-finally@^1.0.0: resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae" integrity sha512-LICb2p9CB7FS+0eR1oqWnHhp0FljGLZCWBE9aix0Uye9W8LTQPwMTYVGWQWIw9RdQiDg4+epXQODwIYJtSJaow== -p-is-promise@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/p-is-promise/-/p-is-promise-3.0.0.tgz#58e78c7dfe2e163cf2a04ff869e7c1dba64a5971" - integrity sha512-Wo8VsW4IRQSKVXsJCn7TomUaVtyfjVDn3nUP7kE967BQk0CwFpdbZs0X0uk5sW9mkBa9eNM7hCMaG93WUAwxYQ== - p-limit@^1.1.0: version "1.3.0" resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.3.0.tgz#b86bd5f0c25690911c7590fcbfc2010d54b3ccb8" @@ -12616,6 +12766,13 @@ p-limit@^3.0.2, p-limit@^3.1.0: dependencies: yocto-queue "^0.1.0" +p-limit@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-4.0.0.tgz#914af6544ed32bfa54670b061cafcbd04984b644" + integrity sha512-5b0R4txpzjPWVw/cXXUResoD4hb6U/x9BH08L7nw+GN1sezDzPdxeRvpc9c433fZhBan/wusjbCsqwqm4EIBIQ== + dependencies: + yocto-queue "^1.0.0" + p-locate@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43" @@ -12644,6 +12801,13 @@ p-locate@^5.0.0: dependencies: p-limit "^3.0.2" +p-locate@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-6.0.0.tgz#3da9a49d4934b901089dca3302fa65dc5a05c04f" + integrity sha512-wPrq66Llhl7/4AGC6I+cqxT07LhXvWL08LNXz1fENOw0Ap4sRZZ/gZpTTJ5jpurzzzfS2W/Ge9BY3LgLjCShcw== + dependencies: + p-limit "^4.0.0" + p-map-series@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/p-map-series/-/p-map-series-2.1.0.tgz#7560d4c452d9da0c07e692fdbfe6e2c81a2a91f2" @@ -12681,11 +12845,6 @@ p-timeout@^3.2.0: dependencies: p-finally "^1.0.0" -p-timeout@^5.0.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/p-timeout/-/p-timeout-5.1.0.tgz#b3c691cf4415138ce2d9cfe071dba11f0fee085b" - integrity sha512-auFDyzzzGZZZdHz3BtET9VEz0SE/uMEAx7uWfGPucfzEwwe/xH0iVeZibQmANYE/hp9T2+UUZT5m+BKyrDp3Ew== - p-try@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/p-try/-/p-try-1.0.0.tgz#cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3" @@ -12696,13 +12855,6 @@ p-try@^2.0.0: resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== -p-wait-for@^4.0.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/p-wait-for/-/p-wait-for-4.1.0.tgz#290f126f49bbd7c84e0cedccb342cd631aaa0f16" - integrity sha512-i8nE5q++9h8oaQHWltS1Tnnv4IoMDOlqN7C0KFG2OdbK0iFJIt6CROZ8wfBM+K4Pxqfnq4C4lkkpXqTEpB5DZw== - dependencies: - p-timeout "^5.0.0" - p-waterfall@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/p-waterfall/-/p-waterfall-2.1.1.tgz#63153a774f472ccdc4eb281cdb2967fcf158b2ee" @@ -12854,6 +13006,11 @@ path-exists@^4.0.0: resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== +path-exists@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-5.0.0.tgz#a6aad9489200b21fab31e49cf09277e5116fb9e7" + integrity sha512-RjhtfwJOxzcFmNOi6ltcbcu4Iu+FL3zEj83dk4kAS+fVpTxXLO1b38RvJgT/0QwvV/L3aY9TAnyv0EOqW4GoMQ== + path-is-absolute@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" @@ -12913,6 +13070,11 @@ path@^0.12.7: process "^0.11.1" util "^0.10.3" +pathe@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/pathe/-/pathe-1.1.0.tgz#e2e13f6c62b31a3289af4ba19886c230f295ec03" + integrity sha512-ODbEPR0KKHqECXW1GoxdDb+AZvULmXjVPy4rt+pGo2+TnjJTIPJQSVS6N63n8T2Ip+syHhbn52OewKicV0373w== + pathval@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/pathval/-/pathval-1.1.1.tgz#8534e77a77ce7ac5a2512ea21e0fdb8fcf6c3d8d" @@ -13005,19 +13167,14 @@ pkg-dir@^4.2.0: dependencies: find-up "^4.0.0" -pkg-fetch@3.4.2: - version "3.4.2" - resolved "https://registry.yarnpkg.com/pkg-fetch/-/pkg-fetch-3.4.2.tgz#6f68ebc54842b73f8c0808959a9df3739dcb28b7" - integrity sha512-0+uijmzYcnhC0hStDjm/cl2VYdrmVVBpe7Q8k9YBojxmR5tG8mvR9/nooQq3QSXiQqORDVOTY3XqMEqJVIzkHA== +pkg-types@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/pkg-types/-/pkg-types-1.0.2.tgz#c233efc5210a781e160e0cafd60c0d0510a4b12e" + integrity sha512-hM58GKXOcj8WTqUXnsQyJYXdeAPbythQgEF3nTcEo+nkD49chjQ9IKm/QJy9xf6JakXptz86h7ecP2024rrLaQ== dependencies: - chalk "^4.1.2" - fs-extra "^9.1.0" - https-proxy-agent "^5.0.0" - node-fetch "^2.6.6" - progress "^2.0.3" - semver "^7.3.5" - tar-fs "^2.1.1" - yargs "^16.2.0" + jsonc-parser "^3.2.0" + mlly "^1.1.1" + pathe "^1.1.0" pkg-up@^3.1.0: version "3.1.0" @@ -13026,26 +13183,6 @@ pkg-up@^3.1.0: dependencies: find-up "^3.0.0" -pkg@^5.7.0: - version "5.8.0" - resolved "https://registry.yarnpkg.com/pkg/-/pkg-5.8.0.tgz#a77644aeff0b94a1656d7f76558837f7c754a4c0" - integrity sha512-8h9PUDYFi+LOMLbIyGRdP21g08mAtHidSpofSrf8LWhxUWGHymaRzcopEGiynB5EhQmZUKM6PQ9kCImV2TpdjQ== - dependencies: - "@babel/generator" "7.18.2" - "@babel/parser" "7.18.4" - "@babel/types" "7.18.4" - chalk "^4.1.2" - fs-extra "^9.1.0" - globby "^11.1.0" - into-stream "^6.0.0" - is-core-module "2.9.0" - minimist "^1.2.6" - multistream "^4.1.0" - pkg-fetch "3.4.2" - prebuild-install "6.1.4" - resolve "^1.22.0" - stream-meter "^1.0.4" - postcss-load-config@^3.0.1: version "3.1.4" resolved "https://registry.yarnpkg.com/postcss-load-config/-/postcss-load-config-3.1.4.tgz#1ab2571faf84bb078877e1d07905eabe9ebda855" @@ -13059,6 +13196,15 @@ postcss-value-parser@^4.2.0: resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz#723c09920836ba6d3e5af019f92bc0971c02e514" integrity sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ== +postcss@^8.4.21: + version "8.4.21" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.21.tgz#c639b719a57efc3187b13a1d765675485f4134f4" + integrity sha512-tP7u/Sn/dVxK2NnruI4H9BG+x+Wxz6oeZ1cJ8P6G/PZY0IKk4k/63TDsQf2kQq3+qoJeLm2kIBUNlZe3zgb4Zg== + dependencies: + nanoid "^3.3.4" + picocolors "^1.0.0" + source-map-js "^1.0.2" + posthtml-parser@^0.10.1: version "0.10.2" resolved "https://registry.yarnpkg.com/posthtml-parser/-/posthtml-parser-0.10.2.tgz#df364d7b179f2a6bf0466b56be7b98fd4e97c573" @@ -13088,25 +13234,6 @@ posthtml@^0.16.4, posthtml@^0.16.5: posthtml-parser "^0.11.0" posthtml-render "^3.0.0" -prebuild-install@6.1.4: - version "6.1.4" - resolved "https://registry.yarnpkg.com/prebuild-install/-/prebuild-install-6.1.4.tgz#ae3c0142ad611d58570b89af4986088a4937e00f" - integrity sha512-Z4vpywnK1lBg+zdPCVCsKq0xO66eEV9rWo2zrROGGiRS4JtueBOdlB1FnY8lcy7JsUud/Q3ijUxyWN26Ika0vQ== - dependencies: - detect-libc "^1.0.3" - expand-template "^2.0.3" - github-from-package "0.0.0" - minimist "^1.2.3" - mkdirp-classic "^0.5.3" - napi-build-utils "^1.0.1" - node-abi "^2.21.0" - npmlog "^4.0.1" - pump "^3.0.0" - rc "^1.2.7" - simple-get "^3.0.3" - tar-fs "^2.0.0" - tunnel-agent "^0.6.0" - prelude-ls@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" @@ -13139,6 +13266,15 @@ prettier-plugin-solidity@^1.0.0-beta.19: solidity-comments-extractor "^0.0.7" string-width "^4.2.3" +prettier-plugin-solidity@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/prettier-plugin-solidity/-/prettier-plugin-solidity-1.1.2.tgz#452be4df925a4b16a974a04235839c9f56c2d10d" + integrity sha512-KC5oNbFJfyBaFiO0kl56J6AXnDmr9tUlBV1iqo864x4KQrKYKaBZvW9jhT2oC0NHoNp7/GoMJNxqL8pp8k7C/g== + dependencies: + "@solidity-parser/parser" "^0.15.0" + semver "^7.3.8" + solidity-comments-extractor "^0.0.7" + prettier@^1.14.3: version "1.19.1" resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.19.1.tgz#f7d7f5ff8a9cd872a7be4ca142095956a60797cb" @@ -13154,6 +13290,11 @@ prettier@^2.6.2: resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.7.1.tgz#e235806850d057f97bb08368a4f7d899f7760c64" integrity sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g== +prettier@^2.8.4: + version "2.8.4" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.4.tgz#34dd2595629bfbb79d344ac4a91ff948694463c3" + integrity sha512-vIS4Rlc2FNh0BySk3Wkd6xmwxB0FpOndW5fisM5H8hsZSxU2VWVB5CWIkIjWvrHjIhxk2g3bfMKM87zNTrZddw== + pretty-format@^27.0.0, pretty-format@^27.5.1: version "27.5.1" resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-27.5.1.tgz#2181879fdea51a7a5851fb39d920faa63f01d88e" @@ -13182,7 +13323,7 @@ process@^0.11.1: resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" integrity sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A== -progress@^2.0.0, progress@^2.0.3: +progress@^2.0.0: version "2.0.3" resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8" integrity sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA== @@ -13291,19 +13432,6 @@ psl@^1.1.28, psl@^1.1.33: resolved "https://registry.yarnpkg.com/psl/-/psl-1.9.0.tgz#d0df2a137f00794565fcaf3b2c00cd09f8d5a5a7" integrity sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag== -pstree.remy@^1.1.8: - version "1.1.8" - resolved "https://registry.yarnpkg.com/pstree.remy/-/pstree.remy-1.1.8.tgz#c242224f4a67c21f686839bbdb4ac282b8373d3a" - integrity sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w== - -pump@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/pump/-/pump-3.0.0.tgz#b4a2116815bde2f4e1ea602354e8c75565107a64" - integrity sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww== - dependencies: - end-of-stream "^1.1.0" - once "^1.3.1" - punycode@^2.1.0, punycode@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" @@ -13314,7 +13442,7 @@ q@^1.5.1: resolved "https://registry.yarnpkg.com/q/-/q-1.5.1.tgz#7e32f75b41381291d04611f1bf14109ac00651d7" integrity sha512-kV/CThkXo6xyFEZUugw/+pIOywXcDbFYgSct5cT3gqlbkBE1SJdwy6UQoZvodiWF/ckQLZyDE/Bu1M6gVu5lVw== -qs@^6.7.0, qs@^6.9.4, qs@^6.9.6: +qs@^6.7.0, qs@^6.9.4: version "6.11.0" resolved "https://registry.yarnpkg.com/qs/-/qs-6.11.0.tgz#fd0d963446f7a65e1367e01abd85429453f0c37a" integrity sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q== @@ -13372,7 +13500,7 @@ raw-body@^2.4.1: iconv-lite "0.4.24" unpipe "1.0.0" -rc@^1.1.2, rc@^1.2.7: +rc@^1.1.2: version "1.2.8" resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.8.tgz#cd924bf5200a075b83c188cd6b9e211b7fc0d3ed" integrity sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw== @@ -13571,7 +13699,7 @@ read@1, read@~1.0.1: dependencies: mute-stream "~0.0.4" -readable-stream@3, readable-stream@^3.0.0, readable-stream@^3.0.2, readable-stream@^3.1.0, readable-stream@^3.1.1, readable-stream@^3.4.0, readable-stream@^3.6.0: +readable-stream@3, readable-stream@^3.0.0, readable-stream@^3.0.2, readable-stream@^3.1.0, readable-stream@^3.4.0, readable-stream@^3.6.0: version "3.6.0" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.0.tgz#337bbda3adc0706bd3e024426a286d4b4b2c9198" integrity sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA== @@ -13590,7 +13718,7 @@ readable-stream@3, readable-stream@^3.0.0, readable-stream@^3.0.2, readable-stre isarray "0.0.1" string_decoder "~0.10.x" -readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.4, readable-stream@^2.0.5, readable-stream@^2.0.6, readable-stream@^2.1.4, readable-stream@^2.2.2, readable-stream@^2.3.0, readable-stream@^2.3.5, readable-stream@~2.3.6: +readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.4, readable-stream@^2.0.5, readable-stream@^2.0.6, readable-stream@^2.2.2, readable-stream@^2.3.0, readable-stream@^2.3.5, readable-stream@~2.3.6: version "2.3.7" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57" integrity sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw== @@ -13825,7 +13953,7 @@ resolve@1.17.0: dependencies: path-parse "^1.0.6" -resolve@>=1.9.0, resolve@^1.1.6, resolve@^1.10.0, resolve@^1.11.0, resolve@^1.17.0, resolve@^1.19.0, resolve@^1.20.0, resolve@^1.22.0: +resolve@>=1.9.0, resolve@^1.1.6, resolve@^1.10.0, resolve@^1.11.0, resolve@^1.17.0, resolve@^1.19.0, resolve@^1.20.0, resolve@^1.22.1: version "1.22.1" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.1.tgz#27cb2ebb53f91abb49470a928bba7558066ac177" integrity sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw== @@ -13952,6 +14080,13 @@ rollup@^2.74.1: optionalDependencies: fsevents "~2.3.2" +rollup@^3.10.0: + version "3.17.3" + resolved "https://registry.yarnpkg.com/rollup/-/rollup-3.17.3.tgz#ee7c4e1a262da55c491a4788b632fa123315f6ef" + integrity sha512-p5LaCXiiOL/wrOkj8djsIDFmyU9ysUxcyW+EKRLHb6TKldJzXpImjcRSR+vgo09DBdofGcOoLOsRyxxG2n5/qQ== + optionalDependencies: + fsevents "~2.3.2" + rollup@^3.2.5: version "3.6.0" resolved "https://registry.yarnpkg.com/rollup/-/rollup-3.6.0.tgz#2bff14b8680747fbb0228d102607d6a6e21859d7" @@ -13984,13 +14119,6 @@ rustbn.js@~0.2.0: resolved "https://registry.yarnpkg.com/rustbn.js/-/rustbn.js-0.2.0.tgz#8082cb886e707155fd1cb6f23bd591ab8d55d0ca" integrity sha512-4VlvkRUuCJvr2J6Y0ImW7NvTCriMi7ErOAqWk1y69vAdoNIzCF3yPmgeNzx+RQTLEDFq5sHfscn1MwHxP9hNfA== -rxjs@^5.5.2: - version "5.5.12" - resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-5.5.12.tgz#6fa61b8a77c3d793dbaf270bee2f43f652d741cc" - integrity sha512-xx2itnL5sBbqeeiVgNPVuQQ1nC8Jp2WfNJhXWHmElW9YmrpS9UVnNzhP3EH3HFqexO5Tlp8GhYY+WEcqcVMvGw== - dependencies: - symbol-observable "1.0.1" - rxjs@^6.4.0, rxjs@^6.6.0: version "6.6.7" resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.6.7.tgz#90ac018acabf491bf65044235d5863c4dab804c9" @@ -14081,7 +14209,7 @@ semver-truncate@^1.0.0: dependencies: semver "^5.3.0" -"semver@2 || 3 || 4 || 5", semver@^5.3.0, semver@^5.4.1, semver@^5.5.0, semver@^5.5.1, semver@^5.6.0, semver@^5.7.0, semver@^5.7.1: +"semver@2 || 3 || 4 || 5", semver@^5.3.0, semver@^5.5.0, semver@^5.5.1, semver@^5.6.0, semver@^5.7.0, semver@^5.7.1: version "5.7.1" resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== @@ -14103,10 +14231,12 @@ semver@^6.0.0, semver@^6.3.0: resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== -semver@~7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.0.0.tgz#5f3ca35761e47e05b206c6daff2cf814f0316b8e" - integrity sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A== +semver@^7.3.8: + version "7.3.8" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.8.tgz#07a78feafb3f7b32347d725e33de7e2a2df67798" + integrity sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A== + dependencies: + lru-cache "^6.0.0" serialize-javascript@6.0.0: version "6.0.0" @@ -14209,32 +14339,16 @@ side-channel@^1.0.4: get-intrinsic "^1.0.2" object-inspect "^1.9.0" +siginfo@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/siginfo/-/siginfo-2.0.0.tgz#32e76c70b79724e3bb567cb9d543eb858ccfaf30" + integrity sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g== + signal-exit@^3.0.0, signal-exit@^3.0.2, signal-exit@^3.0.3, signal-exit@^3.0.7: version "3.0.7" resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9" integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== -simple-concat@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/simple-concat/-/simple-concat-1.0.1.tgz#f46976082ba35c2263f1c8ab5edfe26c41c9552f" - integrity sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q== - -simple-get@^3.0.3: - version "3.1.1" - resolved "https://registry.yarnpkg.com/simple-get/-/simple-get-3.1.1.tgz#cc7ba77cfbe761036fbfce3d021af25fc5584d55" - integrity sha512-CQ5LTKGfCpvE1K0n2us+kuMPbk/q0EKl82s4aheV9oXjFEz6W/Y7oQFVJuU6QG77hRT4Ghb5RURteF5vnWjupA== - dependencies: - decompress-response "^4.2.0" - once "^1.3.1" - simple-concat "^1.0.0" - -simple-update-notifier@^1.0.7: - version "1.0.7" - resolved "https://registry.yarnpkg.com/simple-update-notifier/-/simple-update-notifier-1.0.7.tgz#7edf75c5bdd04f88828d632f762b2bc32996a9cc" - integrity sha512-BBKgR84BJQJm6WjWFMHgLVuo61FBDSj1z/xSFUIozqO6wO7ii0JxCqlIud7Enr/+LhlbNI0whErq96P2qHNWew== - dependencies: - semver "~7.0.0" - sisteransi@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/sisteransi/-/sisteransi-1.0.5.tgz#134d681297756437cc05ca01370d3a7a571075ed" @@ -14389,6 +14503,11 @@ sort-keys@^4.0.0: dependencies: is-plain-obj "^2.0.0" +source-map-js@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.0.2.tgz#adbc361d9c62df380125e7f161f71c826f1e490c" + integrity sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw== + source-map-support@0.5.13: version "0.5.13" resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.13.tgz#31b24a9c2e73c2de85066c0feb7d44767ed52932" @@ -14516,6 +14635,11 @@ stack-utils@^2.0.3: dependencies: escape-string-regexp "^2.0.0" +stackback@0.0.2: + version "0.0.2" + resolved "https://registry.yarnpkg.com/stackback/-/stackback-0.0.2.tgz#1ac8a0d9483848d1695e418b6d031a3c3ce68e3b" + integrity sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw== + stacktrace-parser@^0.1.10: version "0.1.10" resolved "https://registry.yarnpkg.com/stacktrace-parser/-/stacktrace-parser-0.1.10.tgz#29fb0cae4e0d0b85155879402857a1639eb6051a" @@ -14533,6 +14657,11 @@ statuses@2.0.1: resolved "https://registry.yarnpkg.com/statuses/-/statuses-2.0.1.tgz#55cb000ccf1d48728bd23c685a063998cf1a1b63" integrity sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ== +std-env@^3.3.1: + version "3.3.2" + resolved "https://registry.yarnpkg.com/std-env/-/std-env-3.3.2.tgz#af27343b001616015534292178327b202b9ee955" + integrity sha512-uUZI65yrV2Qva5gqE0+A7uVAvO40iPo6jGhs7s8keRfHCmtg+uB2X6EiLGCI9IgL1J17xGhvoOqSz79lzICPTA== + stream-combiner2@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/stream-combiner2/-/stream-combiner2-1.1.1.tgz#fb4d8a1420ea362764e21ad4780397bebcb41cbe" @@ -14541,13 +14670,6 @@ stream-combiner2@^1.1.1: duplexer2 "~0.1.0" readable-stream "^2.0.2" -stream-meter@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/stream-meter/-/stream-meter-1.0.4.tgz#52af95aa5ea760a2491716704dbff90f73afdd1d" - integrity sha512-4sOEtrbgFotXwnEuzzsQBYEV1elAeFSO8rSGeTwabuX1RRn/kEq9JVH7I0MRBhKVRR0sJkr0M0QCH7yOLf9fhQ== - dependencies: - readable-stream "^2.1.4" - stream-shift@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/stream-shift/-/stream-shift-1.0.1.tgz#d7088281559ab2778424279b0877da3c392d5a3d" @@ -14807,6 +14929,13 @@ strip-json-comments@^2.0.1, strip-json-comments@~2.0.1: resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" integrity sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ== +strip-literal@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/strip-literal/-/strip-literal-1.0.1.tgz#0115a332710c849b4e46497891fb8d585e404bd2" + integrity sha512-QZTsipNpa2Ppr6v1AmJHESqJ3Uz247MUS0OjrnnZjFAvEoWqxuyFuXn2xLgMtRnijJShAa1HL0gtJyUs7u7n3Q== + dependencies: + acorn "^8.8.2" + strip-outer@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/strip-outer/-/strip-outer-1.0.1.tgz#b2fd2abf6604b9d1e6013057195df836b8a9d631" @@ -14854,7 +14983,7 @@ supports-color@^2.0.0: resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" integrity sha512-KKNVtd6pCYgPIKU4cp2733HWYCpplQhddZLBUryaAHou723x+FRzQ5Df824Fj+IyyuiQTRoub4SnIFfIcrp70g== -supports-color@^5.3.0, supports-color@^5.5.0: +supports-color@^5.3.0: version "5.5.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== @@ -14894,11 +15023,6 @@ svgo@^2.4.0: picocolors "^1.0.0" stable "^0.1.8" -symbol-observable@1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-1.0.1.tgz#8340fc4702c3122df5d22288f88283f513d3fdd4" - integrity sha512-Kb3PrPYz4HanVF1LVGuAdW6LoVgIwjUYJGzFe7NDrBLCN4lsV/5J0MFurV+ygS4bRVwrCEt2c7MQ1R2a72oJDw== - symbol-tree@^3.2.4: version "3.2.4" resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.4.tgz#430637d248ba77e078883951fb9aa0eed7c63fa2" @@ -14935,16 +15059,6 @@ table@^6.8.1: string-width "^4.2.3" strip-ansi "^6.0.1" -tar-fs@^2.0.0, tar-fs@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/tar-fs/-/tar-fs-2.1.1.tgz#489a15ab85f1f0befabb370b7de4f9eb5cbe8784" - integrity sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng== - dependencies: - chownr "^1.1.1" - mkdirp-classic "^0.5.2" - pump "^3.0.0" - tar-stream "^2.1.4" - tar-stream@^1.1.1: version "1.6.2" resolved "https://registry.yarnpkg.com/tar-stream/-/tar-stream-1.6.2.tgz#8ea55dab37972253d9a9af90fdcd559ae435c555" @@ -14958,17 +15072,6 @@ tar-stream@^1.1.1: to-buffer "^1.1.1" xtend "^4.0.0" -tar-stream@^2.1.4: - version "2.2.0" - resolved "https://registry.yarnpkg.com/tar-stream/-/tar-stream-2.2.0.tgz#acad84c284136b060dc3faa64474aa9aebd77287" - integrity sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ== - dependencies: - bl "^4.0.3" - end-of-stream "^1.4.1" - fs-constants "^1.0.0" - inherits "^2.0.3" - readable-stream "^3.1.1" - tar@^4.4.12: version "4.4.19" resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.19.tgz#2e4d7263df26f2b914dee10c825ab132123742f3" @@ -15162,6 +15265,21 @@ tiny-decoders@^6.0.1: dependencies: esm "^3.2.25" +tinybench@^2.3.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/tinybench/-/tinybench-2.3.1.tgz#14f64e6b77d7ef0b1f6ab850c7a808c6760b414d" + integrity sha512-hGYWYBMPr7p4g5IarQE7XhlyWveh1EKhy4wUBS1LrHXCKYgvz+4/jCqgmJqZxxldesn05vccrtME2RLLZNW7iA== + +tinypool@^0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/tinypool/-/tinypool-0.3.1.tgz#a99c2e446aba9be05d3e1cb756d6aed7af4723b6" + integrity sha512-zLA1ZXlstbU2rlpA4CIeVaqvWq41MTWqLY3FfsAXgC8+f7Pk7zroaJQxDgxn1xNudKW6Kmj4808rPFShUlIRmQ== + +tinyspy@^1.0.2: + version "1.1.1" + resolved "https://registry.yarnpkg.com/tinyspy/-/tinyspy-1.1.1.tgz#0cb91d5157892af38cb2d217f5c7e8507a5bf092" + integrity sha512-UVq5AXt/gQlti7oxoIg5oi/9r0WpF7DGEVwXgqWSMmyN16+e3tl5lIvTaOpJ3TAtu5xFzWccFRM4R5NaWHF+4g== + tmp@0.0.33, tmp@^0.0.33: version "0.0.33" resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9" @@ -15203,13 +15321,6 @@ toidentifier@1.0.1: resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.1.tgz#3be34321a88a820ed1bd80dfaa33e479fbb8dd35" integrity sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA== -touch@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/touch/-/touch-3.1.0.tgz#fe365f5f75ec9ed4e56825e0bb76d24ab74af83b" - integrity sha512-WBx8Uy5TLtOSRtIq+M03/sKDrXCLHxwDcquSP2c43Le03/9serjQBIztjRz6FkJez9D/hleyAXTBGLwwZUw9lA== - dependencies: - nopt "~1.0.10" - tough-cookie@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-4.0.0.tgz#d822234eeca882f991f0f908824ad2622ddbece4" @@ -15359,7 +15470,7 @@ ts-node@10.7: v8-compile-cache-lib "^3.0.0" yn "3.1.1" -ts-node@^10.7.0, ts-node@^10.8.1: +ts-node@^10.7.0, ts-node@^10.8.1, ts-node@^10.9.1: version "10.9.1" resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-10.9.1.tgz#e73de9102958af9e1f0b168a6ff320e25adcff4b" integrity sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw== @@ -15460,6 +15571,26 @@ tsup@^6.5.0: sucrase "^3.20.3" tree-kill "^1.2.2" +tsup@^6.6.3: + version "6.6.3" + resolved "https://registry.yarnpkg.com/tsup/-/tsup-6.6.3.tgz#f6f975a8656cfd9b8e115f33b1aa0f0fd4df78e2" + integrity sha512-OLx/jFllYlVeZQ7sCHBuRVEQBBa1tFbouoc/gbYakyipjVQdWy/iQOvmExUA/ewap9iQ7tbJf9pW0PgcEFfJcQ== + dependencies: + bundle-require "^4.0.0" + cac "^6.7.12" + chokidar "^3.5.1" + debug "^4.3.1" + esbuild "^0.17.6" + execa "^5.0.0" + globby "^11.0.3" + joycon "^3.0.1" + postcss-load-config "^3.0.1" + resolve-from "^5.0.0" + rollup "^3.2.5" + source-map "0.8.0-beta.0" + sucrase "^3.20.3" + tree-kill "^1.2.2" + tsutils@^3.21.0: version "3.21.0" resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.21.0.tgz#b48717d394cea6c1e096983eed58e9d61715b623" @@ -15615,17 +15746,12 @@ typedoc@0.23.21, typedoc@^0.23.10: minimatch "^5.1.0" shiki "^0.11.1" -typescript@>=3.0.0: - version "4.8.3" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.8.3.tgz#d59344522c4bc464a65a730ac695007fdb66dd88" - integrity sha512-goMHfm00nWPa8UvR/CPSvykqf6dVV8x/dp0c5mFTMTIu0u0FlGWRioyy7Nn0PGAdHxpJZnuO/ut+PpQ8UiHAig== - typescript@^4.4.3, typescript@^4.5.5, typescript@^4.6.2, typescript@^4.6.4: version "4.7.4" resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.7.4.tgz#1a88596d1cf47d59507a1bcdfb5b9dfe4d488235" integrity sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ== -typescript@^4.6.3: +typescript@^4.6.3, typescript@^4.9.5: version "4.9.5" resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.5.tgz#095979f9bcc0d09da324d58d03ce8f8374cbe65a" integrity sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g== @@ -15659,6 +15785,11 @@ typical@^5.2.0: resolved "https://registry.yarnpkg.com/typical/-/typical-5.2.0.tgz#4daaac4f2b5315460804f0acf6cb69c52bb93066" integrity sha512-dvdQgNDNJo+8B2uBQoqdb11eUCE1JQXhvjC/CZtgvZseVd5TYMXnq0+vuUemXbd/Se29cTaUuPX3YIc2xgbvIg== +ufo@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/ufo/-/ufo-1.1.0.tgz#a5c4c814b0a98f7e0ca42c478688663fd3e3c037" + integrity sha512-LQc2s/ZDMaCN3QLpa+uzHUOQ7SdV0qgv3VBXOolQGXTaaZpIur6PwUclF5nN2hNkiTRcUugXd1zFOW3FLJ135Q== + uglify-js@^3.1.4: version "3.17.0" resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.17.0.tgz#55bd6e9d19ce5eef0d5ad17cd1f587d85b180a85" @@ -15684,11 +15815,6 @@ unbox-primitive@^1.0.2: has-symbols "^1.0.3" which-boxed-primitive "^1.0.2" -undefsafe@^2.0.5: - version "2.0.5" - resolved "https://registry.yarnpkg.com/undefsafe/-/undefsafe-2.0.5.tgz#38733b9327bdcd226db889fb723a6efd162e6e2c" - integrity sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA== - undici@^5.4.0: version "5.9.1" resolved "https://registry.yarnpkg.com/undici/-/undici-5.9.1.tgz#fc9fd85dd488f965f153314a63d9426a11f3360b" @@ -15934,6 +16060,60 @@ vinyl@^1.0.0: clone-stats "^0.0.1" replace-ext "0.0.1" +vite-node@0.29.1: + version "0.29.1" + resolved "https://registry.yarnpkg.com/vite-node/-/vite-node-0.29.1.tgz#cc1e5fea46ff52645e0cf03d4ee03bf706d60308" + integrity sha512-Ey9bTlQOQrCxQN0oJ7sTg+GrU4nTMLg44iKTFCKf31ry60csqQz4E+Q04hdWhwE4cTgpxUC+zEB1kHbf5jNkFA== + dependencies: + cac "^6.7.14" + debug "^4.3.4" + mlly "^1.1.0" + pathe "^1.1.0" + picocolors "^1.0.0" + vite "^3.0.0 || ^4.0.0" + +"vite@^3.0.0 || ^4.0.0": + version "4.1.4" + resolved "https://registry.yarnpkg.com/vite/-/vite-4.1.4.tgz#170d93bcff97e0ebc09764c053eebe130bfe6ca0" + integrity sha512-3knk/HsbSTKEin43zHu7jTwYWv81f8kgAL99G5NWBcA1LKvtvcVAC4JjBH1arBunO9kQka+1oGbrMKOjk4ZrBg== + dependencies: + esbuild "^0.16.14" + postcss "^8.4.21" + resolve "^1.22.1" + rollup "^3.10.0" + optionalDependencies: + fsevents "~2.3.2" + +vitest@^0.29.1: + version "0.29.1" + resolved "https://registry.yarnpkg.com/vitest/-/vitest-0.29.1.tgz#1a5aa3494a8ff96556d7601a39d57f7c890022c4" + integrity sha512-iSy6d9VwsIn7pz5I8SjVwdTLDRGKNZCRJVzROwjt0O0cffoymKwazIZ2epyMpRGpeL5tsXAl1cjXiT7agTyVug== + dependencies: + "@types/chai" "^4.3.4" + "@types/chai-subset" "^1.3.3" + "@types/node" "*" + "@vitest/expect" "0.29.1" + "@vitest/runner" "0.29.1" + "@vitest/spy" "0.29.1" + "@vitest/utils" "0.29.1" + acorn "^8.8.1" + acorn-walk "^8.2.0" + cac "^6.7.14" + chai "^4.3.7" + debug "^4.3.4" + local-pkg "^0.4.2" + pathe "^1.1.0" + picocolors "^1.0.0" + source-map "^0.6.1" + std-env "^3.3.1" + strip-literal "^1.0.0" + tinybench "^2.3.1" + tinypool "^0.3.1" + tinyspy "^1.0.2" + vite "^3.0.0 || ^4.0.0" + vite-node "0.29.1" + why-is-node-running "^2.2.2" + vscode-oniguruma@^1.6.1: version "1.6.2" resolved "https://registry.yarnpkg.com/vscode-oniguruma/-/vscode-oniguruma-1.6.2.tgz#aeb9771a2f1dbfc9083c8a7fdd9cccaa3f386607" @@ -15984,11 +16164,6 @@ weak-lru-cache@^1.2.2: resolved "https://registry.yarnpkg.com/weak-lru-cache/-/weak-lru-cache-1.2.2.tgz#fdbb6741f36bae9540d12f480ce8254060dccd19" integrity sha512-DEAoo25RfSYMuTGc9vPJzZcZullwIqRDSI9LOy+fkCJPi6hykCnfKaXTuPBDuXAUcqHXyOgFtHNp/kB2FjYHbw== -web-streams-polyfill@^3.0.3: - version "3.2.1" - resolved "https://registry.yarnpkg.com/web-streams-polyfill/-/web-streams-polyfill-3.2.1.tgz#71c2718c52b45fd49dbeee88634b3a60ceab42a6" - integrity sha512-e0MO3wdXWKrLbL0DgGnUV7WHVuw9OUvL4hjgnPkIeEvESk74gAITi5G606JtZPp39cd8HA9VQzCIvA49LpPN5Q== - web3-utils@^1.7.5: version "1.7.5" resolved "https://registry.yarnpkg.com/web3-utils/-/web3-utils-1.7.5.tgz#081a952ac6e0322e25ac97b37358a43c7372ef6a" @@ -16103,6 +16278,14 @@ which@^2.0.1, which@^2.0.2: dependencies: isexe "^2.0.0" +why-is-node-running@^2.2.2: + version "2.2.2" + resolved "https://registry.yarnpkg.com/why-is-node-running/-/why-is-node-running-2.2.2.tgz#4185b2b4699117819e7154594271e7e344c9973e" + integrity sha512-6tSwToZxTOcotxHeA+qGCq1mVzKR3CwcJGmVcY+QE8SHy6TnpFnh8PAvPNHYr7EcuVeG0QSMxtYCuO1ta/G/oA== + dependencies: + siginfo "^2.0.0" + stackback "0.0.2" + wide-align@^1.1.0: version "1.1.5" resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.5.tgz#df1d4c206854369ecf3c9a4898f1b23fbd9d15d3" @@ -16370,7 +16553,7 @@ yargs@^14.0.0: y18n "^4.0.0" yargs-parser "^15.0.1" -yargs@^17.0.0, yargs@^17.5.1: +yargs@^17.0.0: version "17.5.1" resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.5.1.tgz#e109900cab6fcb7fd44b1d8249166feb0b36e58e" integrity sha512-t6YAJcxDkNX7NFYiVtKvWUz8l+PaKTLiL63mJYWR2GnHq2gjEWISzsLp9wg3aY36dY1j+gfIEL3pIF+XlJJfbA== @@ -16396,6 +16579,19 @@ yargs@^17.3.1: y18n "^5.0.5" yargs-parser "^21.1.1" +yargs@^17.7.1: + version "17.7.1" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.7.1.tgz#34a77645201d1a8fc5213ace787c220eabbd0967" + integrity sha512-cwiTb08Xuv5fqF4AovYacTFNxk62th7LKJ6BL9IGUpTJrWoU7/7WdQGTP2SjKf1dUNBGzDd28p/Yfs/GI6JrLw== + dependencies: + cliui "^8.0.1" + escalade "^3.1.1" + get-caller-file "^2.0.5" + require-directory "^2.1.1" + string-width "^4.2.3" + y18n "^5.0.5" + yargs-parser "^21.1.1" + yauzl@^2.2.1: version "2.10.0" resolved "https://registry.yarnpkg.com/yauzl/-/yauzl-2.10.0.tgz#c7eb17c93e112cb1086fa6d8e51fb0667b79a5f9" @@ -16413,3 +16609,18 @@ yocto-queue@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== + +yocto-queue@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-1.0.0.tgz#7f816433fb2cbc511ec8bf7d263c3b58a1a3c251" + integrity sha512-9bnSc/HEW2uRy67wc+T8UwauLuPJVn28jb+GtJY16iiKWyvmYJRXVT4UamsAEGQfPohgr2q4Tq0sQbQlxTfi1g== + +zod-validation-error@^0.3.2: + version "0.3.2" + resolved "https://registry.yarnpkg.com/zod-validation-error/-/zod-validation-error-0.3.2.tgz#1f09877cd3d671a37d6c0e4e0b7ad42c24d5d8c2" + integrity sha512-pBXItXNDup6KF54fdnA+cmB/eEt65HlN5pmahfBTUhufWEnXs4ouU8lLXh01GoAksIR9K7iF7BxXxkKvct+r+A== + +zod@^3.20.6: + version "3.20.6" + resolved "https://registry.yarnpkg.com/zod/-/zod-3.20.6.tgz#2f2f08ff81291d47d99e86140fedb4e0db08361a" + integrity sha512-oyu0m54SGCtzh6EClBVqDDlAYRz4jrVtKwQ7ZnsEmMI9HnzuZFj8QFwAY1M5uniIYACdGvv0PBWPF2kO0aNofA==