Security News
JavaScript Leaders Demand Oracle Release the JavaScript Trademark
In an open letter, JavaScript community leaders urge Oracle to give up the JavaScript trademark, arguing that it has been effectively abandoned through nonuse.
@latticexyz/gas-report
Advanced tools
Measure and report gas usage within forge tests
Add some reports to your forge tests
import { Test } from "forge-std/Test.sol";
import { GasReporter } from "@latticexyz/gas-report/src/GasReporter.sol";
contract ExampleTest is Test, GasReporter {
function testGas() public {
startGasReport("description of behavior to measure gas for");
// do something here
endGasReport();
}
}
Then use the cli command to run tests and save the report:
pnpm gas-report --save gas-report.json
Or, if you have your own test command, you can pipe the output to gas-report --stdin
:
GAS_REPORTER_ENABLED=true forge test -vvv --isolate | pnpm gas-report --stdin
Run pnpm gas-report --help
for more details.
Version 2.2.1
Release date: Sun Sep 01 2024
fix(store-sync): handle TransactionReceiptNotFoundError (#3115) (@latticexyz/store-sync)
Improved error handling of TransactionReceiptNotFoundError
in waitForTransaction
when Viem versions aren't aligned.
fix(cli): deployer should wait for prereq txs (#3113) (@latticexyz/cli)
Deployer now waits for prerequisite transactions before continuing.
fix(common): use pending block tag in tx queue (#3073) (@latticexyz/common)
writeContract
and sendTransaction
actions now use pending
block tag when estimating gas. This aligns with previous behavior before changes in the last version.
FAQs
Gas reporter for specific lines within forge tests
The npm package @latticexyz/gas-report receives a total of 2,679 weekly downloads. As such, @latticexyz/gas-report popularity was classified as popular.
We found that @latticexyz/gas-report demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
In an open letter, JavaScript community leaders urge Oracle to give up the JavaScript trademark, arguing that it has been effectively abandoned through nonuse.
Security News
The initial version of the Socket Python SDK is now on PyPI, enabling developers to more easily interact with the Socket REST API in Python projects.
Security News
Floating dependency ranges in npm can introduce instability and security risks into your project by allowing unverified or incompatible versions to be installed automatically, leading to unpredictable behavior and potential conflicts.