rm unused package, optimize size
MODIFY
package-lock.json
package-lock.json
"integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==",
"dev": true
},
- "eth-sig-util": {
- "version": "2.5.4",
- "resolved": "https://registry.npmjs.org/eth-sig-util/-/eth-sig-util-2.5.4.tgz",
- "integrity": "sha512-aCMBwp8q/4wrW4QLsF/HYBOSA7TpLKmkVwP3pYQNkEEseW2Rr8Z5Uxc9/h6HX+OG3tuHo+2bINVSihIeBfym6A==",
- "requires": {
- "ethereumjs-abi": "0.6.8",
- "ethereumjs-util": "^5.1.1",
- "tweetnacl": "^1.0.3",
- "tweetnacl-util": "^0.15.0"
- },
- "dependencies": {
- "bn.js": {
- "version": "4.12.0",
- "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz",
- "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA=="
- },
- "ethereumjs-util": {
- "version": "5.2.1",
- "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-5.2.1.tgz",
- "integrity": "sha512-v3kT+7zdyCm1HIqWlLNrHGqHGLpGYIhjeHxQjnDXjLT2FyGJDsd3LWMYUo7pAFRrk86CR3nUJfhC81CCoJNNGQ==",
- "requires": {
- "bn.js": "^4.11.0",
- "create-hash": "^1.1.2",
- "elliptic": "^6.5.2",
- "ethereum-cryptography": "^0.1.3",
- "ethjs-util": "^0.1.3",
- "rlp": "^2.0.0",
- "safe-buffer": "^5.1.1"
- }
- }
- }
- },
- "ethereum-common": {
- "version": "0.0.18",
- "resolved": "https://registry.npmjs.org/ethereum-common/-/ethereum-common-0.0.18.tgz",
- "integrity": "sha1-L9w1dvIykDNYl26znaeDIT/5Uj8="
- },
"ethereum-cryptography": {
"version": "0.1.3",
"resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-0.1.3.tgz",
"setimmediate": "^1.0.5"
}
},
- "ethereumjs-abi": {
- "version": "0.6.8",
- "resolved": "https://registry.npmjs.org/ethereumjs-abi/-/ethereumjs-abi-0.6.8.tgz",
- "integrity": "sha512-Tx0r/iXI6r+lRsdvkFDlut0N08jWMnKRZ6Gkq+Nmw75lZe4e6o3EkSnkaBP5NF6+m5PTGAr9JP43N3LyeoglsA==",
- "requires": {
- "bn.js": "^4.11.8",
- "ethereumjs-util": "^6.0.0"
- },
- "dependencies": {
- "@types/bn.js": {
- "version": "4.11.6",
- "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-4.11.6.tgz",
- "integrity": "sha512-pqr857jrp2kPuO9uRjZ3PwnJTjoQy+fcdxvBTvHm6dkmEL9q+hDD/2j/0ELOBPtPnS8LjCX0gI9nbl8lVkadpg==",
- "requires": {
- "@types/node": "*"
- }
- },
- "bn.js": {
- "version": "4.12.0",
- "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz",
- "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA=="
- },
- "ethereumjs-util": {
- "version": "6.2.1",
- "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-6.2.1.tgz",
- "integrity": "sha512-W2Ktez4L01Vexijrm5EB6w7dg4n/TgpoYU4avuT5T3Vmnw/eCRtiBrJfQYS/DCSvDIOLn2k57GcHdeBcgVxAqw==",
- "requires": {
- "@types/bn.js": "^4.11.3",
- "bn.js": "^4.11.0",
- "create-hash": "^1.1.2",
- "elliptic": "^6.5.2",
- "ethereum-cryptography": "^0.1.3",
- "ethjs-util": "0.1.6",
- "rlp": "^2.2.3"
- }
- }
- }
- },
- "ethereumjs-tx": {
- "version": "1.3.7",
- "resolved": "https://registry.npmjs.org/ethereumjs-tx/-/ethereumjs-tx-1.3.7.tgz",
- "integrity": "sha512-wvLMxzt1RPhAQ9Yi3/HKZTn0FZYpnsmQdbKYfUUpi4j1SEIcbkd9tndVjcPrufY3V7j2IebOpC00Zp2P/Ay2kA==",
- "requires": {
- "ethereum-common": "^0.0.18",
- "ethereumjs-util": "^5.0.0"
- },
- "dependencies": {
- "bn.js": {
- "version": "4.12.0",
- "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz",
- "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA=="
- },
- "ethereumjs-util": {
- "version": "5.2.1",
- "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-5.2.1.tgz",
- "integrity": "sha512-v3kT+7zdyCm1HIqWlLNrHGqHGLpGYIhjeHxQjnDXjLT2FyGJDsd3LWMYUo7pAFRrk86CR3nUJfhC81CCoJNNGQ==",
- "requires": {
- "bn.js": "^4.11.0",
- "create-hash": "^1.1.2",
- "elliptic": "^6.5.2",
- "ethereum-cryptography": "^0.1.3",
- "ethjs-util": "^0.1.3",
- "rlp": "^2.0.0",
- "safe-buffer": "^5.1.1"
- }
- }
- }
- },
"ethereumjs-util": {
"version": "7.1.4",
"resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-7.1.4.tgz",
}
}
},
- "ethjs-util": {
- "version": "0.1.6",
- "resolved": "https://registry.npmjs.org/ethjs-util/-/ethjs-util-0.1.6.tgz",
- "integrity": "sha512-CUnVOQq7gSpDHZVVrQW8ExxUETWrnrvXYvYz55wOU8Uj4VCgw56XC2B/fVqQN+f7gmrnRHSLVnFAwsCuNwji8w==",
- "requires": {
- "is-hex-prefixed": "1.0.0",
- "strip-hex-prefix": "1.0.0"
- }
- },
"events": {
"version": "3.3.0",
"resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz",
"is-extglob": "^2.1.1"
}
},
- "is-hex-prefixed": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/is-hex-prefixed/-/is-hex-prefixed-1.0.0.tgz",
- "integrity": "sha1-fY035q135dEnFIkTxXPggtd39VQ="
- },
"is-number": {
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
"integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==",
"dev": true
},
- "strip-hex-prefix": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/strip-hex-prefix/-/strip-hex-prefix-1.0.0.tgz",
- "integrity": "sha1-DF8VX+8RUTczd96du1iNoFUA428=",
- "requires": {
- "is-hex-prefixed": "1.0.0"
- }
- },
"supports-color": {
"version": "5.5.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
"integrity": "sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY=",
"dev": true
},
- "tweetnacl": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-1.0.3.tgz",
- "integrity": "sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw=="
- },
- "tweetnacl-util": {
- "version": "0.15.1",
- "resolved": "https://registry.npmjs.org/tweetnacl-util/-/tweetnacl-util-0.15.1.tgz",
- "integrity": "sha512-RKJBIj8lySrShN4w6i/BonWp2Z/uxwC3h4y7xsRrpP59ZboCd0GpEVsOnMDYLMmKBpYhb5TgHzZXy7wTfYFBRw=="
- },
"type-fest": {
"version": "0.6.0",
"resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz",

MODIFY
package.json
package.json
"homepage": "https://github.com/maticnetwork/matic.js#readme",
"dependencies": {
"@ethereumjs/block": "^3.6.2",
- "eth-sig-util": "^2.5.3",
- "ethereumjs-tx": "1.3.7",
"ethereumjs-util": "^7.1.4",
"merkle-patricia-tree": "^4.2.4",
"node-fetch": "^2.6.1"

MODIFY
webpack/webpack.node.config.js
webpack/webpack.node.config.js
@@ -8,7 +8,8 @@ exports.default = webpackMerge(webpackBaseConfig, {
'ethereumjs-util': 'ethereumjs-util',
'bn.js': 'bn.js',
'eth-sig-util': 'eth-sig-util',
- 'ethereumjs-block': 'ethereumjs-block',
+ '@ethereumjs/block': '@ethereumjs/block',
+ '@ethereumjs/common': '@ethereumjs/common',
'ethereumjs-tx': 'ethereumjs-tx',
'ethereumjs-util': 'ethereumjs-util',
'merkle-patricia-tree': 'merkle-patricia-tree',

rm unused package, optimize size