New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@ggflutter/sumo

Package Overview
Dependencies
Maintainers
0
Versions
740
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ggflutter/sumo - npm Package Compare versions

Comparing version 2.5.7499996 to 2.5.7499998

2

package.json
{
"author": "Luigi Allocca",
"name": "@ggflutter/sumo",
"version": "2.5.7499996",
"version": "2.5.7499998",
"description": "A mutation testing tool for Ethereum smart contracts",

@@ -6,0 +6,0 @@ "repository": {

@@ -16,4 +16,9 @@ const Mutation = require('../../../mutation');

['call', 'delegatecall', 'staticcall'].includes(node.initialValue.expression.property.name)) {
console.log("Node Type: VariableDeclaration");
console.log("Initial Value Type: " + node.initialValue.type);
console.log("Expression Type: " + node.initialValue.expression.type);
console.log("Property Name: " + node.initialValue.expression.property.name);
// Verifica il tipo di ritorno della funzione
// Verifica il tipo di ritorno della variabile
const returnType = node.variables.length > 1 ? 'tuple' : node.variables[0].typeDescriptions.typeString;

@@ -27,14 +32,17 @@

console.log(`Original: ${original}`);
console.log(`Return Type: ${returnType}`);
console.log(`Original Code: ${original}`);
console.log(`Detected Return Type: ${returnType}`);
// Genera un valore casuale in base al tipo di ritorno
const randomReturnValue = generateRandomValueForType(returnType);
console.log(`Random Return Value: ${randomReturnValue}`);
console.log(`Generated Random Return Value: ${randomReturnValue}`);
// Crea la sostituzione per l'intera espressione
const replacement = `${node.variables.map(v => v.name).join(', ')} = ${randomReturnValue};`;
console.log(`Replacement Code: ${replacement}`);
mutations.push(new Mutation(file, start, end, startLine, endLine, original, replacement, this.ID));
console.log(`Mutation added: ${original} -> ${replacement}`);
console.log(`Mutation Added: ${original} -> ${replacement}`);
} else {
console.log("No match for VariableDeclaration node or FunctionCall.");
}

@@ -41,0 +49,0 @@ }

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