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

ethjs-contract

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ethjs-contract - npm Package Compare versions

Comparing version 0.1.4 to 0.1.5

4

CHANGELOG.md

@@ -0,1 +1,5 @@

# 0.1.5 -- remove ethjs-sha3 for js-sha3
1. Removed `ethjs-sha3` for `js-sha3`.
# 0.1.4 -- fix object mutation

@@ -2,0 +6,0 @@

4

lib/index.js
'use strict';
var abi = require('ethjs-abi'); // eslint-disable-line
var sha3 = require('ethjs-sha3'); // eslint-disable-line
var keccak256 = require('js-sha3').keccak_256; // eslint-disable-line
var EthFilter = require('ethjs-filter'); // eslint-disable-line

@@ -94,3 +94,3 @@ var getKeys = require('ethjs-util').getKeys; // eslint-disable-line

var filterInputTypes = getKeys(methodObject.inputs, 'type', false);
var filterTopic = sha3(methodObject.name + '(' + filterInputTypes.join(',') + ')');
var filterTopic = '0x' + keccak256(methodObject.name + '(' + filterInputTypes.join(',') + ')');
var argsObject = Object.assign({}, methodArgs[0]) || {};

@@ -97,0 +97,0 @@

{
"name": "ethjs-contract",
"version": "0.1.4",
"version": "0.1.5",
"description": "A simple contract object for the Ethereum RPC.",

@@ -69,5 +69,5 @@ "main": "lib/index.js",

"dependencies": {
"ethjs-abi": "0.1.4",
"ethjs-abi": "0.1.5",
"ethjs-filter": "0.1.5",
"ethjs-sha3": "0.1.2",
"js-sha3": "0.5.5",
"ethjs-util": "0.1.3"

@@ -74,0 +74,0 @@ },

const abi = require('ethjs-abi'); // eslint-disable-line
const sha3 = require('ethjs-sha3'); // eslint-disable-line
const keccak256 = require('js-sha3').keccak_256; // eslint-disable-line
const EthFilter = require('ethjs-filter'); // eslint-disable-line

@@ -91,3 +91,3 @@ const getKeys = require('ethjs-util').getKeys; // eslint-disable-line

const filterInputTypes = getKeys(methodObject.inputs, 'type', false);
const filterTopic = sha3(`${methodObject.name}(${filterInputTypes.join(',')})`);
const filterTopic = `0x${keccak256(`${methodObject.name}(${filterInputTypes.join(',')})`)}`;
const argsObject = Object.assign({}, methodArgs[0]) || {};

@@ -94,0 +94,0 @@

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

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