Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

solidity-coverage

Package Overview
Dependencies
Maintainers
3
Versions
120
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

solidity-coverage - npm Package Compare versions

Comparing version 0.8.9 to 0.8.10-rc.0

5

CHANGELOG.md
# Changelog
0.8.9 / 2024-02-27
==================
* Fix duplicate hash logic (https://github.com/sc-forks/solidity-coverage/issues/868)
* Improve organization of edge case code in collector (https://github.com/sc-forks/solidity-coverage/issues/869)
0.8.8 / 2024-02-21

@@ -4,0 +9,0 @@ ==================

44

lib/collector.js

@@ -9,22 +9,3 @@ /**

this.validOpcodes = {
"PUSH1": true,
"DUP1": viaIR,
"DUP2": viaIR,
"DUP3": viaIR,
"DUP4": viaIR,
"DUP5": viaIR,
"DUP6": viaIR,
"DUP7": viaIR,
"DUP8": viaIR,
"DUP9": viaIR,
"DUP10": viaIR,
"DUP11": viaIR,
"DUP12": viaIR,
"DUP13": viaIR,
"DUP14": viaIR,
"DUP15": viaIR,
"DUP16": viaIR,
}
this.validOpcodes = this._getOpcodes(viaIR);
this.lastHash = null;

@@ -102,2 +83,25 @@ this.viaIR = viaIR;

/**
* Generates a list of all the opcodes to inspect for instrumentation hashes
* When viaIR is true, it includes all DUPs and PUSHs, so things are a little slower.
* @param {boolean} viaIR
*/
_getOpcodes(viaIR) {
let opcodes = {
"PUSH1": true
};
for (let i = 2; i <= 32; i++) {
const key = "PUSH" + i;
opcodes[key] = viaIR;
};
for (let i = 1; i <= 16; i++ ) {
const key = "DUP" + i;
opcodes[key] = viaIR;
}
return opcodes;
}
/**

@@ -104,0 +108,0 @@ * Unit test helper

{
"name": "solidity-coverage",
"version": "0.8.9",
"version": "0.8.10-rc.0",
"description": "Code coverage for Solidity testing",

@@ -16,3 +16,3 @@ "main": "plugins/nomiclabs.plugin.js",

"test:ci": "./scripts/ci.sh",
"test:uint:viaIR": "VIA_IR=true ./scripts/unit.sh",
"test:unit:viaIR": "VIA_IR=true ./scripts/unit.sh",
"test:integration:viaIR": "VIA_IR=true ./scripts/integration.sh",

@@ -19,0 +19,0 @@ "test:ci:viaIR": "VIA_IR=true ./scripts/ci.sh"

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc