Skip to content
This repository has been archived by the owner on Apr 22, 2024. It is now read-only.

chore: updating to ethereumjs-util@6 #399

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -39,7 +39,7 @@
"eth-rpc-errors": "^3.0.0",
"eth-sig-util": "^1.4.2",
"ethereumjs-block": "^1.2.2",
"ethereumjs-util": "^5.1.5",
"ethereumjs-util": "^6.2.1",
"ethereumjs-vm": "^2.3.4",
"json-stable-stringify": "^1.0.1",
"promise-to-callback": "^1.0.0",
Expand Down
4 changes: 2 additions & 2 deletions test/subproviders/etherscan.js
@@ -1,4 +1,4 @@
const sha3 = require('ethereumjs-util').sha3;
const keccak256 = require('ethereumjs-util').keccak256;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a nitpick, feel free to take or leave, but it's probably more idiomatic to say this, yeah?

Suggested change
const keccak256 = require('ethereumjs-util').keccak256;
const { keccak256 } = require('ethereumjs-util')

const test = require('tape')
const ProviderEngine = require('../../index.js')
const createPayload = require('../../util/create-payload.js')
Expand Down Expand Up @@ -107,7 +107,7 @@ test('etherscan eth_getBalance', function(t) {
test('etherscan eth_call', function(t) {
t.plan(3)

var signature = Buffer.concat([sha3("getLatestBlock()", 256)], 4).toString('hex');
var signature = Buffer.concat([keccak256("getLatestBlock()")], 4).toString('hex');
var engine = new ProviderEngine()
var etherscan = new EtherscanSubprovider()
engine.addProvider(etherscan)
Expand Down
1 change: 0 additions & 1 deletion test/subproviders/ipc.js
@@ -1,4 +1,3 @@
const sha3 = require('ethereumjs-util').sha3;
const test = require('tape')
const ProviderEngine = require('../../index.js')
const createPayload = require('../../util/create-payload.js')
Expand Down
2 changes: 1 addition & 1 deletion test/wallet.js
Expand Up @@ -154,7 +154,7 @@ test('sign message', function(t){
var privateKey = Buffer.from('cccd8f4d88de61f92f3747e4a9604a0395e6ad5138add4bec4a2ddf231ee24f9', 'hex')
var addressHex = '0x1234362ef32bcd26d3dd18ca749378213625ba0b'

var message = 'haay wuurl'
var message = '0x' + Buffer.from('haay wuurl').toString('hex')
var signature = '0x68dc980608bceb5f99f691e62c32caccaee05317309015e9454eba1a14c3cd4505d1dd098b8339801239c9bcaac3c4df95569dcf307108b92f68711379be14d81c'

// sign all messages
Expand Down