Socket
Socket
Sign inDemoInstall

ethers

Package Overview
Dependencies
Maintainers
1
Versions
319
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ethers - npm Package Compare versions

Comparing version 3.0.1 to 3.0.2

2

package.json
{
"name": "ethers",
"version": "3.0.1",
"version": "3.0.2",
"description": "Ethereum wallet library.",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -137,4 +137,4 @@ 'use strict';

url += '/api?module=proxy&action=eth_getStorageAt&address=' + params.address;
url += '&position=' + utils.hexStripZeros(params.position);
url += '&tag=' + utils.hexStripZeros(params.blockTag) + apiKey;
url += '&position=' + params.position;
url += '&tag=' + params.blockTag + apiKey;
return Provider.fetchJSON(url, null, getJsonResult);

@@ -150,3 +150,3 @@

if (params.blockTag) {
url += '/api?module=proxy&action=eth_getBlockByNumber&tag=' + utils.hexStripZeros(params.blockTag);
url += '/api?module=proxy&action=eth_getBlockByNumber&tag=' + params.blockTag;
url += '&boolean=false';

@@ -153,0 +153,0 @@ url += apiKey;

@@ -101,22 +101,12 @@ 'use strict';

case 'getBalance':
var blockTag = params.blockTag;
if (utils.isHexString(blockTag)) { blockTag = utils.hexStripZeros(blockTag); }
return this.send('eth_getBalance', [params.address, blockTag]);
return this.send('eth_getBalance', [params.address, params.blockTag]);
case 'getTransactionCount':
var blockTag = params.blockTag;
if (utils.isHexString(blockTag)) { blockTag = utils.hexStripZeros(blockTag); }
return this.send('eth_getTransactionCount', [params.address, blockTag]);
return this.send('eth_getTransactionCount', [params.address, params.blockTag]);
case 'getCode':
var blockTag = params.blockTag;
if (utils.isHexString(blockTag)) { blockTag = utils.hexStripZeros(blockTag); }
return this.send('eth_getCode', [params.address, blockTag]);
return this.send('eth_getCode', [params.address, params.blockTag]);
case 'getStorageAt':
var position = params.position;
if (utils.isHexString(position)) { position = utils.hexStripZeros(position); }
var blockTag = params.blockTag;
if (utils.isHexString(blockTag)) { blockTag = utils.hexStripZeros(blockTag); }
return this.send('eth_getStorageAt', [params.address, position, blockTag]);
return this.send('eth_getStorageAt', [params.address, params.position, params.blockTag]);

@@ -128,5 +118,3 @@ case 'sendTransaction':

if (params.blockTag) {
var blockTag = params.blockTag;
if (utils.isHexString(blockTag)) { blockTag = utils.hexStripZeros(blockTag); }
return this.send('eth_getBlockByNumber', [blockTag, false]);
return this.send('eth_getBlockByNumber', [params.blockTag, false]);
} else if (params.blockHash) {

@@ -133,0 +121,0 @@ return this.send('eth_getBlockByHash', [params.blockHash, false]);

@@ -24,2 +24,3 @@ 'use strict';

concat: convert.concat,
hexStripZeros: convert.hexStripZeros,
stripZeros: convert.stripZeros,

@@ -129,6 +130,6 @@

if (typeof(blockTag) === 'number') {
return utils.hexlify(blockTag);
return utils.hexStripZeros(utils.hexlify(blockTag));
}
if (utils.isHexString(blockTag)) { return blockTag; }
if (utils.isHexString(blockTag)) { return utils.hexStripZeros(blockTag); }

@@ -660,3 +661,3 @@ throw new Error('invalid blockTag');

blockTag: checkBlockTag(blockTag),
position: utils.hexlify(position),
position: utils.hexStripZeros(utils.hexlify(position)),
};

@@ -663,0 +664,0 @@ return self.perform('getStorageAt', params).then(function(result) {

Sorry, the diff of this file is not supported yet

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

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

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

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