Update @ethereumjs/tx and ethereumjs-util

pull/548/head
Yannick Huard 3 years ago
parent 5c5ff9cf2f
commit 86d3199860
  1. 2
      README.md
  2. 4
      package.json
  3. 3
      test/integration.test.js
  4. 3
      test/tutorials/signed-data.test.js
  5. 5
      test/unit.test.js
  6. 2
      typings/index.d.ts

@ -235,7 +235,7 @@ const identity = EthCrypto.createIdentity();
const rawTx = {
from: identity.address,
to: '0x86Fa049857E0209aa7D9e616F7eb3b3B78ECfdb0',
value: 1000000000000000000,
value: new BN('1000000000000000000'),
gasPrice: 5000000000,
nonce: 0,
gasLimit: 21000

@ -95,10 +95,10 @@
},
"dependencies": {
"@babel/runtime": "7.16.7",
"@ethereumjs/tx": "3.3.1",
"@ethereumjs/tx": "^3.4.0",
"@types/bn.js": "5.1.0",
"eccrypto": "1.1.6",
"ethereumjs-util": "7.1.1",
"ethereumjs-util": "^7.1.3",
"ethers": "5.5.4",
"secp256k1": "4.0.3"
}

@ -4,6 +4,7 @@ const path = require('path');
const AsyncTestUtil = require('async-test-util');
const SolidityCli = require('solidity-cli');
const assert = require('assert');
const BN = require('bn.js');
const EthCrypto = require('../dist/lib/index');
// const web3 = EthCrypto.util.web3;
@ -109,7 +110,7 @@ describe('integration.test.js', () => {
const rawTx = {
from: identity.address,
to: '0x63dcee1fd1d814858acd4172bb20e1aa0c947c0a',
value: parseInt(web3.utils.toWei('1', 'ether')),
value: new BN(web3.utils.toWei('1', 'ether')),
nonce: 0,
gasLimit: 60000,
gasPrice: parseInt(gasPrice)

@ -6,6 +6,7 @@
const ganache = require('ganache-cli');
const Web3 = require('web3');
const assert = require('assert');
const BN = require('bn.js');
const EthCrypto = require('../../dist/lib/index');
describe('signed-data.md', () => {
@ -86,7 +87,7 @@ describe('signed-data.md', () => {
from: creatorIdentity.address,
to: contractAddress,
nonce: 1,
value: parseInt(web3.utils.toWei('3', 'ether')),
value: new BN(web3.utils.toWei('3', 'ether')),
gasLimit: 600000,
gasPrice: 20000000000
};

@ -1,5 +1,6 @@
const AsyncTestUtil = require('async-test-util');
const assert = require('assert');
const BN = require('bn.js');
const EthCrypto = require('../dist/lib/index');
const TEST_DATA = {
@ -331,7 +332,7 @@ describe('unit.test.js', () => {
const rawTx = {
from: ident.address,
to: '0x86Fa049857E0209aa7D9e616F7eb3b3B78ECfdb0',
value: 1000000000000000000,
value: new BN('1000000000000000000'),
gasPrice: 5000000000,
gasLimit: 21000
};
@ -348,7 +349,7 @@ describe('unit.test.js', () => {
const rawTx = {
from: ident.address,
to: '0x86Fa049857E0209aa7D9e616F7eb3b3B78ECfdb0',
value: 1000000000000000000,
value: new BN('1000000000000000000'),
gasPrice: 5000000000,
gasLimit: 21000
};

@ -1,4 +1,4 @@
import BigNumber = require('bn.js');
import BigNumber from 'bn.js';
import { TxOptions } from '@ethereumjs/tx';
type createIdentityType = (entropy?: Buffer) => {

Loading…
Cancel
Save