From d5c270023abc325f25af868d3db1a0bdc3e62d6d Mon Sep 17 00:00:00 2001 From: Kevin Ingersoll Date: Tue, 22 Oct 2024 13:56:24 +0100 Subject: [PATCH] fix(gas-report): include contract name in file of output (#3317) --- .changeset/brown-panthers-melt.md | 5 + packages/cli/src/commands/index.ts | 4 +- packages/gas-report/bin/gas-report.js | 2 +- packages/gas-report/package.json | 6 +- .../gas-report/ts/{ => bin}/gas-report.ts | 2 +- packages/gas-report/ts/command.ts | 81 ++++ packages/gas-report/ts/common.ts | 16 + packages/gas-report/ts/exports/internal.ts | 1 + packages/gas-report/ts/index.ts | 211 ---------- packages/gas-report/ts/printGasReport.ts | 27 ++ packages/gas-report/ts/runGasReport.ts | 87 ++++ packages/gas-report/ts/saveGasReport.ts | 8 + packages/gas-report/tsup.config.ts | 2 +- packages/schema-type/gas-report.json | 36 +- packages/store/gas-report.json | 376 +++++++++--------- packages/world-module-erc20/gas-report.json | 74 ++-- .../world-module-metadata/gas-report.json | 6 +- packages/world-modules/gas-report.json | 112 +++--- packages/world/gas-report.json | 106 ++--- tsconfig.paths.json | 2 +- 20 files changed, 589 insertions(+), 575 deletions(-) create mode 100644 .changeset/brown-panthers-melt.md rename packages/gas-report/ts/{ => bin}/gas-report.ts (95%) create mode 100644 packages/gas-report/ts/command.ts create mode 100644 packages/gas-report/ts/common.ts create mode 100644 packages/gas-report/ts/exports/internal.ts delete mode 100644 packages/gas-report/ts/index.ts create mode 100644 packages/gas-report/ts/printGasReport.ts create mode 100644 packages/gas-report/ts/runGasReport.ts create mode 100644 packages/gas-report/ts/saveGasReport.ts diff --git a/.changeset/brown-panthers-melt.md b/.changeset/brown-panthers-melt.md new file mode 100644 index 0000000000..90c6354ec8 --- /dev/null +++ b/.changeset/brown-panthers-melt.md @@ -0,0 +1,5 @@ +--- +"@latticexyz/gas-report": patch +--- + +Gas report output now include contract name as part of the `file` to help with stable ordering when sorting output. diff --git a/packages/cli/src/commands/index.ts b/packages/cli/src/commands/index.ts index 84ffef5bb6..c77bb3b638 100644 --- a/packages/cli/src/commands/index.ts +++ b/packages/cli/src/commands/index.ts @@ -1,6 +1,6 @@ import { CommandModule } from "yargs"; -import gasReport from "@latticexyz/gas-report"; +import { command as gasReport } from "@latticexyz/gas-report/internal"; import abiTs from "@latticexyz/abi-ts"; import build from "./build"; @@ -21,7 +21,7 @@ export const commands: CommandModule[] = [ build, deploy, devnode, - gasReport as CommandModule, + gasReport, hello, tablegen, worldgen, diff --git a/packages/gas-report/bin/gas-report.js b/packages/gas-report/bin/gas-report.js index aea35994f0..a24ccf717d 100755 --- a/packages/gas-report/bin/gas-report.js +++ b/packages/gas-report/bin/gas-report.js @@ -1,4 +1,4 @@ #!/usr/bin/env node // workaround for https://github.com/pnpm/pnpm/issues/1801 -import "../dist/gas-report.js"; +import "../dist/bin/gas-report.js"; diff --git a/packages/gas-report/package.json b/packages/gas-report/package.json index 10e102c374..3ce4df5e16 100644 --- a/packages/gas-report/package.json +++ b/packages/gas-report/package.json @@ -10,12 +10,12 @@ "license": "MIT", "type": "module", "exports": { - ".": "./dist/index.js" + "./internal": "./dist/exports/internal.js" }, "typesVersions": { "*": { - "index": [ - "./dist/index.d.ts" + "internal": [ + "./dist/exports/internal.d.ts" ] } }, diff --git a/packages/gas-report/ts/gas-report.ts b/packages/gas-report/ts/bin/gas-report.ts similarity index 95% rename from packages/gas-report/ts/gas-report.ts rename to packages/gas-report/ts/bin/gas-report.ts index a7e749ef39..5b553f42a3 100755 --- a/packages/gas-report/ts/gas-report.ts +++ b/packages/gas-report/ts/bin/gas-report.ts @@ -2,7 +2,7 @@ import yargs from "yargs"; import { hideBin } from "yargs/helpers"; -import gasReport from "."; +import { command as gasReport } from "../command"; // Load .env file into process.env import * as dotenv from "dotenv"; diff --git a/packages/gas-report/ts/command.ts b/packages/gas-report/ts/command.ts new file mode 100644 index 0000000000..9b409e0182 --- /dev/null +++ b/packages/gas-report/ts/command.ts @@ -0,0 +1,81 @@ +import type { CommandModule } from "yargs"; +import { readFileSync } from "fs"; +import chalk from "chalk"; +import { runGasReport } from "./runGasReport"; +import { printGasReport } from "./printGasReport"; +import { saveGasReport } from "./saveGasReport"; +import { CommandOptions, GasReport } from "./common"; + +/** + * Print the gas report to the console, save it to a file and compare it to a previous gas report if provided. + * + * Requires foundry to be installed. Inherit from GasReporter and use startGasReport/endGasReport to measure gas used. + * + * ```solidity + * contract MyContractTest is Test, GasReporter { + * function testBuffer() public pure { + * startGasReport("allocate a buffer"); + * Buffer buffer = Buffer_.allocate(32); + * endGasReport(); + * + * bytes32 value = keccak256("some data"); + * + * startGasReport("append 32 bytes to a buffer"); + * buffer.append(value); + * endGasReport(); + * } + * } + * ``` + */ + +export const command: CommandModule = { + command: "gas-report", + + describe: "Create a gas report", + + builder(yargs) { + return yargs.options({ + save: { type: "string", desc: "Save the gas report to a file" }, + compare: { type: "string", desc: "Compare to an existing gas report" }, + stdin: { + type: "boolean", + desc: "Parse the gas report logs from stdin instead of running an internal test command", + }, + }); + }, + + async handler(options) { + let gasReport: GasReport; + try { + gasReport = await runGasReport(options); + } catch (error) { + console.error(error); + setTimeout(() => process.exit()); + return; + } + + // If this gas report should be compared to an existing one, load the existing one + let { compare } = options; + if (compare) { + try { + const compareGasReport: GasReport = JSON.parse(readFileSync(compare, "utf8")); + // Merge the previous gas report with the new one + gasReport = gasReport.map((entry) => { + const prevEntry = compareGasReport.find((e) => e.file === entry.file && e.name === entry.name); + return { ...entry, prevGasUsed: prevEntry?.gasUsed }; + }); + } catch { + console.log(chalk.red(`Gas report to compare not found: ${compare}`)); + compare = undefined; + } + } + + // Print gas report + printGasReport(gasReport, compare); + + // Save gas report to file if requested + if (options.save) saveGasReport(gasReport, options.save); + + process.exit(0); + }, +}; diff --git a/packages/gas-report/ts/common.ts b/packages/gas-report/ts/common.ts new file mode 100644 index 0000000000..4301202329 --- /dev/null +++ b/packages/gas-report/ts/common.ts @@ -0,0 +1,16 @@ +export type GasReportEntry = { + file: string; + test: string; + name: string; + gasUsed: number; + prevGasUsed?: number; +}; + +export type GasReport = GasReportEntry[]; + +export type CommandOptions = { + path: string[]; + save?: string; + compare?: string; + stdin?: boolean; +}; diff --git a/packages/gas-report/ts/exports/internal.ts b/packages/gas-report/ts/exports/internal.ts new file mode 100644 index 0000000000..3f886b70f3 --- /dev/null +++ b/packages/gas-report/ts/exports/internal.ts @@ -0,0 +1 @@ +export * from "../command"; diff --git a/packages/gas-report/ts/index.ts b/packages/gas-report/ts/index.ts deleted file mode 100644 index e8d41f731b..0000000000 --- a/packages/gas-report/ts/index.ts +++ /dev/null @@ -1,211 +0,0 @@ -import type { CommandModule } from "yargs"; -import { readFileSync, writeFileSync } from "fs"; -import { execa } from "execa"; -import chalk from "chalk"; -import { table, getBorderCharacters } from "table"; -import stripAnsi from "strip-ansi"; -import toArray from "stream-to-array"; - -/** - * Print the gas report to the console, save it to a file and compare it to a previous gas report if provided. - * - * Requires foundry to be installed. Inherit from GasReporter and use startGasReport/endGasReport to measure gas used. - * - * ```solidity - * contract MyContractTest is Test, GasReporter { - * function testBuffer() public pure { - * startGasReport("allocate a buffer"); - * Buffer buffer = Buffer_.allocate(32); - * endGasReport(); - * - * bytes32 value = keccak256("some data"); - * - * startGasReport("append 32 bytes to a buffer"); - * buffer.append(value); - * endGasReport(); - * } - * } - * ``` - */ - -type Options = { - path: string[]; - save?: string; - compare?: string; - stdin?: boolean; -}; - -type GasReportEntry = { - file: string; - test: string; - name: string; - gasUsed: number; - prevGasUsed?: number; -}; - -type GasReport = GasReportEntry[]; - -const commandModule: CommandModule = { - command: "gas-report", - - describe: "Create a gas report", - - builder(yargs) { - return yargs.options({ - save: { type: "string", desc: "Save the gas report to a file" }, - compare: { type: "string", desc: "Compare to an existing gas report" }, - stdin: { - type: "boolean", - desc: "Parse the gas report logs from stdin instead of running an internal test command", - }, - }); - }, - - async handler(options) { - let gasReport: GasReport; - try { - gasReport = await runGasReport(options); - } catch (error) { - console.error(error); - setTimeout(() => process.exit()); - return; - } - - // If this gas report should be compared to an existing one, load the existing one - let { compare } = options; - if (compare) { - try { - const compareGasReport: GasReport = JSON.parse(readFileSync(compare, "utf8")); - // Merge the previous gas report with the new one - gasReport = gasReport.map((entry) => { - const prevEntry = compareGasReport.find((e) => e.file === entry.file && e.name === entry.name); - return { ...entry, prevGasUsed: prevEntry?.gasUsed }; - }); - } catch { - console.log(chalk.red(`Gas report to compare not found: ${compare}`)); - compare = undefined; - } - } - - // Print gas report - printGasReport(gasReport, compare); - - // Save gas report to file if requested - if (options.save) saveGasReport(gasReport, options.save); - - process.exit(0); - }, -}; - -export default commandModule; - -async function runGasReport(options: Options): Promise { - console.log("Running gas report"); - const gasReport: GasReport = []; - - // Extract the logs from the child process - let logs: string; - try { - if (options.stdin) { - // Read the logs from stdin and pipe them to stdout for visibility - console.log("Waiting for stdin..."); - process.stdin.pipe(process.stdout); - logs = (await toArray(process.stdin)).map((chunk) => chunk.toString()).join("\n"); - console.log("Done reading stdin"); - } else { - // Run the default test command to capture the logs - const child = execa("forge", ["test", "-vvv", "--isolate"], { - stdio: ["inherit", "pipe", "inherit"], - env: { GAS_REPORTER_ENABLED: "true" }, - }); - logs = (await child).stdout; - } - // eslint-disable-next-line @typescript-eslint/no-explicit-any - } catch (error: any) { - console.log(error.stdout ?? error); - console.log(chalk.red("\n-----------\nError while running the gas report (see above)")); - throw error; - } - - // Extract the gas reports from the logs - const lines = logs.split("\n").map(stripAnsi); - const gasReportPattern = /^\s*GAS REPORT: (\d+) (.*)$/; - const testFunctionPattern = /^\[(?:PASS|FAIL).*\] (\w+)\(\)/; - // Matches "Running" for forge versions before 2024-02-15 - // And "Ran" for forge versions after 2024-02-15 - const testFilePattern = /^(?:Running|Ran) \d+ tests? for (.*):(.*)$/; - - function nearestLine(pattern: RegExp, startIndex: number = lines.length - 1): number { - for (let i = startIndex; i >= 0; i--) { - const line = lines[i]; - if (pattern.test(line)) { - return i; - } - } - return -1; - } - - for (let i = 0; i < lines.length; i++) { - const matches = lines[i].match(gasReportPattern); - if (!matches) continue; - - const gasUsed = parseInt(matches[1]); - const name = matches[2]; - - const testFunctionLineIndex = nearestLine(testFunctionPattern, i); - if (testFunctionLineIndex === -1) { - throw new Error("Could not find nearest test function, did `forge test` output change?"); - } - const testFileLineIndex = nearestLine(testFilePattern, testFunctionLineIndex); - if (testFileLineIndex === -1) { - throw new Error("Could not find nearest test filename, did `forge test` output change?"); - } - - const functionMatches = lines[testFunctionLineIndex].match(testFunctionPattern); - if (!functionMatches) { - throw new Error("Could not parse test function name, did `forge test` output change?"); - } - const fileMatches = lines[testFileLineIndex].match(testFilePattern); - if (!fileMatches) { - throw new Error("Could not parse test filename, did `forge test` output change?"); - } - - const test = functionMatches[1]; - const file = fileMatches[1]; - - gasReport.push({ file, test, name, gasUsed }); - } - - gasReport.sort((a, b) => a.file.localeCompare(b.file)); - - return gasReport; -} - -function printGasReport(gasReport: GasReport, compare?: string) { - if (compare) console.log(chalk.bold(`Gas report compared to ${compare}`)); - - const headers = [ - chalk.bold("File"), - chalk.bold("Test"), - chalk.bold("Name"), - chalk.bold("Gas used"), - ...(compare ? [chalk.bold("Prev gas used"), chalk.bold("Difference")] : []), - ]; - - const values = gasReport.map((entry) => { - const diff = entry.prevGasUsed ? entry.gasUsed - entry.prevGasUsed : 0; - const diffEntry = diff > 0 ? chalk.red(`+${diff}`) : diff < 0 ? chalk.green(`${diff}`) : diff; - const compareColumns = compare ? [entry.prevGasUsed ?? "n/a", diffEntry] : []; - const gasUsedEntry = diff > 0 ? chalk.red(entry.gasUsed) : diff < 0 ? chalk.green(entry.gasUsed) : entry.gasUsed; - return [entry.file, entry.test, entry.name, gasUsedEntry, ...compareColumns]; - }); - - const rows = [headers, ...values]; - - console.log(table(rows, { border: getBorderCharacters("norc") })); -} - -function saveGasReport(gasReport: GasReport, path: string) { - console.log(chalk.bold(`Saving gas report to ${path}`)); - writeFileSync(path, `${JSON.stringify(gasReport, null, 2)}\n`); -} diff --git a/packages/gas-report/ts/printGasReport.ts b/packages/gas-report/ts/printGasReport.ts new file mode 100644 index 0000000000..743c667ef8 --- /dev/null +++ b/packages/gas-report/ts/printGasReport.ts @@ -0,0 +1,27 @@ +import chalk from "chalk"; +import { table, getBorderCharacters } from "table"; +import { GasReport } from "./common"; + +export function printGasReport(gasReport: GasReport, compare?: string) { + if (compare) console.log(chalk.bold(`Gas report compared to ${compare}`)); + + const headers = [ + chalk.bold("File"), + chalk.bold("Test"), + chalk.bold("Name"), + chalk.bold("Gas used"), + ...(compare ? [chalk.bold("Prev gas used"), chalk.bold("Difference")] : []), + ]; + + const values = gasReport.map((entry) => { + const diff = entry.prevGasUsed ? entry.gasUsed - entry.prevGasUsed : 0; + const diffEntry = diff > 0 ? chalk.red(`+${diff}`) : diff < 0 ? chalk.green(`${diff}`) : diff; + const compareColumns = compare ? [entry.prevGasUsed ?? "n/a", diffEntry] : []; + const gasUsedEntry = diff > 0 ? chalk.red(entry.gasUsed) : diff < 0 ? chalk.green(entry.gasUsed) : entry.gasUsed; + return [entry.file, entry.test, entry.name, gasUsedEntry, ...compareColumns]; + }); + + const rows = [headers, ...values]; + + console.log(table(rows, { border: getBorderCharacters("norc") })); +} diff --git a/packages/gas-report/ts/runGasReport.ts b/packages/gas-report/ts/runGasReport.ts new file mode 100644 index 0000000000..836068b58e --- /dev/null +++ b/packages/gas-report/ts/runGasReport.ts @@ -0,0 +1,87 @@ +import { execa } from "execa"; +import chalk from "chalk"; +import stripAnsi from "strip-ansi"; +import toArray from "stream-to-array"; +import { CommandOptions, GasReport } from "./common"; + +export async function runGasReport(options: CommandOptions): Promise { + console.log("Running gas report"); + const gasReport: GasReport = []; + + // Extract the logs from the child process + let logs: string; + try { + if (options.stdin) { + // Read the logs from stdin and pipe them to stdout for visibility + console.log("Waiting for stdin..."); + process.stdin.pipe(process.stdout); + logs = (await toArray(process.stdin)).map((chunk) => chunk.toString()).join("\n"); + console.log("Done reading stdin"); + } else { + // Run the default test command to capture the logs + const child = execa("forge", ["test", "-vvv", "--isolate"], { + stdio: ["inherit", "pipe", "inherit"], + env: { GAS_REPORTER_ENABLED: "true" }, + }); + logs = (await child).stdout; + } + // eslint-disable-next-line @typescript-eslint/no-explicit-any + } catch (error: any) { + console.log(error.stdout ?? error); + console.log(chalk.red("\n-----------\nError while running the gas report (see above)")); + throw error; + } + + // Extract the gas reports from the logs + const lines = logs.split("\n").map(stripAnsi); + const gasReportPattern = /^\s*GAS REPORT: (\d+) (.*)$/; + const testFunctionPattern = /^\[(?:PASS|FAIL).*\] (\w+)\(\)/; + // Matches "Running" for forge versions before 2024-02-15 + // And "Ran" for forge versions after 2024-02-15 + const testFilePattern = /^(?:Running|Ran) \d+ tests? for (.*:.*)$/; + + function nearestLine(pattern: RegExp, startIndex: number = lines.length - 1): number { + for (let i = startIndex; i >= 0; i--) { + const line = lines[i]; + if (pattern.test(line)) { + return i; + } + } + return -1; + } + + for (let i = 0; i < lines.length; i++) { + const matches = lines[i].match(gasReportPattern); + if (!matches) continue; + + const gasUsed = parseInt(matches[1]); + const name = matches[2]; + + const testFunctionLineIndex = nearestLine(testFunctionPattern, i); + if (testFunctionLineIndex === -1) { + throw new Error("Could not find nearest test function, did `forge test` output change?"); + } + const testFileLineIndex = nearestLine(testFilePattern, testFunctionLineIndex); + if (testFileLineIndex === -1) { + throw new Error("Could not find nearest test filename, did `forge test` output change?"); + } + + const functionMatches = lines[testFunctionLineIndex].match(testFunctionPattern); + if (!functionMatches) { + throw new Error("Could not parse test function name, did `forge test` output change?"); + } + const fileMatches = lines[testFileLineIndex].match(testFilePattern); + if (!fileMatches) { + throw new Error("Could not parse test filename, did `forge test` output change?"); + } + + const test = functionMatches[1]; + const file = fileMatches[1]; + + gasReport.push({ file, test, name, gasUsed }); + } + + gasReport.sort((a, b) => a.file.localeCompare(b.file)); + + return gasReport; +} diff --git a/packages/gas-report/ts/saveGasReport.ts b/packages/gas-report/ts/saveGasReport.ts new file mode 100644 index 0000000000..b3a50b261f --- /dev/null +++ b/packages/gas-report/ts/saveGasReport.ts @@ -0,0 +1,8 @@ +import { writeFileSync } from "fs"; +import chalk from "chalk"; +import { GasReport } from "./common"; + +export function saveGasReport(gasReport: GasReport, path: string) { + console.log(chalk.bold(`Saving gas report to ${path}`)); + writeFileSync(path, `${JSON.stringify(gasReport, null, 2)}\n`); +} diff --git a/packages/gas-report/tsup.config.ts b/packages/gas-report/tsup.config.ts index 9af3b2af9a..a8aa90e47a 100644 --- a/packages/gas-report/tsup.config.ts +++ b/packages/gas-report/tsup.config.ts @@ -1,7 +1,7 @@ import { defineConfig } from "tsup"; export default defineConfig((opts) => ({ - entry: ["ts/index.ts", "ts/gas-report.ts"], + entry: ["ts/exports/internal.ts", "ts/bin/gas-report.ts"], target: "esnext", format: ["esm"], sourcemap: true, diff --git a/packages/schema-type/gas-report.json b/packages/schema-type/gas-report.json index 79ce1f0213..33a4bdf04e 100644 --- a/packages/schema-type/gas-report.json +++ b/packages/schema-type/gas-report.json @@ -1,108 +1,108 @@ [ { - "file": "test/solidity/SchemaType.t.sol", + "file": "test/solidity/SchemaType.t.sol:SchemaTypeTest", "test": "testGas", "name": "getStaticByteLength: uint8", "gasUsed": 124 }, { - "file": "test/solidity/SchemaType.t.sol", + "file": "test/solidity/SchemaType.t.sol:SchemaTypeTest", "test": "testGas", "name": "getStaticByteLength: uint32", "gasUsed": 123 }, { - "file": "test/solidity/SchemaType.t.sol", + "file": "test/solidity/SchemaType.t.sol:SchemaTypeTest", "test": "testGas", "name": "getStaticByteLength: uint256", "gasUsed": 123 }, { - "file": "test/solidity/SchemaType.t.sol", + "file": "test/solidity/SchemaType.t.sol:SchemaTypeTest", "test": "testGas", "name": "getStaticByteLength: int8", "gasUsed": 123 }, { - "file": "test/solidity/SchemaType.t.sol", + "file": "test/solidity/SchemaType.t.sol:SchemaTypeTest", "test": "testGas", "name": "getStaticByteLength: int32", "gasUsed": 123 }, { - "file": "test/solidity/SchemaType.t.sol", + "file": "test/solidity/SchemaType.t.sol:SchemaTypeTest", "test": "testGas", "name": "getStaticByteLength: int256", "gasUsed": 123 }, { - "file": "test/solidity/SchemaType.t.sol", + "file": "test/solidity/SchemaType.t.sol:SchemaTypeTest", "test": "testGas", "name": "getStaticByteLength: bytes1", "gasUsed": 123 }, { - "file": "test/solidity/SchemaType.t.sol", + "file": "test/solidity/SchemaType.t.sol:SchemaTypeTest", "test": "testGas", "name": "getStaticByteLength: bytes4", "gasUsed": 123 }, { - "file": "test/solidity/SchemaType.t.sol", + "file": "test/solidity/SchemaType.t.sol:SchemaTypeTest", "test": "testGas", "name": "getStaticByteLength: bytes32", "gasUsed": 123 }, { - "file": "test/solidity/SchemaType.t.sol", + "file": "test/solidity/SchemaType.t.sol:SchemaTypeTest", "test": "testGas", "name": "getStaticByteLength: bool", "gasUsed": 123 }, { - "file": "test/solidity/SchemaType.t.sol", + "file": "test/solidity/SchemaType.t.sol:SchemaTypeTest", "test": "testGas", "name": "getStaticByteLength: address", "gasUsed": 165 }, { - "file": "test/solidity/SchemaType.t.sol", + "file": "test/solidity/SchemaType.t.sol:SchemaTypeTest", "test": "testGas", "name": "getStaticByteLength: uint8[]", "gasUsed": 166 }, { - "file": "test/solidity/SchemaType.t.sol", + "file": "test/solidity/SchemaType.t.sol:SchemaTypeTest", "test": "testGas", "name": "getStaticByteLength: uint32[]", "gasUsed": 166 }, { - "file": "test/solidity/SchemaType.t.sol", + "file": "test/solidity/SchemaType.t.sol:SchemaTypeTest", "test": "testGas", "name": "getStaticByteLength: uint256[]", "gasUsed": 166 }, { - "file": "test/solidity/SchemaType.t.sol", + "file": "test/solidity/SchemaType.t.sol:SchemaTypeTest", "test": "testGas", "name": "getStaticByteLength: int256[]", "gasUsed": 166 }, { - "file": "test/solidity/SchemaType.t.sol", + "file": "test/solidity/SchemaType.t.sol:SchemaTypeTest", "test": "testGas", "name": "getStaticByteLength: bytes32[]", "gasUsed": 166 }, { - "file": "test/solidity/SchemaType.t.sol", + "file": "test/solidity/SchemaType.t.sol:SchemaTypeTest", "test": "testGas", "name": "getStaticByteLength: bytes", "gasUsed": 166 }, { - "file": "test/solidity/SchemaType.t.sol", + "file": "test/solidity/SchemaType.t.sol:SchemaTypeTest", "test": "testGas", "name": "getStaticByteLength: string", "gasUsed": 166 diff --git a/packages/store/gas-report.json b/packages/store/gas-report.json index b3b2ab23e7..2d5d001dac 100644 --- a/packages/store/gas-report.json +++ b/packages/store/gas-report.json @@ -1,1128 +1,1128 @@ [ { - "file": "test/Bytes.t.sol", + "file": "test/Bytes.t.sol:BytesTest", "test": "testGetBytes3", "name": "get bytes3 with offset 1", "gasUsed": 13 }, { - "file": "test/Bytes.t.sol", + "file": "test/Bytes.t.sol:BytesTest", "test": "testGetBytes32", "name": "get bytes32 with offset 10", "gasUsed": 13 }, { - "file": "test/Bytes.t.sol", + "file": "test/Bytes.t.sol:BytesTest", "test": "testSetBytes4Memory", "name": "set bytes4 in bytes memory", "gasUsed": 37 }, { - "file": "test/Callbacks.t.sol", + "file": "test/Callbacks.t.sol:CallbacksTest", "test": "testSetAndGet", "name": "Callbacks: set field", "gasUsed": 56118 }, { - "file": "test/Callbacks.t.sol", + "file": "test/Callbacks.t.sol:CallbacksTest", "test": "testSetAndGet", "name": "Callbacks: get field (warm)", "gasUsed": 2616 }, { - "file": "test/Callbacks.t.sol", + "file": "test/Callbacks.t.sol:CallbacksTest", "test": "testSetAndGet", "name": "Callbacks: push 1 element", "gasUsed": 32402 }, { - "file": "test/EncodedLengths.t.sol", + "file": "test/EncodedLengths.t.sol:EncodedLengthsTest", "test": "testAtIndex", "name": "get value at index of EncodedLengths", "gasUsed": 24 }, { - "file": "test/EncodedLengths.t.sol", + "file": "test/EncodedLengths.t.sol:EncodedLengthsTest", "test": "testGas", "name": "pack 1 length into EncodedLengths", "gasUsed": 35 }, { - "file": "test/EncodedLengths.t.sol", + "file": "test/EncodedLengths.t.sol:EncodedLengthsTest", "test": "testGas", "name": "pack 4 lengths into EncodedLengths", "gasUsed": 169 }, { - "file": "test/EncodedLengths.t.sol", + "file": "test/EncodedLengths.t.sol:EncodedLengthsTest", "test": "testGas", "name": "get total of EncodedLengths", "gasUsed": 15 }, { - "file": "test/EncodedLengths.t.sol", + "file": "test/EncodedLengths.t.sol:EncodedLengthsTest", "test": "testSetAtIndex", "name": "set value at index of EncodedLengths", "gasUsed": 283 }, { - "file": "test/FieldLayout.t.sol", + "file": "test/FieldLayout.t.sol:FieldLayoutTest", "test": "testEncodeDecodeFieldLayout", "name": "initialize field layout array with 5 entries", "gasUsed": 439 }, { - "file": "test/FieldLayout.t.sol", + "file": "test/FieldLayout.t.sol:FieldLayoutTest", "test": "testEncodeDecodeFieldLayout", "name": "encode field layout with 5+1 entries", "gasUsed": 2440 }, { - "file": "test/FieldLayout.t.sol", + "file": "test/FieldLayout.t.sol:FieldLayoutTest", "test": "testEncodeDecodeFieldLayout", "name": "get static byte length at index", "gasUsed": 19 }, { - "file": "test/FieldLayout.t.sol", + "file": "test/FieldLayout.t.sol:FieldLayoutTest", "test": "testGetNumDynamicFields", "name": "get number of dynamic fields from field layout", "gasUsed": 389 }, { - "file": "test/FieldLayout.t.sol", + "file": "test/FieldLayout.t.sol:FieldLayoutTest", "test": "testGetNumFields", "name": "get number of all fields from field layout", "gasUsed": 34 }, { - "file": "test/FieldLayout.t.sol", + "file": "test/FieldLayout.t.sol:FieldLayoutTest", "test": "testGetNumStaticFields", "name": "get number of static fields from field layout", "gasUsed": 311 }, { - "file": "test/FieldLayout.t.sol", + "file": "test/FieldLayout.t.sol:FieldLayoutTest", "test": "testGetStaticFieldLayoutLength", "name": "get static data length from field layout", "gasUsed": 228 }, { - "file": "test/FieldLayout.t.sol", + "file": "test/FieldLayout.t.sol:FieldLayoutTest", "test": "testIsEmptyFalse", "name": "check if field layout is empty (non-empty field layout)", "gasUsed": 7 }, { - "file": "test/FieldLayout.t.sol", + "file": "test/FieldLayout.t.sol:FieldLayoutTest", "test": "testIsEmptyTrue", "name": "check if field layout is empty (empty field layout)", "gasUsed": 7 }, { - "file": "test/FieldLayout.t.sol", + "file": "test/FieldLayout.t.sol:FieldLayoutTest", "test": "testValidate", "name": "validate field layout", "gasUsed": 6570 }, { - "file": "test/Gas.t.sol", + "file": "test/Gas.t.sol:GasTest", "test": "testCompareAbiEncodeVsCustom", "name": "abi encode (static)", "gasUsed": 133 }, { - "file": "test/Gas.t.sol", + "file": "test/Gas.t.sol:GasTest", "test": "testCompareAbiEncodeVsCustom", "name": "abi encode (dynamic)", "gasUsed": 824 }, { - "file": "test/Gas.t.sol", + "file": "test/Gas.t.sol:GasTest", "test": "testCompareAbiEncodeVsCustom", "name": "abi encode", "gasUsed": 918 }, { - "file": "test/Gas.t.sol", + "file": "test/Gas.t.sol:GasTest", "test": "testCompareAbiEncodeVsCustom", "name": "abi decode", "gasUsed": 1716 }, { - "file": "test/Gas.t.sol", + "file": "test/Gas.t.sol:GasTest", "test": "testCompareAbiEncodeVsCustom", "name": "custom encode (static)", "gasUsed": 191 }, { - "file": "test/Gas.t.sol", + "file": "test/Gas.t.sol:GasTest", "test": "testCompareAbiEncodeVsCustom", "name": "custom encode (length)", "gasUsed": 141 }, { - "file": "test/Gas.t.sol", + "file": "test/Gas.t.sol:GasTest", "test": "testCompareAbiEncodeVsCustom", "name": "custom encode (dynamic)", "gasUsed": 1101 }, { - "file": "test/Gas.t.sol", + "file": "test/Gas.t.sol:GasTest", "test": "testCompareAbiEncodeVsCustom", "name": "custom encode", "gasUsed": 1520 }, { - "file": "test/Gas.t.sol", + "file": "test/Gas.t.sol:GasTest", "test": "testCompareAbiEncodeVsCustom", "name": "custom decode", "gasUsed": 1954 }, { - "file": "test/Gas.t.sol", + "file": "test/Gas.t.sol:GasTest", "test": "testCompareAbiEncodeVsCustom", "name": "pass abi encoded bytes to external contract", "gasUsed": 29493 }, { - "file": "test/Gas.t.sol", + "file": "test/Gas.t.sol:GasTest", "test": "testCompareAbiEncodeVsCustom", "name": "pass custom encoded bytes to external contract", "gasUsed": 23310 }, { - "file": "test/Gas.t.sol", + "file": "test/Gas.t.sol:GasTest", "test": "testCompareStorageWriteMUD", "name": "MUD storage write (cold, 1 word)", "gasUsed": 22354 }, { - "file": "test/Gas.t.sol", + "file": "test/Gas.t.sol:GasTest", "test": "testCompareStorageWriteMUD", "name": "MUD storage write (cold, 1 word, partial)", "gasUsed": 22421 }, { - "file": "test/Gas.t.sol", + "file": "test/Gas.t.sol:GasTest", "test": "testCompareStorageWriteMUD", "name": "MUD storage write (cold, 10 words)", "gasUsed": 199810 }, { - "file": "test/Gas.t.sol", + "file": "test/Gas.t.sol:GasTest", "test": "testCompareStorageWriteMUD", "name": "MUD storage write (warm, 1 word)", "gasUsed": 354 }, { - "file": "test/Gas.t.sol", + "file": "test/Gas.t.sol:GasTest", "test": "testCompareStorageWriteMUD", "name": "MUD storage write (warm, 1 word, partial)", "gasUsed": 521 }, { - "file": "test/Gas.t.sol", + "file": "test/Gas.t.sol:GasTest", "test": "testCompareStorageWriteMUD", "name": "MUD storage write (warm, 10 words)", "gasUsed": 1810 }, { - "file": "test/Gas.t.sol", + "file": "test/Gas.t.sol:GasTest", "test": "testCompareStorageWriteSolidity", "name": "solidity storage write (cold, 1 word)", "gasUsed": 22107 }, { - "file": "test/Gas.t.sol", + "file": "test/Gas.t.sol:GasTest", "test": "testCompareStorageWriteSolidity", "name": "solidity storage write (cold, 1 word, partial)", "gasUsed": 22136 }, { - "file": "test/Gas.t.sol", + "file": "test/Gas.t.sol:GasTest", "test": "testCompareStorageWriteSolidity", "name": "solidity storage write (cold, 10 words)", "gasUsed": 200020 }, { - "file": "test/Gas.t.sol", + "file": "test/Gas.t.sol:GasTest", "test": "testCompareStorageWriteSolidity", "name": "solidity storage write (warm, 1 word)", "gasUsed": 107 }, { - "file": "test/Gas.t.sol", + "file": "test/Gas.t.sol:GasTest", "test": "testCompareStorageWriteSolidity", "name": "solidity storage write (warm, 1 word, partial)", "gasUsed": 236 }, { - "file": "test/Gas.t.sol", + "file": "test/Gas.t.sol:GasTest", "test": "testCompareStorageWriteSolidity", "name": "solidity storage write (warm, 10 words)", "gasUsed": 2265 }, { - "file": "test/GasStorageLoad.t.sol", + "file": "test/GasStorageLoad.t.sol:GasStorageLoadTest", "test": "testCompareStorageLoadMUD", "name": "MUD storage load (cold, 1 word)", "gasUsed": 2411 }, { - "file": "test/GasStorageLoad.t.sol", + "file": "test/GasStorageLoad.t.sol:GasStorageLoadTest", "test": "testCompareStorageLoadMUD", "name": "MUD storage load (cold, 1 word, partial)", "gasUsed": 2481 }, { - "file": "test/GasStorageLoad.t.sol", + "file": "test/GasStorageLoad.t.sol:GasStorageLoadTest", "test": "testCompareStorageLoadMUD", "name": "MUD storage load (cold, 10 words)", "gasUsed": 19911 }, { - "file": "test/GasStorageLoad.t.sol", + "file": "test/GasStorageLoad.t.sol:GasStorageLoadTest", "test": "testCompareStorageLoadMUD", "name": "MUD storage load (warm, 1 word)", "gasUsed": 412 }, { - "file": "test/GasStorageLoad.t.sol", + "file": "test/GasStorageLoad.t.sol:GasStorageLoadTest", "test": "testCompareStorageLoadMUD", "name": "MUD storage load field (warm, 1 word)", "gasUsed": 2300 }, { - "file": "test/GasStorageLoad.t.sol", + "file": "test/GasStorageLoad.t.sol:GasStorageLoadTest", "test": "testCompareStorageLoadMUD", "name": "MUD storage load (warm, 1 word, partial)", "gasUsed": 481 }, { - "file": "test/GasStorageLoad.t.sol", + "file": "test/GasStorageLoad.t.sol:GasStorageLoadTest", "test": "testCompareStorageLoadMUD", "name": "MUD storage load field (warm, 1 word, partial)", "gasUsed": 300 }, { - "file": "test/GasStorageLoad.t.sol", + "file": "test/GasStorageLoad.t.sol:GasStorageLoadTest", "test": "testCompareStorageLoadMUD", "name": "MUD storage load (warm, 10 words)", "gasUsed": 1916 }, { - "file": "test/GasStorageLoad.t.sol", + "file": "test/GasStorageLoad.t.sol:GasStorageLoadTest", "test": "testCompareStorageLoadSolidity", "name": "solidity storage load (cold, 1 word)", "gasUsed": 2109 }, { - "file": "test/GasStorageLoad.t.sol", + "file": "test/GasStorageLoad.t.sol:GasStorageLoadTest", "test": "testCompareStorageLoadSolidity", "name": "solidity storage load (cold, 1 word, partial)", "gasUsed": 2126 }, { - "file": "test/GasStorageLoad.t.sol", + "file": "test/GasStorageLoad.t.sol:GasStorageLoadTest", "test": "testCompareStorageLoadSolidity", "name": "solidity storage load (cold, 10 words)", "gasUsed": 19894 }, { - "file": "test/GasStorageLoad.t.sol", + "file": "test/GasStorageLoad.t.sol:GasStorageLoadTest", "test": "testCompareStorageLoadSolidity", "name": "solidity storage load (warm, 1 word)", "gasUsed": 109 }, { - "file": "test/GasStorageLoad.t.sol", + "file": "test/GasStorageLoad.t.sol:GasStorageLoadTest", "test": "testCompareStorageLoadSolidity", "name": "solidity storage load (warm, 1 word, partial)", "gasUsed": 126 }, { - "file": "test/GasStorageLoad.t.sol", + "file": "test/GasStorageLoad.t.sol:GasStorageLoadTest", "test": "testCompareStorageLoadSolidity", "name": "solidity storage load (warm, 10 words)", "gasUsed": 1897 }, { - "file": "test/Hook.t.sol", + "file": "test/Hook.t.sol:HookTest", "test": "testIsEnabled", "name": "check if hook is enabled", "gasUsed": 108 }, { - "file": "test/KeyEncoding.t.sol", + "file": "test/KeyEncoding.t.sol:KeyEncodingTest", "test": "testRegisterAndGetFieldLayout", "name": "register KeyEncoding table", "gasUsed": 721008 }, { - "file": "test/Mixed.t.sol", + "file": "test/Mixed.t.sol:MixedTest", "test": "testCompareSolidity", "name": "store Mixed struct in storage (native solidity)", "gasUsed": 92007 }, { - "file": "test/Mixed.t.sol", + "file": "test/Mixed.t.sol:MixedTest", "test": "testDeleteExternalCold", "name": "delete record from Mixed (external, cold)", "gasUsed": 23515 }, { - "file": "test/Mixed.t.sol", + "file": "test/Mixed.t.sol:MixedTest", "test": "testDeleteInternalCold", "name": "delete record from Mixed (internal, cold)", "gasUsed": 18724 }, { - "file": "test/Mixed.t.sol", + "file": "test/Mixed.t.sol:MixedTest", "test": "testSetGetDeleteExternal", "name": "set record in Mixed (external, cold)", "gasUsed": 107665 }, { - "file": "test/Mixed.t.sol", + "file": "test/Mixed.t.sol:MixedTest", "test": "testSetGetDeleteExternal", "name": "get record from Mixed (external, warm)", "gasUsed": 6746 }, { - "file": "test/Mixed.t.sol", + "file": "test/Mixed.t.sol:MixedTest", "test": "testSetGetDeleteExternal", "name": "delete record from Mixed (external, warm)", "gasUsed": 7826 }, { - "file": "test/Mixed.t.sol", + "file": "test/Mixed.t.sol:MixedTest", "test": "testSetGetDeleteInternal", "name": "set record in Mixed (internal, cold)", "gasUsed": 102831 }, { - "file": "test/Mixed.t.sol", + "file": "test/Mixed.t.sol:MixedTest", "test": "testSetGetDeleteInternal", "name": "get record from Mixed (internal, warm)", "gasUsed": 6434 }, { - "file": "test/Mixed.t.sol", + "file": "test/Mixed.t.sol:MixedTest", "test": "testSetGetDeleteInternal", "name": "delete record from Mixed (internal, warm)", "gasUsed": 7033 }, { - "file": "test/ResourceId.t.sol", + "file": "test/ResourceId.t.sol:ResourceIdTest", "test": "testEncode", "name": "encode table ID with name and type", "gasUsed": 80 }, { - "file": "test/ResourceId.t.sol", + "file": "test/ResourceId.t.sol:ResourceIdTest", "test": "testGetType", "name": "get type from a table ID", "gasUsed": 4 }, { - "file": "test/Schema.t.sol", + "file": "test/Schema.t.sol:SchemaTest", "test": "testEncodeDecodeSchema", "name": "initialize schema array with 6 entries", "gasUsed": 856 }, { - "file": "test/Schema.t.sol", + "file": "test/Schema.t.sol:SchemaTest", "test": "testEncodeDecodeSchema", "name": "encode schema with 6 entries", "gasUsed": 3609 }, { - "file": "test/Schema.t.sol", + "file": "test/Schema.t.sol:SchemaTest", "test": "testEncodeDecodeSchema", "name": "get schema type at index", "gasUsed": 119 }, { - "file": "test/Schema.t.sol", + "file": "test/Schema.t.sol:SchemaTest", "test": "testGetNumDynamicFields", "name": "get number of dynamic fields from schema", "gasUsed": 389 }, { - "file": "test/Schema.t.sol", + "file": "test/Schema.t.sol:SchemaTest", "test": "testGetNumFields", "name": "get number of all fields from schema", "gasUsed": 34 }, { - "file": "test/Schema.t.sol", + "file": "test/Schema.t.sol:SchemaTest", "test": "testGetNumStaticFields", "name": "get number of static fields from schema", "gasUsed": 311 }, { - "file": "test/Schema.t.sol", + "file": "test/Schema.t.sol:SchemaTest", "test": "testGetStaticSchemaLength", "name": "get static data length from schema", "gasUsed": 228 }, { - "file": "test/Schema.t.sol", + "file": "test/Schema.t.sol:SchemaTest", "test": "testIsEmptyFalse", "name": "check if schema is empty (non-empty schema)", "gasUsed": 7 }, { - "file": "test/Schema.t.sol", + "file": "test/Schema.t.sol:SchemaTest", "test": "testIsEmptyTrue", "name": "check if schema is empty (empty schema)", "gasUsed": 7 }, { - "file": "test/Schema.t.sol", + "file": "test/Schema.t.sol:SchemaTest", "test": "testValidate", "name": "validate schema", "gasUsed": 12485 }, { - "file": "test/Slice.t.sol", + "file": "test/Slice.t.sol:SliceTest", "test": "testFromBytes", "name": "make Slice from bytes", "gasUsed": 31 }, { - "file": "test/Slice.t.sol", + "file": "test/Slice.t.sol:SliceTest", "test": "testFromBytes", "name": "get Slice length", "gasUsed": 10 }, { - "file": "test/Slice.t.sol", + "file": "test/Slice.t.sol:SliceTest", "test": "testFromBytes", "name": "get Slice pointer", "gasUsed": 33 }, { - "file": "test/Slice.t.sol", + "file": "test/Slice.t.sol:SliceTest", "test": "testSubslice", "name": "subslice bytes (no copy) [1:4]", "gasUsed": 318 }, { - "file": "test/Slice.t.sol", + "file": "test/Slice.t.sol:SliceTest", "test": "testSubslice", "name": "subslice bytes (no copy) [4:37]", "gasUsed": 318 }, { - "file": "test/Slice.t.sol", + "file": "test/Slice.t.sol:SliceTest", "test": "testToBytes", "name": "Slice (0 bytes) to bytes memory", "gasUsed": 298 }, { - "file": "test/Slice.t.sol", + "file": "test/Slice.t.sol:SliceTest", "test": "testToBytes", "name": "Slice (2 bytes) to bytes memory", "gasUsed": 531 }, { - "file": "test/Slice.t.sol", + "file": "test/Slice.t.sol:SliceTest", "test": "testToBytes", "name": "Slice (32 bytes) to bytes memory", "gasUsed": 545 }, { - "file": "test/Slice.t.sol", + "file": "test/Slice.t.sol:SliceTest", "test": "testToBytes", "name": "Slice (34 bytes) to bytes memory", "gasUsed": 747 }, { - "file": "test/Slice.t.sol", + "file": "test/Slice.t.sol:SliceTest", "test": "testToBytes", "name": "Slice (1024 bytes) to bytes memory", "gasUsed": 7264 }, { - "file": "test/Slice.t.sol", + "file": "test/Slice.t.sol:SliceTest", "test": "testToBytes", "name": "Slice (1024x1024 bytes) to bytes memory", "gasUsed": 9205065 }, { - "file": "test/Slice.t.sol", + "file": "test/Slice.t.sol:SliceTest", "test": "testToBytes32", "name": "Slice to bytes32", "gasUsed": 81 }, { - "file": "test/Storage.t.sol", + "file": "test/Storage.t.sol:StorageTest", "test": "testStoreLoad", "name": "store 1 storage slot", "gasUsed": 22354 }, { - "file": "test/Storage.t.sol", + "file": "test/Storage.t.sol:StorageTest", "test": "testStoreLoad", "name": "store 34 bytes over 3 storage slots (with offset and safeTrail))", "gasUsed": 23025 }, { - "file": "test/Storage.t.sol", + "file": "test/Storage.t.sol:StorageTest", "test": "testStoreLoad", "name": "load 34 bytes over 3 storage slots (with offset and safeTrail))", "gasUsed": 871 }, { - "file": "test/StoreCoreDynamic.t.sol", + "file": "test/StoreCoreDynamic.t.sol:StoreCoreDynamicTest", "test": "testGetDynamicFieldSlice", "name": "get field slice (cold, 1 slot)", "gasUsed": 5566 }, { - "file": "test/StoreCoreDynamic.t.sol", + "file": "test/StoreCoreDynamic.t.sol:StoreCoreDynamicTest", "test": "testGetDynamicFieldSlice", "name": "get field slice (warm, 1 slot)", "gasUsed": 1668 }, { - "file": "test/StoreCoreDynamic.t.sol", + "file": "test/StoreCoreDynamic.t.sol:StoreCoreDynamicTest", "test": "testGetDynamicFieldSlice", "name": "get field slice (semi-cold, 1 slot)", "gasUsed": 3661 }, { - "file": "test/StoreCoreDynamic.t.sol", + "file": "test/StoreCoreDynamic.t.sol:StoreCoreDynamicTest", "test": "testGetDynamicFieldSlice", "name": "get field slice (warm, 2 slots)", "gasUsed": 3885 }, { - "file": "test/StoreCoreDynamic.t.sol", + "file": "test/StoreCoreDynamic.t.sol:StoreCoreDynamicTest", "test": "testGetSecondFieldLength", "name": "get field length (cold, 1 slot)", "gasUsed": 3163 }, { - "file": "test/StoreCoreDynamic.t.sol", + "file": "test/StoreCoreDynamic.t.sol:StoreCoreDynamicTest", "test": "testGetSecondFieldLength", "name": "get field length (warm, 1 slot)", "gasUsed": 1161 }, { - "file": "test/StoreCoreDynamic.t.sol", + "file": "test/StoreCoreDynamic.t.sol:StoreCoreDynamicTest", "test": "testGetThirdFieldLength", "name": "get field length (warm due to , 2 slots)", "gasUsed": 3164 }, { - "file": "test/StoreCoreDynamic.t.sol", + "file": "test/StoreCoreDynamic.t.sol:StoreCoreDynamicTest", "test": "testGetThirdFieldLength", "name": "get field length (warm, 2 slots)", "gasUsed": 1160 }, { - "file": "test/StoreCoreDynamic.t.sol", + "file": "test/StoreCoreDynamic.t.sol:StoreCoreDynamicTest", "test": "testPopFromSecondField", "name": "pop from field (cold, 1 slot, 1 uint32 item)", "gasUsed": 18107 }, { - "file": "test/StoreCoreDynamic.t.sol", + "file": "test/StoreCoreDynamic.t.sol:StoreCoreDynamicTest", "test": "testPopFromSecondField", "name": "pop from field (warm, 1 slot, 1 uint32 item)", "gasUsed": 12114 }, { - "file": "test/StoreCoreDynamic.t.sol", + "file": "test/StoreCoreDynamic.t.sol:StoreCoreDynamicTest", "test": "testPopFromThirdField", "name": "pop from field (cold, 2 slots, 10 uint32 items)", "gasUsed": 15876 }, { - "file": "test/StoreCoreDynamic.t.sol", + "file": "test/StoreCoreDynamic.t.sol:StoreCoreDynamicTest", "test": "testPopFromThirdField", "name": "pop from field (warm, 2 slots, 10 uint32 items)", "gasUsed": 11883 }, { - "file": "test/StoreCoreGas.t.sol", + "file": "test/StoreCoreGas.t.sol:StoreCoreGasTest", "test": "testAccessEmptyData", "name": "access non-existing record", "gasUsed": 7073 }, { - "file": "test/StoreCoreGas.t.sol", + "file": "test/StoreCoreGas.t.sol:StoreCoreGasTest", "test": "testAccessEmptyData", "name": "access static field of non-existing record", "gasUsed": 1330 }, { - "file": "test/StoreCoreGas.t.sol", + "file": "test/StoreCoreGas.t.sol:StoreCoreGasTest", "test": "testAccessEmptyData", "name": "access dynamic field of non-existing record", "gasUsed": 2062 }, { - "file": "test/StoreCoreGas.t.sol", + "file": "test/StoreCoreGas.t.sol:StoreCoreGasTest", "test": "testAccessEmptyData", "name": "access length of dynamic field of non-existing record", "gasUsed": 1159 }, { - "file": "test/StoreCoreGas.t.sol", + "file": "test/StoreCoreGas.t.sol:StoreCoreGasTest", "test": "testDeleteData", "name": "delete record (complex data, 3 slots)", "gasUsed": 7373 }, { - "file": "test/StoreCoreGas.t.sol", + "file": "test/StoreCoreGas.t.sol:StoreCoreGasTest", "test": "testDeleteDataOffchainTable", "name": "StoreCore: delete record in offchain table", "gasUsed": 28225 }, { - "file": "test/StoreCoreGas.t.sol", + "file": "test/StoreCoreGas.t.sol:StoreCoreGasTest", "test": "testGetStaticDataLocation", "name": "get static data location (single key)", "gasUsed": 217 }, { - "file": "test/StoreCoreGas.t.sol", + "file": "test/StoreCoreGas.t.sol:StoreCoreGasTest", "test": "testGetStaticDataLocation", "name": "get static data location (single key tuple)", "gasUsed": 387 }, { - "file": "test/StoreCoreGas.t.sol", + "file": "test/StoreCoreGas.t.sol:StoreCoreGasTest", "test": "testHasFieldLayout", "name": "Check for existence of table (existent)", "gasUsed": 1032 }, { - "file": "test/StoreCoreGas.t.sol", + "file": "test/StoreCoreGas.t.sol:StoreCoreGasTest", "test": "testHasFieldLayout", "name": "check for existence of table (non-existent)", "gasUsed": 3033 }, { - "file": "test/StoreCoreGas.t.sol", + "file": "test/StoreCoreGas.t.sol:StoreCoreGasTest", "test": "testHooks", "name": "register subscriber", "gasUsed": 56589 }, { - "file": "test/StoreCoreGas.t.sol", + "file": "test/StoreCoreGas.t.sol:StoreCoreGasTest", "test": "testHooks", "name": "set record on table with subscriber", "gasUsed": 98286 }, { - "file": "test/StoreCoreGas.t.sol", + "file": "test/StoreCoreGas.t.sol:StoreCoreGasTest", "test": "testHooks", "name": "set static field on table with subscriber", "gasUsed": 52904 }, { - "file": "test/StoreCoreGas.t.sol", + "file": "test/StoreCoreGas.t.sol:StoreCoreGasTest", "test": "testHooks", "name": "delete record on table with subscriber", "gasUsed": 47489 }, { - "file": "test/StoreCoreGas.t.sol", + "file": "test/StoreCoreGas.t.sol:StoreCoreGasTest", "test": "testHooksDynamicData", "name": "register subscriber", "gasUsed": 56589 }, { - "file": "test/StoreCoreGas.t.sol", + "file": "test/StoreCoreGas.t.sol:StoreCoreGasTest", "test": "testHooksDynamicData", "name": "set (dynamic) record on table with subscriber", "gasUsed": 191643 }, { - "file": "test/StoreCoreGas.t.sol", + "file": "test/StoreCoreGas.t.sol:StoreCoreGasTest", "test": "testHooksDynamicData", "name": "set (dynamic) field on table with subscriber", "gasUsed": 60374 }, { - "file": "test/StoreCoreGas.t.sol", + "file": "test/StoreCoreGas.t.sol:StoreCoreGasTest", "test": "testHooksDynamicData", "name": "delete (dynamic) record on table with subscriber", "gasUsed": 49266 }, { - "file": "test/StoreCoreGas.t.sol", + "file": "test/StoreCoreGas.t.sol:StoreCoreGasTest", "test": "testPushToDynamicField", "name": "push to field (1 slot, 1 uint32 item)", "gasUsed": 9539 }, { - "file": "test/StoreCoreGas.t.sol", + "file": "test/StoreCoreGas.t.sol:StoreCoreGasTest", "test": "testPushToDynamicField", "name": "push to field (2 slots, 10 uint32 items)", "gasUsed": 32211 }, { - "file": "test/StoreCoreGas.t.sol", + "file": "test/StoreCoreGas.t.sol:StoreCoreGasTest", "test": "testRegisterAndGetFieldLayout", "name": "StoreCore: register table", "gasUsed": 651056 }, { - "file": "test/StoreCoreGas.t.sol", + "file": "test/StoreCoreGas.t.sol:StoreCoreGasTest", "test": "testRegisterAndGetFieldLayout", "name": "StoreCore: get field layout (warm)", "gasUsed": 509 }, { - "file": "test/StoreCoreGas.t.sol", + "file": "test/StoreCoreGas.t.sol:StoreCoreGasTest", "test": "testRegisterAndGetFieldLayout", "name": "StoreCore: get value schema (warm)", "gasUsed": 1441 }, { - "file": "test/StoreCoreGas.t.sol", + "file": "test/StoreCoreGas.t.sol:StoreCoreGasTest", "test": "testRegisterAndGetFieldLayout", "name": "StoreCore: get key schema (warm)", "gasUsed": 2313 }, { - "file": "test/StoreCoreGas.t.sol", + "file": "test/StoreCoreGas.t.sol:StoreCoreGasTest", "test": "testSetAndGetDynamicData", "name": "set complex record with dynamic data (4 slots)", "gasUsed": 101867 }, { - "file": "test/StoreCoreGas.t.sol", + "file": "test/StoreCoreGas.t.sol:StoreCoreGasTest", "test": "testSetAndGetDynamicData", "name": "get complex record with dynamic data (4 slots)", "gasUsed": 4234 }, { - "file": "test/StoreCoreGas.t.sol", + "file": "test/StoreCoreGas.t.sol:StoreCoreGasTest", "test": "testSetAndGetDynamicData", "name": "compare: Set complex record with dynamic data using native solidity", "gasUsed": 116845 }, { - "file": "test/StoreCoreGas.t.sol", + "file": "test/StoreCoreGas.t.sol:StoreCoreGasTest", "test": "testSetAndGetDynamicData", "name": "compare: Set complex record with dynamic data using abi.encode", "gasUsed": 267535 }, { - "file": "test/StoreCoreGas.t.sol", + "file": "test/StoreCoreGas.t.sol:StoreCoreGasTest", "test": "testSetAndGetDynamicDataLength", "name": "set dynamic length of dynamic index 0", "gasUsed": 22867 }, { - "file": "test/StoreCoreGas.t.sol", + "file": "test/StoreCoreGas.t.sol:StoreCoreGasTest", "test": "testSetAndGetDynamicDataLength", "name": "set dynamic length of dynamic index 1", "gasUsed": 968 }, { - "file": "test/StoreCoreGas.t.sol", + "file": "test/StoreCoreGas.t.sol:StoreCoreGasTest", "test": "testSetAndGetDynamicDataLength", "name": "reduce dynamic length of dynamic index 0", "gasUsed": 958 }, { - "file": "test/StoreCoreGas.t.sol", + "file": "test/StoreCoreGas.t.sol:StoreCoreGasTest", "test": "testSetAndGetField", "name": "set static field (1 slot)", "gasUsed": 31026 }, { - "file": "test/StoreCoreGas.t.sol", + "file": "test/StoreCoreGas.t.sol:StoreCoreGasTest", "test": "testSetAndGetField", "name": "get static field (1 slot)", "gasUsed": 1331 }, { - "file": "test/StoreCoreGas.t.sol", + "file": "test/StoreCoreGas.t.sol:StoreCoreGasTest", "test": "testSetAndGetField", "name": "set static field (overlap 2 slot)", "gasUsed": 29609 }, { - "file": "test/StoreCoreGas.t.sol", + "file": "test/StoreCoreGas.t.sol:StoreCoreGasTest", "test": "testSetAndGetField", "name": "get static field (overlap 2 slot)", "gasUsed": 1812 }, { - "file": "test/StoreCoreGas.t.sol", + "file": "test/StoreCoreGas.t.sol:StoreCoreGasTest", "test": "testSetAndGetField", "name": "set dynamic field (1 slot, first dynamic field)", "gasUsed": 54022 }, { - "file": "test/StoreCoreGas.t.sol", + "file": "test/StoreCoreGas.t.sol:StoreCoreGasTest", "test": "testSetAndGetField", "name": "get dynamic field (1 slot, first dynamic field)", "gasUsed": 2227 }, { - "file": "test/StoreCoreGas.t.sol", + "file": "test/StoreCoreGas.t.sol:StoreCoreGasTest", "test": "testSetAndGetField", "name": "set dynamic field (1 slot, second dynamic field)", "gasUsed": 32247 }, { - "file": "test/StoreCoreGas.t.sol", + "file": "test/StoreCoreGas.t.sol:StoreCoreGasTest", "test": "testSetAndGetField", "name": "get dynamic field (1 slot, second dynamic field)", "gasUsed": 2229 }, { - "file": "test/StoreCoreGas.t.sol", + "file": "test/StoreCoreGas.t.sol:StoreCoreGasTest", "test": "testSetAndGetStaticData", "name": "set static record (1 slot)", "gasUsed": 32142 }, { - "file": "test/StoreCoreGas.t.sol", + "file": "test/StoreCoreGas.t.sol:StoreCoreGasTest", "test": "testSetAndGetStaticData", "name": "get static record (1 slot)", "gasUsed": 1552 }, { - "file": "test/StoreCoreGas.t.sol", + "file": "test/StoreCoreGas.t.sol:StoreCoreGasTest", "test": "testSetAndGetStaticDataSpanningWords", "name": "set static record (2 slots)", "gasUsed": 54650 }, { - "file": "test/StoreCoreGas.t.sol", + "file": "test/StoreCoreGas.t.sol:StoreCoreGasTest", "test": "testSetAndGetStaticDataSpanningWords", "name": "get static record (2 slots)", "gasUsed": 1737 }, { - "file": "test/StoreCoreGas.t.sol", + "file": "test/StoreCoreGas.t.sol:StoreCoreGasTest", "test": "testSetDataOffchainTable", "name": "StoreCore: set record in offchain table", "gasUsed": 32517 }, { - "file": "test/StoreCoreGas.t.sol", + "file": "test/StoreCoreGas.t.sol:StoreCoreGasTest", "test": "testUpdateInDynamicField", "name": "update in field (1 slot, 1 uint32 item)", "gasUsed": 8899 }, { - "file": "test/StoreCoreGas.t.sol", + "file": "test/StoreCoreGas.t.sol:StoreCoreGasTest", "test": "testUpdateInDynamicField", "name": "push to field (2 slots, 6 uint64 items)", "gasUsed": 9342 }, { - "file": "test/StoreHook.t.sol", + "file": "test/StoreHook.t.sol:StoreHookTest", "test": "testCallHook", "name": "call an enabled hook", "gasUsed": 37660 }, { - "file": "test/StoreHook.t.sol", + "file": "test/StoreHook.t.sol:StoreHookTest", "test": "testCallHook", "name": "call a disabled hook", "gasUsed": 123 }, { - "file": "test/StoreHook.t.sol", + "file": "test/StoreHook.t.sol:StoreHookTest", "test": "testGetAddress", "name": "get store hook address", "gasUsed": 1 }, { - "file": "test/StoreHook.t.sol", + "file": "test/StoreHook.t.sol:StoreHookTest", "test": "testIsEnabled", "name": "check if store hook is enabled", "gasUsed": 108 }, { - "file": "test/StoreHooks.t.sol", + "file": "test/StoreHooks.t.sol:StoreHooksTest", "test": "testOneSlot", "name": "StoreHooks: set field with one elements (cold)", "gasUsed": 58112 }, { - "file": "test/StoreHooks.t.sol", + "file": "test/StoreHooks.t.sol:StoreHooksTest", "test": "testTable", "name": "StoreHooks: set field (cold)", "gasUsed": 58112 }, { - "file": "test/StoreHooks.t.sol", + "file": "test/StoreHooks.t.sol:StoreHooksTest", "test": "testTable", "name": "StoreHooks: get field (warm)", "gasUsed": 2612 }, { - "file": "test/StoreHooks.t.sol", + "file": "test/StoreHooks.t.sol:StoreHooksTest", "test": "testTable", "name": "StoreHooks: push 1 element (cold)", "gasUsed": 12491 }, { - "file": "test/StoreHooks.t.sol", + "file": "test/StoreHooks.t.sol:StoreHooksTest", "test": "testTable", "name": "StoreHooks: pop 1 element (warm)", "gasUsed": 9795 }, { - "file": "test/StoreHooks.t.sol", + "file": "test/StoreHooks.t.sol:StoreHooksTest", "test": "testTable", "name": "StoreHooks: push 1 element (warm)", "gasUsed": 10507 }, { - "file": "test/StoreHooks.t.sol", + "file": "test/StoreHooks.t.sol:StoreHooksTest", "test": "testTable", "name": "StoreHooks: update 1 element (warm)", "gasUsed": 29741 }, { - "file": "test/StoreHooks.t.sol", + "file": "test/StoreHooks.t.sol:StoreHooksTest", "test": "testTable", "name": "StoreHooks: delete record (warm)", "gasUsed": 9552 }, { - "file": "test/StoreHooks.t.sol", + "file": "test/StoreHooks.t.sol:StoreHooksTest", "test": "testTable", "name": "StoreHooks: set field (warm)", "gasUsed": 30255 }, { - "file": "test/StoreHooks.t.sol", + "file": "test/StoreHooks.t.sol:StoreHooksTest", "test": "testThreeSlots", "name": "StoreHooks: set field with three elements (cold)", "gasUsed": 80803 }, { - "file": "test/StoreHooks.t.sol", + "file": "test/StoreHooks.t.sol:StoreHooksTest", "test": "testTwoSlots", "name": "StoreHooks: set field with two elements (cold)", "gasUsed": 80715 }, { - "file": "test/StoreHooksColdLoad.t.sol", + "file": "test/StoreHooksColdLoad.t.sol:StoreHooksColdLoadTest", "test": "testDelete", "name": "StoreHooks: delete record (cold)", "gasUsed": 18424 }, { - "file": "test/StoreHooksColdLoad.t.sol", + "file": "test/StoreHooksColdLoad.t.sol:StoreHooksColdLoadTest", "test": "testGet", "name": "StoreHooks: get field (cold)", "gasUsed": 8610 }, { - "file": "test/StoreHooksColdLoad.t.sol", + "file": "test/StoreHooksColdLoad.t.sol:StoreHooksColdLoadTest", "test": "testGetItem", "name": "StoreHooks: get 1 element (cold)", "gasUsed": 8224 }, { - "file": "test/StoreHooksColdLoad.t.sol", + "file": "test/StoreHooksColdLoad.t.sol:StoreHooksColdLoadTest", "test": "testLength", "name": "StoreHooks: get length (cold)", "gasUsed": 5172 }, { - "file": "test/StoreHooksColdLoad.t.sol", + "file": "test/StoreHooksColdLoad.t.sol:StoreHooksColdLoadTest", "test": "testPop", "name": "StoreHooks: pop 1 element (cold)", "gasUsed": 18231 }, { - "file": "test/StoreHooksColdLoad.t.sol", + "file": "test/StoreHooksColdLoad.t.sol:StoreHooksColdLoadTest", "test": "testUpdate", "name": "StoreHooks: update 1 element (cold)", "gasUsed": 20194 }, { - "file": "test/StoreSwitch.t.sol", + "file": "test/StoreSwitch.t.sol:StoreSwitchTest", "test": "testDelegatecall", "name": "get Store address", "gasUsed": 2170 }, { - "file": "test/StoreSwitch.t.sol", + "file": "test/StoreSwitch.t.sol:StoreSwitchTest", "test": "testNoDelegatecall", "name": "get Store address", "gasUsed": 2173 }, { - "file": "test/tightcoder/DecodeSlice.t.sol", + "file": "test/tightcoder/DecodeSlice.t.sol:DecodeSliceTest", "test": "testToArrayUint32", "name": "decode packed uint32[]", "gasUsed": 486 }, { - "file": "test/tightcoder/DecodeSlice.t.sol", + "file": "test/tightcoder/DecodeSlice.t.sol:DecodeSliceTest", "test": "testToBytes32Array", "name": "decode packed bytes32[]", "gasUsed": 475 }, { - "file": "test/tightcoder/EncodeArray.t.sol", + "file": "test/tightcoder/EncodeArray.t.sol:EncodeArrayTest", "test": "testEncodeUint16Array", "name": "encode packed uint16[]", "gasUsed": 594 }, { - "file": "test/tightcoder/EncodeArray.t.sol", + "file": "test/tightcoder/EncodeArray.t.sol:EncodeArrayTest", "test": "testEncodeUint32Array", "name": "encode packed uint32[]", "gasUsed": 503 }, { - "file": "test/tightcoder/EncodeArray.t.sol", + "file": "test/tightcoder/EncodeArray.t.sol:EncodeArrayTest", "test": "testEncodeUint8Array", "name": "encode packed uint8[]", "gasUsed": 492 }, { - "file": "test/tightcoder/TightCoder.t.sol", + "file": "test/tightcoder/TightCoder.t.sol:TightCoderTest", "test": "testFromAndToUint32Array", "name": "decode packed uint32[]", "gasUsed": 486 }, { - "file": "test/tightcoder/TightCoder.t.sol", + "file": "test/tightcoder/TightCoder.t.sol:TightCoderTest", "test": "testToAndFromBytes24Array", "name": "encode packed bytes24[]", "gasUsed": 503 }, { - "file": "test/tightcoder/TightCoder.t.sol", + "file": "test/tightcoder/TightCoder.t.sol:TightCoderTest", "test": "testToAndFromBytes24Array", "name": "decode packed bytes24[]", "gasUsed": 486 }, { - "file": "test/Vector2.t.sol", + "file": "test/Vector2.t.sol:Vector2Test", "test": "testRegisterAndGetFieldLayout", "name": "register Vector2 field layout", "gasUsed": 447063 }, { - "file": "test/Vector2.t.sol", + "file": "test/Vector2.t.sol:Vector2Test", "test": "testSetAndGet", "name": "set Vector2 record", "gasUsed": 32824 }, { - "file": "test/Vector2.t.sol", + "file": "test/Vector2.t.sol:Vector2Test", "test": "testSetAndGet", "name": "get Vector2 record", "gasUsed": 2306 diff --git a/packages/world-module-erc20/gas-report.json b/packages/world-module-erc20/gas-report.json index 4694a6acdf..8adb4db902 100644 --- a/packages/world-module-erc20/gas-report.json +++ b/packages/world-module-erc20/gas-report.json @@ -1,222 +1,222 @@ [ { - "file": "test/ERC20BaseTest.sol", + "file": "test/ERC20BaseTest.sol:ERC20WithInternalStoreTest", "test": "testApprove", "name": "internal_approve", "gasUsed": 58213 }, { - "file": "test/ERC20BaseTest.sol", + "file": "test/ERC20BaseTest.sol:ERC20WithInternalStoreTest", "test": "testBurn", "name": "internal_burn", "gasUsed": 56417 }, { - "file": "test/ERC20BaseTest.sol", + "file": "test/ERC20BaseTest.sol:ERC20WithInternalStoreTest", "test": "testMint", "name": "internal_mint", "gasUsed": 90703 }, { - "file": "test/ERC20BaseTest.sol", + "file": "test/ERC20BaseTest.sol:ERC20WithInternalStoreTest", "test": "testTransfer", "name": "internal_transfer", "gasUsed": 67747 }, { - "file": "test/ERC20BaseTest.sol", + "file": "test/ERC20BaseTest.sol:ERC20WithInternalStoreTest", "test": "testTransferFrom", "name": "internal_transferFrom", "gasUsed": 79574 }, { - "file": "test/ERC20BaseTest.sol", + "file": "test/ERC20BaseTest.sol:ERC20WithWorldTest", "test": "testApprove", "name": "world_approve", "gasUsed": 66343 }, { - "file": "test/ERC20BaseTest.sol", + "file": "test/ERC20BaseTest.sol:ERC20WithWorldTest", "test": "testBurn", "name": "world_burn", "gasUsed": 70873 }, { - "file": "test/ERC20BaseTest.sol", + "file": "test/ERC20BaseTest.sol:ERC20WithWorldTest", "test": "testMint", "name": "world_mint", "gasUsed": 105159 }, { - "file": "test/ERC20BaseTest.sol", + "file": "test/ERC20BaseTest.sol:ERC20WithWorldTest", "test": "testTransfer", "name": "world_transfer", "gasUsed": 82375 }, { - "file": "test/ERC20BaseTest.sol", + "file": "test/ERC20BaseTest.sol:ERC20WithWorldTest", "test": "testTransferFrom", "name": "world_transferFrom", "gasUsed": 99431 }, { - "file": "test/ERC20Burnable.t.sol", + "file": "test/ERC20Burnable.t.sol:ERC20BurnableWithInternalStoreTest", "test": "testApprove", "name": "internal_approve", "gasUsed": 58213 }, { - "file": "test/ERC20Burnable.t.sol", + "file": "test/ERC20Burnable.t.sol:ERC20BurnableWithInternalStoreTest", "test": "testBurn", "name": "internal_burn", "gasUsed": 56440 }, { - "file": "test/ERC20Burnable.t.sol", + "file": "test/ERC20Burnable.t.sol:ERC20BurnableWithInternalStoreTest", "test": "testBurnByAccount", "name": "internal_burn", "gasUsed": 56563 }, { - "file": "test/ERC20Burnable.t.sol", + "file": "test/ERC20Burnable.t.sol:ERC20BurnableWithInternalStoreTest", "test": "testMint", "name": "internal_mint", "gasUsed": 90703 }, { - "file": "test/ERC20Burnable.t.sol", + "file": "test/ERC20Burnable.t.sol:ERC20BurnableWithInternalStoreTest", "test": "testTransfer", "name": "internal_transfer", "gasUsed": 67702 }, { - "file": "test/ERC20Burnable.t.sol", + "file": "test/ERC20Burnable.t.sol:ERC20BurnableWithInternalStoreTest", "test": "testTransferFrom", "name": "internal_transferFrom", "gasUsed": 79574 }, { - "file": "test/ERC20Burnable.t.sol", + "file": "test/ERC20Burnable.t.sol:ERC20BurnableWithWorldTest", "test": "testApprove", "name": "world_approve", "gasUsed": 66343 }, { - "file": "test/ERC20Burnable.t.sol", + "file": "test/ERC20Burnable.t.sol:ERC20BurnableWithWorldTest", "test": "testBurn", "name": "world_burn", "gasUsed": 70874 }, { - "file": "test/ERC20Burnable.t.sol", + "file": "test/ERC20Burnable.t.sol:ERC20BurnableWithWorldTest", "test": "testBurnByAccount", "name": "world_burn", "gasUsed": 70997 }, { - "file": "test/ERC20Burnable.t.sol", + "file": "test/ERC20Burnable.t.sol:ERC20BurnableWithWorldTest", "test": "testMint", "name": "world_mint", "gasUsed": 105137 }, { - "file": "test/ERC20Burnable.t.sol", + "file": "test/ERC20Burnable.t.sol:ERC20BurnableWithWorldTest", "test": "testTransfer", "name": "world_transfer", "gasUsed": 82397 }, { - "file": "test/ERC20Burnable.t.sol", + "file": "test/ERC20Burnable.t.sol:ERC20BurnableWithWorldTest", "test": "testTransferFrom", "name": "world_transferFrom", "gasUsed": 99498 }, { - "file": "test/ERC20Module.t.sol", + "file": "test/ERC20Module.t.sol:ERC20ModuleTest", "test": "testInstall", "name": "install erc20 module", "gasUsed": 4524262 }, { - "file": "test/ERC20Pausable.t.sol", + "file": "test/ERC20Pausable.t.sol:ERC20PausableWithInternalStoreTest", "test": "testApprove", "name": "internal_approve", "gasUsed": 58213 }, { - "file": "test/ERC20Pausable.t.sol", + "file": "test/ERC20Pausable.t.sol:ERC20PausableWithInternalStoreTest", "test": "testBurn", "name": "internal_burn", "gasUsed": 59740 }, { - "file": "test/ERC20Pausable.t.sol", + "file": "test/ERC20Pausable.t.sol:ERC20PausableWithInternalStoreTest", "test": "testMint", "name": "internal_mint", "gasUsed": 94004 }, { - "file": "test/ERC20Pausable.t.sol", + "file": "test/ERC20Pausable.t.sol:ERC20PausableWithInternalStoreTest", "test": "testPause", "name": "internal_pause", "gasUsed": 56737 }, { - "file": "test/ERC20Pausable.t.sol", + "file": "test/ERC20Pausable.t.sol:ERC20PausableWithInternalStoreTest", "test": "testPause", "name": "internal_unpause", "gasUsed": 34845 }, { - "file": "test/ERC20Pausable.t.sol", + "file": "test/ERC20Pausable.t.sol:ERC20PausableWithInternalStoreTest", "test": "testTransfer", "name": "internal_transfer", "gasUsed": 71003 }, { - "file": "test/ERC20Pausable.t.sol", + "file": "test/ERC20Pausable.t.sol:ERC20PausableWithInternalStoreTest", "test": "testTransferFrom", "name": "internal_transferFrom", "gasUsed": 82876 }, { - "file": "test/ERC20Pausable.t.sol", + "file": "test/ERC20Pausable.t.sol:ERC20PausableWithWorldTest", "test": "testApprove", "name": "world_approve", "gasUsed": 66343 }, { - "file": "test/ERC20Pausable.t.sol", + "file": "test/ERC20Pausable.t.sol:ERC20PausableWithWorldTest", "test": "testBurn", "name": "world_burn", "gasUsed": 75661 }, { - "file": "test/ERC20Pausable.t.sol", + "file": "test/ERC20Pausable.t.sol:ERC20PausableWithWorldTest", "test": "testMint", "name": "world_mint", "gasUsed": 109880 }, { - "file": "test/ERC20Pausable.t.sol", + "file": "test/ERC20Pausable.t.sol:ERC20PausableWithWorldTest", "test": "testPause", "name": "world_pause", "gasUsed": 66128 }, { - "file": "test/ERC20Pausable.t.sol", + "file": "test/ERC20Pausable.t.sol:ERC20PausableWithWorldTest", "test": "testPause", "name": "world_unpause", "gasUsed": 44214 }, { - "file": "test/ERC20Pausable.t.sol", + "file": "test/ERC20Pausable.t.sol:ERC20PausableWithWorldTest", "test": "testTransfer", "name": "world_transfer", "gasUsed": 87096 }, { - "file": "test/ERC20Pausable.t.sol", + "file": "test/ERC20Pausable.t.sol:ERC20PausableWithWorldTest", "test": "testTransferFrom", "name": "world_transferFrom", "gasUsed": 104242 diff --git a/packages/world-module-metadata/gas-report.json b/packages/world-module-metadata/gas-report.json index 3709dce3c6..db85ecdf4d 100644 --- a/packages/world-module-metadata/gas-report.json +++ b/packages/world-module-metadata/gas-report.json @@ -1,18 +1,18 @@ [ { - "file": "test/MetadataModule.t.sol", + "file": "test/MetadataModule.t.sol:MetadataModuleTest", "test": "testDeleteResourceTag", "name": "delete resource tag", "gasUsed": 70301 }, { - "file": "test/MetadataModule.t.sol", + "file": "test/MetadataModule.t.sol:MetadataModuleTest", "test": "testInstall", "name": "install metadata module", "gasUsed": 1109853 }, { - "file": "test/MetadataModule.t.sol", + "file": "test/MetadataModule.t.sol:MetadataModuleTest", "test": "testSetResourceTag", "name": "set resource tag", "gasUsed": 116708 diff --git a/packages/world-modules/gas-report.json b/packages/world-modules/gas-report.json index cc113365fe..e026ade173 100644 --- a/packages/world-modules/gas-report.json +++ b/packages/world-modules/gas-report.json @@ -1,336 +1,336 @@ [ { - "file": "test/CallWithSignatureModule.t.sol", + "file": "test/CallWithSignatureModule.t.sol:Unstable_CallWithSignatureModuleTest", "test": "testInstallRoot", "name": "install delegation module", "gasUsed": 691133 }, { - "file": "test/CallWithSignatureModule.t.sol", + "file": "test/CallWithSignatureModule.t.sol:Unstable_CallWithSignatureModuleTest", "test": "testRegisterDelegationWithSignature", "name": "register an unlimited delegation with signature", "gasUsed": 138532 }, { - "file": "test/ERC20.t.sol", + "file": "test/ERC20.t.sol:ERC20Test", "test": "testApprove", "name": "approve", "gasUsed": 133324 }, { - "file": "test/ERC20.t.sol", + "file": "test/ERC20.t.sol:ERC20Test", "test": "testBurn", "name": "burn", "gasUsed": 141096 }, { - "file": "test/ERC20.t.sol", + "file": "test/ERC20.t.sol:ERC20Test", "test": "testMint", "name": "mint", "gasUsed": 179835 }, { - "file": "test/ERC20.t.sol", + "file": "test/ERC20.t.sol:ERC20Test", "test": "testTransfer", "name": "transfer", "gasUsed": 145002 }, { - "file": "test/ERC20.t.sol", + "file": "test/ERC20.t.sol:ERC20Test", "test": "testTransferFrom", "name": "transferFrom", "gasUsed": 183189 }, { - "file": "test/ERC721.t.sol", + "file": "test/ERC721.t.sol:ERC721Test", "test": "testApproveAllGas", "name": "setApprovalForAll", "gasUsed": 132887 }, { - "file": "test/ERC721.t.sol", + "file": "test/ERC721.t.sol:ERC721Test", "test": "testApproveGas", "name": "approve", "gasUsed": 136246 }, { - "file": "test/ERC721.t.sol", + "file": "test/ERC721.t.sol:ERC721Test", "test": "testBurnGas", "name": "burn", "gasUsed": 156244 }, { - "file": "test/ERC721.t.sol", + "file": "test/ERC721.t.sol:ERC721Test", "test": "testMintGas", "name": "mint", "gasUsed": 187144 }, { - "file": "test/ERC721.t.sol", + "file": "test/ERC721.t.sol:ERC721Test", "test": "testSafeMintToEOAGas", "name": "safeMint", "gasUsed": 189855 }, { - "file": "test/ERC721.t.sol", + "file": "test/ERC721.t.sol:ERC721Test", "test": "testSafeTransferFromToEOAGas", "name": "safeTransferFrom", "gasUsed": 201362 }, { - "file": "test/ERC721.t.sol", + "file": "test/ERC721.t.sol:ERC721Test", "test": "testTransferFromGas", "name": "transferFrom", "gasUsed": 190290 }, { - "file": "test/KeysInTableModule.t.sol", + "file": "test/KeysInTableModule.t.sol:KeysInTableModuleTest", "test": "testInstallComposite", "name": "install keys in table module", "gasUsed": 1463317 }, { - "file": "test/KeysInTableModule.t.sol", + "file": "test/KeysInTableModule.t.sol:KeysInTableModuleTest", "test": "testInstallGas", "name": "install keys in table module", "gasUsed": 1463317 }, { - "file": "test/KeysInTableModule.t.sol", + "file": "test/KeysInTableModule.t.sol:KeysInTableModuleTest", "test": "testInstallGas", "name": "set a record on a table with keysInTableModule installed", "gasUsed": 191359 }, { - "file": "test/KeysInTableModule.t.sol", + "file": "test/KeysInTableModule.t.sol:KeysInTableModuleTest", "test": "testInstallSingleton", "name": "install keys in table module", "gasUsed": 1463317 }, { - "file": "test/KeysInTableModule.t.sol", + "file": "test/KeysInTableModule.t.sol:KeysInTableModuleTest", "test": "testSetAndDeleteRecordHookCompositeGas", "name": "install keys in table module", "gasUsed": 1463317 }, { - "file": "test/KeysInTableModule.t.sol", + "file": "test/KeysInTableModule.t.sol:KeysInTableModuleTest", "test": "testSetAndDeleteRecordHookCompositeGas", "name": "change a composite record on a table with keysInTableModule installed", "gasUsed": 63600 }, { - "file": "test/KeysInTableModule.t.sol", + "file": "test/KeysInTableModule.t.sol:KeysInTableModuleTest", "test": "testSetAndDeleteRecordHookCompositeGas", "name": "delete a composite record on a table with keysInTableModule installed", "gasUsed": 223443 }, { - "file": "test/KeysInTableModule.t.sol", + "file": "test/KeysInTableModule.t.sol:KeysInTableModuleTest", "test": "testSetAndDeleteRecordHookGas", "name": "install keys in table module", "gasUsed": 1463317 }, { - "file": "test/KeysInTableModule.t.sol", + "file": "test/KeysInTableModule.t.sol:KeysInTableModuleTest", "test": "testSetAndDeleteRecordHookGas", "name": "change a record on a table with keysInTableModule installed", "gasUsed": 62271 }, { - "file": "test/KeysInTableModule.t.sol", + "file": "test/KeysInTableModule.t.sol:KeysInTableModuleTest", "test": "testSetAndDeleteRecordHookGas", "name": "delete a record on a table with keysInTableModule installed", "gasUsed": 141684 }, { - "file": "test/KeysWithValueModule.t.sol", + "file": "test/KeysWithValueModule.t.sol:KeysWithValueModuleTest", "test": "testGetKeysWithValueGas", "name": "install keys with value module", "gasUsed": 719012 }, { - "file": "test/KeysWithValueModule.t.sol", + "file": "test/KeysWithValueModule.t.sol:KeysWithValueModuleTest", "test": "testGetKeysWithValueGas", "name": "Get list of keys with a given value", "gasUsed": 5659 }, { - "file": "test/KeysWithValueModule.t.sol", + "file": "test/KeysWithValueModule.t.sol:KeysWithValueModuleTest", "test": "testGetTargetTableId", "name": "compute the target table selector", "gasUsed": 2624 }, { - "file": "test/KeysWithValueModule.t.sol", + "file": "test/KeysWithValueModule.t.sol:KeysWithValueModuleTest", "test": "testInstall", "name": "install keys with value module", "gasUsed": 719012 }, { - "file": "test/KeysWithValueModule.t.sol", + "file": "test/KeysWithValueModule.t.sol:KeysWithValueModuleTest", "test": "testInstall", "name": "set a record on a table with KeysWithValueModule installed", "gasUsed": 168254 }, { - "file": "test/KeysWithValueModule.t.sol", + "file": "test/KeysWithValueModule.t.sol:KeysWithValueModuleTest", "test": "testSetAndDeleteRecordHook", "name": "install keys with value module", "gasUsed": 719012 }, { - "file": "test/KeysWithValueModule.t.sol", + "file": "test/KeysWithValueModule.t.sol:KeysWithValueModuleTest", "test": "testSetAndDeleteRecordHook", "name": "change a record on a table with KeysWithValueModule installed", "gasUsed": 159608 }, { - "file": "test/KeysWithValueModule.t.sol", + "file": "test/KeysWithValueModule.t.sol:KeysWithValueModuleTest", "test": "testSetAndDeleteRecordHook", "name": "delete a record on a table with KeysWithValueModule installed", "gasUsed": 78835 }, { - "file": "test/KeysWithValueModule.t.sol", + "file": "test/KeysWithValueModule.t.sol:KeysWithValueModuleTest", "test": "testSetField", "name": "install keys with value module", "gasUsed": 719012 }, { - "file": "test/KeysWithValueModule.t.sol", + "file": "test/KeysWithValueModule.t.sol:KeysWithValueModuleTest", "test": "testSetField", "name": "set a field on a table with KeysWithValueModule installed", "gasUsed": 179348 }, { - "file": "test/KeysWithValueModule.t.sol", + "file": "test/KeysWithValueModule.t.sol:KeysWithValueModuleTest", "test": "testSetField", "name": "change a field on a table with KeysWithValueModule installed", "gasUsed": 158835 }, { - "file": "test/query.t.sol", + "file": "test/query.t.sol:QueryTest", "test": "testCombinedHasHasValueNotQuery", "name": "CombinedHasHasValueNotQuery", "gasUsed": 93122 }, { - "file": "test/query.t.sol", + "file": "test/query.t.sol:QueryTest", "test": "testCombinedHasHasValueQuery", "name": "CombinedHasHasValueQuery", "gasUsed": 48652 }, { - "file": "test/query.t.sol", + "file": "test/query.t.sol:QueryTest", "test": "testCombinedHasNotQuery", "name": "CombinedHasNotQuery", "gasUsed": 113825 }, { - "file": "test/query.t.sol", + "file": "test/query.t.sol:QueryTest", "test": "testCombinedHasQuery", "name": "CombinedHasQuery", "gasUsed": 71833 }, { - "file": "test/query.t.sol", + "file": "test/query.t.sol:QueryTest", "test": "testCombinedHasValueNotQuery", "name": "CombinedHasValueNotQuery", "gasUsed": 74307 }, { - "file": "test/query.t.sol", + "file": "test/query.t.sol:QueryTest", "test": "testCombinedHasValueQuery", "name": "CombinedHasValueQuery", "gasUsed": 15030 }, { - "file": "test/query.t.sol", + "file": "test/query.t.sol:QueryTest", "test": "testHasQuery", "name": "HasQuery", "gasUsed": 15980 }, { - "file": "test/query.t.sol", + "file": "test/query.t.sol:QueryTest", "test": "testHasQuery1000Keys", "name": "HasQuery with 1000 keys", "gasUsed": 5341823 }, { - "file": "test/query.t.sol", + "file": "test/query.t.sol:QueryTest", "test": "testHasQuery100Keys", "name": "HasQuery with 100 keys", "gasUsed": 504505 }, { - "file": "test/query.t.sol", + "file": "test/query.t.sol:QueryTest", "test": "testHasValueQuery", "name": "HasValueQuery", "gasUsed": 7290 }, { - "file": "test/query.t.sol", + "file": "test/query.t.sol:QueryTest", "test": "testNotValueQuery", "name": "NotValueQuery", "gasUsed": 42889 }, { - "file": "test/StandardDelegationsModule.t.sol", + "file": "test/StandardDelegationsModule.t.sol:StandardDelegationsModuleTest", "test": "testCallFromCallboundDelegation", "name": "register a callbound delegation", "gasUsed": 138994 }, { - "file": "test/StandardDelegationsModule.t.sol", + "file": "test/StandardDelegationsModule.t.sol:StandardDelegationsModuleTest", "test": "testCallFromCallboundDelegation", "name": "call a system via a callbound delegation", "gasUsed": 67297 }, { - "file": "test/StandardDelegationsModule.t.sol", + "file": "test/StandardDelegationsModule.t.sol:StandardDelegationsModuleTest", "test": "testCallFromSystemDelegation", "name": "register a systembound delegation", "gasUsed": 136116 }, { - "file": "test/StandardDelegationsModule.t.sol", + "file": "test/StandardDelegationsModule.t.sol:StandardDelegationsModuleTest", "test": "testCallFromSystemDelegation", "name": "call a system via a systembound delegation", "gasUsed": 69661 }, { - "file": "test/StandardDelegationsModule.t.sol", + "file": "test/StandardDelegationsModule.t.sol:StandardDelegationsModuleTest", "test": "testCallFromTimeboundDelegation", "name": "register a timebound delegation", "gasUsed": 132659 }, { - "file": "test/StandardDelegationsModule.t.sol", + "file": "test/StandardDelegationsModule.t.sol:StandardDelegationsModuleTest", "test": "testCallFromTimeboundDelegation", "name": "call a system via a timebound delegation", "gasUsed": 58227 }, { - "file": "test/UniqueEntityModule.t.sol", + "file": "test/UniqueEntityModule.t.sol:UniqueEntityModuleTest", "test": "testInstall", "name": "install unique entity module", "gasUsed": 718745 }, { - "file": "test/UniqueEntityModule.t.sol", + "file": "test/UniqueEntityModule.t.sol:UniqueEntityModuleTest", "test": "testInstall", "name": "get a unique entity nonce (non-root module)", "gasUsed": 77840 }, { - "file": "test/UniqueEntityModule.t.sol", + "file": "test/UniqueEntityModule.t.sol:UniqueEntityModuleTest", "test": "testInstallRoot", "name": "installRoot unique entity module", "gasUsed": 689190 }, { - "file": "test/UniqueEntityModule.t.sol", + "file": "test/UniqueEntityModule.t.sol:UniqueEntityModuleTest", "test": "testInstallRoot", "name": "get a unique entity nonce (root module)", "gasUsed": 77843 diff --git a/packages/world/gas-report.json b/packages/world/gas-report.json index f3e0425119..0b342e977c 100644 --- a/packages/world/gas-report.json +++ b/packages/world/gas-report.json @@ -1,318 +1,318 @@ [ { - "file": "test/AccessControl.t.sol", + "file": "test/AccessControl.t.sol:AccessControlTest", "test": "testAccessControl", "name": "AccessControl: hasAccess (cold)", "gasUsed": 9111 }, { - "file": "test/AccessControl.t.sol", + "file": "test/AccessControl.t.sol:AccessControlTest", "test": "testAccessControl", "name": "AccessControl: hasAccess (warm, namespace only)", "gasUsed": 1595 }, { - "file": "test/AccessControl.t.sol", + "file": "test/AccessControl.t.sol:AccessControlTest", "test": "testAccessControl", "name": "AccessControl: hasAccess (warm)", "gasUsed": 3117 }, { - "file": "test/AccessControl.t.sol", + "file": "test/AccessControl.t.sol:AccessControlTest", "test": "testRequireAccess", "name": "AccessControl: requireAccess (cold)", "gasUsed": 9154 }, { - "file": "test/AccessControl.t.sol", + "file": "test/AccessControl.t.sol:AccessControlTest", "test": "testRequireAccess", "name": "AccessControl: requireAccess (warm)", "gasUsed": 3156 }, { - "file": "test/AccessControl.t.sol", + "file": "test/AccessControl.t.sol:AccessControlTest", "test": "testRequireOwner", "name": "AccessControl: requireOwner (cold)", "gasUsed": 5401 }, { - "file": "test/AccessControl.t.sol", + "file": "test/AccessControl.t.sol:AccessControlTest", "test": "testRequireOwner", "name": "AccessControl: requireOwner (warm)", "gasUsed": 1402 }, { - "file": "test/BatchCall.t.sol", + "file": "test/BatchCall.t.sol:BatchCallTest", "test": "testBatchCallFromReturnData", "name": "call systems with batchCallFrom", "gasUsed": 80765 }, { - "file": "test/BatchCall.t.sol", + "file": "test/BatchCall.t.sol:BatchCallTest", "test": "testBatchCallReturnData", "name": "call systems with batchCall", "gasUsed": 77560 }, { - "file": "test/Factories.t.sol", + "file": "test/Factories.t.sol:FactoriesTest", "test": "testCreate2Factory", "name": "deploy contract via Create2", "gasUsed": 4970818 }, { - "file": "test/Factories.t.sol", + "file": "test/Factories.t.sol:FactoriesTest", "test": "testWorldFactoryGas", "name": "deploy world via WorldFactory", "gasUsed": 12847807 }, { - "file": "test/World.t.sol", + "file": "test/World.t.sol:WorldTest", "test": "testCall", "name": "call a system via the World", "gasUsed": 40081 }, { - "file": "test/World.t.sol", + "file": "test/World.t.sol:WorldTest", "test": "testCallFromNamespaceDelegation", "name": "call a system via a namespace fallback delegation", "gasUsed": 59816 }, { - "file": "test/World.t.sol", + "file": "test/World.t.sol:WorldTest", "test": "testCallFromUnlimitedDelegation", "name": "register an unlimited delegation", "gasUsed": 74771 }, { - "file": "test/World.t.sol", + "file": "test/World.t.sol:WorldTest", "test": "testCallFromUnlimitedDelegation", "name": "call a system via an unlimited delegation", "gasUsed": 40663 }, { - "file": "test/World.t.sol", + "file": "test/World.t.sol:WorldTest", "test": "testDeleteRecord", "name": "Delete record", "gasUsed": 36718 }, { - "file": "test/World.t.sol", + "file": "test/World.t.sol:WorldTest", "test": "testPushToDynamicField", "name": "Push data to the table", "gasUsed": 110775 }, { - "file": "test/World.t.sol", + "file": "test/World.t.sol:WorldTest", "test": "testRegisterFunctionSelector", "name": "Register a function selector", "gasUsed": 116605 }, { - "file": "test/World.t.sol", + "file": "test/World.t.sol:WorldTest", "test": "testRegisterNamespace", "name": "Register a new namespace", "gasUsed": 144062 }, { - "file": "test/World.t.sol", + "file": "test/World.t.sol:WorldTest", "test": "testRegisterRootFunctionSelector", "name": "Register a root function selector", "gasUsed": 113693 }, { - "file": "test/World.t.sol", + "file": "test/World.t.sol:WorldTest", "test": "testRegisterSystem", "name": "register a system", "gasUsed": 185349 }, { - "file": "test/World.t.sol", + "file": "test/World.t.sol:WorldTest", "test": "testRegisterTable", "name": "Register a new table in the namespace", "gasUsed": 572927 }, { - "file": "test/World.t.sol", + "file": "test/World.t.sol:WorldTest", "test": "testRenounceNamespace", "name": "Renounce namespace ownership", "gasUsed": 62190 }, { - "file": "test/World.t.sol", + "file": "test/World.t.sol:WorldTest", "test": "testSetField", "name": "Write data to a table field", "gasUsed": 60884 }, { - "file": "test/World.t.sol", + "file": "test/World.t.sol:WorldTest", "test": "testSetRecord", "name": "Write data to the table", "gasUsed": 64743 }, { - "file": "test/World.t.sol", + "file": "test/World.t.sol:WorldTest", "test": "testUnregisterNamespaceDelegation", "name": "unregister a namespace delegation", "gasUsed": 60328 }, { - "file": "test/World.t.sol", + "file": "test/World.t.sol:WorldTest", "test": "testUnregisterUnlimitedDelegation", "name": "unregister an unlimited delegation", "gasUsed": 54526 }, { - "file": "test/WorldDynamicUpdate.t.sol", + "file": "test/WorldDynamicUpdate.t.sol:UpdateInDynamicFieldTest", "test": "testPopFromDynamicField", "name": "pop 1 address (cold)", "gasUsed": 51686 }, { - "file": "test/WorldDynamicUpdate.t.sol", + "file": "test/WorldDynamicUpdate.t.sol:UpdateInDynamicFieldTest", "test": "testPopFromDynamicField", "name": "pop 1 address (warm)", "gasUsed": 45632 }, { - "file": "test/WorldDynamicUpdate.t.sol", + "file": "test/WorldDynamicUpdate.t.sol:UpdateInDynamicFieldTest", "test": "testSpliceDynamicData", "name": "update in field 1 item (cold)", "gasUsed": 52822 }, { - "file": "test/WorldDynamicUpdate.t.sol", + "file": "test/WorldDynamicUpdate.t.sol:UpdateInDynamicFieldTest", "test": "testSpliceDynamicData", "name": "update in field 1 item (warm)", "gasUsed": 44023 }, { - "file": "test/WorldProxy.t.sol", + "file": "test/WorldProxy.t.sol:WorldProxyTest", "test": "testCall", "name": "call a system via the World", "gasUsed": 45004 }, { - "file": "test/WorldProxy.t.sol", + "file": "test/WorldProxy.t.sol:WorldProxyTest", "test": "testCallFromNamespaceDelegation", "name": "call a system via a namespace fallback delegation", "gasUsed": 64745 }, { - "file": "test/WorldProxy.t.sol", + "file": "test/WorldProxy.t.sol:WorldProxyTest", "test": "testCallFromUnlimitedDelegation", "name": "register an unlimited delegation", "gasUsed": 79685 }, { - "file": "test/WorldProxy.t.sol", + "file": "test/WorldProxy.t.sol:WorldProxyTest", "test": "testCallFromUnlimitedDelegation", "name": "call a system via an unlimited delegation", "gasUsed": 45592 }, { - "file": "test/WorldProxy.t.sol", + "file": "test/WorldProxy.t.sol:WorldProxyTest", "test": "testDeleteRecord", "name": "Delete record", "gasUsed": 41626 }, { - "file": "test/WorldProxy.t.sol", + "file": "test/WorldProxy.t.sol:WorldProxyTest", "test": "testPushToDynamicField", "name": "Push data to the table", "gasUsed": 115719 }, { - "file": "test/WorldProxy.t.sol", + "file": "test/WorldProxy.t.sol:WorldProxyTest", "test": "testRegisterFunctionSelector", "name": "Register a function selector", "gasUsed": 121522 }, { - "file": "test/WorldProxy.t.sol", + "file": "test/WorldProxy.t.sol:WorldProxyTest", "test": "testRegisterNamespace", "name": "Register a new namespace", "gasUsed": 148961 }, { - "file": "test/WorldProxy.t.sol", + "file": "test/WorldProxy.t.sol:WorldProxyTest", "test": "testRegisterRootFunctionSelector", "name": "Register a root function selector", "gasUsed": 118628 }, { - "file": "test/WorldProxy.t.sol", + "file": "test/WorldProxy.t.sol:WorldProxyTest", "test": "testRegisterSystem", "name": "register a system", "gasUsed": 190257 }, { - "file": "test/WorldProxy.t.sol", + "file": "test/WorldProxy.t.sol:WorldProxyTest", "test": "testRegisterTable", "name": "Register a new table in the namespace", "gasUsed": 577937 }, { - "file": "test/WorldProxy.t.sol", + "file": "test/WorldProxy.t.sol:WorldProxyTest", "test": "testRenounceNamespace", "name": "Renounce namespace ownership", "gasUsed": 67089 }, { - "file": "test/WorldProxy.t.sol", + "file": "test/WorldProxy.t.sol:WorldProxyTest", "test": "testSetField", "name": "Write data to a table field", "gasUsed": 65822 }, { - "file": "test/WorldProxy.t.sol", + "file": "test/WorldProxy.t.sol:WorldProxyTest", "test": "testSetRecord", "name": "Write data to the table", "gasUsed": 69687 }, { - "file": "test/WorldProxy.t.sol", + "file": "test/WorldProxy.t.sol:WorldProxyTest", "test": "testUnregisterNamespaceDelegation", "name": "unregister a namespace delegation", "gasUsed": 65227 }, { - "file": "test/WorldProxy.t.sol", + "file": "test/WorldProxy.t.sol:WorldProxyTest", "test": "testUnregisterUnlimitedDelegation", "name": "unregister an unlimited delegation", "gasUsed": 59425 }, { - "file": "test/WorldProxyFactory.t.sol", + "file": "test/WorldProxyFactory.t.sol:WorldProxyFactoryTest", "test": "testWorldProxyFactoryGas", "name": "deploy world via WorldProxyFactory", "gasUsed": 9143347 }, { - "file": "test/WorldProxyFactory.t.sol", + "file": "test/WorldProxyFactory.t.sol:WorldProxyFactoryTest", "test": "testWorldProxyFactoryGas", "name": "set WorldProxy implementation", "gasUsed": 37553 }, { - "file": "test/WorldResourceId.t.sol", + "file": "test/WorldResourceId.t.sol:WorldResourceIdTest", "test": "testGetNamespace", "name": "encode namespace, name and type", "gasUsed": 33 }, { - "file": "test/WorldResourceId.t.sol", + "file": "test/WorldResourceId.t.sol:WorldResourceIdTest", "test": "testGetNamespaceId", "name": "get namespace ID from a resource ID", "gasUsed": 22 }, { - "file": "test/WorldResourceId.t.sol", + "file": "test/WorldResourceId.t.sol:WorldResourceIdTest", "test": "testGetType", "name": "get type from a resource ID", "gasUsed": 4 }, { - "file": "test/WorldResourceId.t.sol", + "file": "test/WorldResourceId.t.sol:WorldResourceIdTest", "test": "testToString", "name": "convert resource ID to string", "gasUsed": 2390 diff --git a/tsconfig.paths.json b/tsconfig.paths.json index d90cad91fc..669cc7f5ca 100644 --- a/tsconfig.paths.json +++ b/tsconfig.paths.json @@ -18,7 +18,7 @@ "@latticexyz/config/node": ["./packages/config/src/deprecated/node"], "@latticexyz/dev-tools": ["./packages/dev-tools/src/index.ts"], "@latticexyz/explorer/observer": ["./packages/explorer/src/exports/observer.ts"], - "@latticexyz/gas-report": ["./packages/gas-report/ts/index.ts"], + "@latticexyz/gas-report/internal": ["./packages/gas-report/ts/exports/internal.ts"], "@latticexyz/protocol-parser": ["./packages/protocol-parser/src/index.ts"], "@latticexyz/protocol-parser/*": ["./packages/protocol-parser/src/exports/*.ts"], "@latticexyz/react": ["./packages/react/src/index.ts"],