update ethereumjs-block and merkle-patricia-tree
MODIFY
package-lock.json
package-lock.json
{
"name": "@maticnetwork/maticjs",
- "version": "3.0.0-beta.14",
+ "version": "3.2.5",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"integrity": "sha512-Fxt+AfXgjMoin2maPIYzFZnQjAXjAL0PHscM5pRTtatFqB+vZxAM9tLp2Optnuw3QOQC40jTNeGYFOMvyf7v9g==",
"dev": true
},
+ "@ethereumjs/block": {
+ "version": "3.6.2",
+ "resolved": "https://registry.npmjs.org/@ethereumjs/block/-/block-3.6.2.tgz",
+ "integrity": "sha512-mOqYWwMlAZpYUEOEqt7EfMFuVL2eyLqWWIzcf4odn6QgXY8jBI2NhVuJncrMCKeMZrsJAe7/auaRRB6YcdH+Qw==",
+ "requires": {
+ "@ethereumjs/common": "^2.6.3",
+ "@ethereumjs/tx": "^3.5.1",
+ "ethereumjs-util": "^7.1.4",
+ "merkle-patricia-tree": "^4.2.4"
+ },
+ "dependencies": {
+ "bn.js": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.0.tgz",
+ "integrity": "sha512-D7iWRBvnZE8ecXiLj/9wbxH7Tk79fAh8IHaTNq1RWRixsS02W+5qS+iE9yq6RYl0asXx5tw0bLhmT5pIfbSquw=="
+ },
+ "ethereumjs-util": {
+ "version": "7.1.4",
+ "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-7.1.4.tgz",
+ "integrity": "sha512-p6KmuPCX4mZIqsQzXfmSx9Y0l2hqf+VkAiwSisW3UKUFdk8ZkAt+AYaor83z2nSi6CU2zSsXMlD80hAbNEGM0A==",
+ "requires": {
+ "@types/bn.js": "^5.1.0",
+ "bn.js": "^5.1.2",
+ "create-hash": "^1.1.2",
+ "ethereum-cryptography": "^0.1.3",
+ "rlp": "^2.2.4"
+ }
+ },
+ "level-ws": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/level-ws/-/level-ws-2.0.0.tgz",
+ "integrity": "sha512-1iv7VXx0G9ec1isqQZ7y5LmoZo/ewAsyDHNA8EFDW5hqH2Kqovm33nSFkSdnLLAK+I5FlT+lo5Cw9itGe+CpQA==",
+ "requires": {
+ "inherits": "^2.0.3",
+ "readable-stream": "^3.1.0",
+ "xtend": "^4.0.1"
+ }
+ },
+ "merkle-patricia-tree": {
+ "version": "4.2.4",
+ "resolved": "https://registry.npmjs.org/merkle-patricia-tree/-/merkle-patricia-tree-4.2.4.tgz",
+ "integrity": "sha512-eHbf/BG6eGNsqqfbLED9rIqbsF4+sykEaBn6OLNs71tjclbMcMOk1tEPmJKcNcNCLkvbpY/lwyOlizWsqPNo8w==",
+ "requires": {
+ "@types/levelup": "^4.3.0",
+ "ethereumjs-util": "^7.1.4",
+ "level-mem": "^5.0.1",
+ "level-ws": "^2.0.0",
+ "readable-stream": "^3.6.0",
+ "semaphore-async-await": "^1.5.1"
+ }
+ },
+ "xtend": {
+ "version": "4.0.2",
+ "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz",
+ "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ=="
+ }
+ }
+ },
+ "@ethereumjs/common": {
+ "version": "2.6.4",
+ "resolved": "https://registry.npmjs.org/@ethereumjs/common/-/common-2.6.4.tgz",
+ "integrity": "sha512-RDJh/R/EAr+B7ZRg5LfJ0BIpf/1LydFgYdvZEuTraojCbVypO2sQ+QnpP5u2wJf9DASyooKqu8O4FJEWUV6NXw==",
+ "requires": {
+ "crc-32": "^1.2.0",
+ "ethereumjs-util": "^7.1.4"
+ },
+ "dependencies": {
+ "bn.js": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.0.tgz",
+ "integrity": "sha512-D7iWRBvnZE8ecXiLj/9wbxH7Tk79fAh8IHaTNq1RWRixsS02W+5qS+iE9yq6RYl0asXx5tw0bLhmT5pIfbSquw=="
+ },
+ "ethereumjs-util": {
+ "version": "7.1.4",
+ "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-7.1.4.tgz",
+ "integrity": "sha512-p6KmuPCX4mZIqsQzXfmSx9Y0l2hqf+VkAiwSisW3UKUFdk8ZkAt+AYaor83z2nSi6CU2zSsXMlD80hAbNEGM0A==",
+ "requires": {
+ "@types/bn.js": "^5.1.0",
+ "bn.js": "^5.1.2",
+ "create-hash": "^1.1.2",
+ "ethereum-cryptography": "^0.1.3",
+ "rlp": "^2.2.4"
+ }
+ }
+ }
+ },
+ "@ethereumjs/tx": {
+ "version": "3.5.1",
+ "resolved": "https://registry.npmjs.org/@ethereumjs/tx/-/tx-3.5.1.tgz",
+ "integrity": "sha512-xzDrTiu4sqZXUcaBxJ4n4W5FrppwxLxZB4ZDGVLtxSQR4lVuOnFR6RcUHdg1mpUhAPVrmnzLJpxaeXnPxIyhWA==",
+ "requires": {
+ "@ethereumjs/common": "^2.6.3",
+ "ethereumjs-util": "^7.1.4"
+ },
+ "dependencies": {
+ "bn.js": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.0.tgz",
+ "integrity": "sha512-D7iWRBvnZE8ecXiLj/9wbxH7Tk79fAh8IHaTNq1RWRixsS02W+5qS+iE9yq6RYl0asXx5tw0bLhmT5pIfbSquw=="
+ },
+ "ethereumjs-util": {
+ "version": "7.1.4",
+ "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-7.1.4.tgz",
+ "integrity": "sha512-p6KmuPCX4mZIqsQzXfmSx9Y0l2hqf+VkAiwSisW3UKUFdk8ZkAt+AYaor83z2nSi6CU2zSsXMlD80hAbNEGM0A==",
+ "requires": {
+ "@types/bn.js": "^5.1.0",
+ "bn.js": "^5.1.2",
+ "create-hash": "^1.1.2",
+ "ethereum-cryptography": "^0.1.3",
+ "rlp": "^2.2.4"
+ }
+ }
+ }
+ },
"@nodelib/fs.scandir": {
"version": "2.1.4",
"resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.4.tgz",
"any-observable": "^0.3.0"
}
},
+ "@types/abstract-leveldown": {
+ "version": "7.2.0",
+ "resolved": "https://registry.npmjs.org/@types/abstract-leveldown/-/abstract-leveldown-7.2.0.tgz",
+ "integrity": "sha512-q5veSX6zjUy/DlDhR4Y4cU0k2Ar+DT2LUraP00T19WLmTO6Se1djepCCaqU6nQrwcJ5Hyo/CWqxTzrrFg8eqbQ=="
+ },
+ "@types/bn.js": {
+ "version": "5.1.0",
+ "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-5.1.0.tgz",
+ "integrity": "sha512-QSSVYj7pYFN49kW77o2s9xTCwZ8F2xLbjLLSEVh8D2F4JUhZtPAGOFLTD+ffqksBx/u4cE/KImFjyhqCjn/LIA==",
+ "requires": {
+ "@types/node": "*"
+ }
+ },
"@types/eslint-visitor-keys": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/@types/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz",
"integrity": "sha512-OCutwjDZ4aFS6PB1UZ988C4YgwlBHJd6wCeQqaLdmadZ/7e+w79+hbMUFC1QXDNCmdyoRfAFdm0RypzwR+Qpag==",
"dev": true
},
- "@types/ethereumjs-util": {
- "version": "6.1.0",
- "resolved": "https://registry.npmjs.org/@types/ethereumjs-util/-/ethereumjs-util-6.1.0.tgz",
- "integrity": "sha512-5N0RJldhKCKwDksdnuNHbEJuwO5pjEdtwdHj/kZLxaS84s5R1NLgYfAuDF/VZ4whYABJJvv+o0O8TXLm+F/Byw==",
- "dev": true,
- "requires": {
- "ethereumjs-util": "*"
- }
- },
"@types/json-schema": {
"version": "7.0.7",
"resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.7.tgz",
"integrity": "sha512-cxWFQVseBm6O9Gbw1IWb8r6OS4OhSt3hPZLkFApLjM8TEXROBuQGLAH2i2gZpcXdLBIrpXuTDhH7Vbm1iXmNGA==",
"dev": true
},
+ "@types/level-errors": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/@types/level-errors/-/level-errors-3.0.0.tgz",
+ "integrity": "sha512-/lMtoq/Cf/2DVOm6zE6ORyOM+3ZVm/BvzEZVxUhf6bgh8ZHglXlBqxbxSlJeVp8FCbD3IVvk/VbsaNmDjrQvqQ=="
+ },
+ "@types/levelup": {
+ "version": "4.3.3",
+ "resolved": "https://registry.npmjs.org/@types/levelup/-/levelup-4.3.3.tgz",
+ "integrity": "sha512-K+OTIjJcZHVlZQN1HmU64VtrC0jC3dXWQozuEIR9zVvltIk90zaGPM2AgT+fIkChpzHhFE3YnvFLCbLtzAmexA==",
+ "requires": {
+ "@types/abstract-leveldown": "*",
+ "@types/level-errors": "*",
+ "@types/node": "*"
+ }
+ },
"@types/node": {
"version": "15.6.0",
"resolved": "https://registry.npmjs.org/@types/node/-/node-15.6.0.tgz",
"integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==",
"dev": true
},
- "abstract-leveldown": {
- "version": "2.6.3",
- "resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-2.6.3.tgz",
- "integrity": "sha512-2++wDf/DYqkPR3o5tbfdhF96EfMApo1GpPfzOsR/ZYXdkSmELlvOOEAl9iKkRsktMPHdGjO4rtkBpf2I7TiTeA==",
- "requires": {
- "xtend": "~4.0.0"
- },
- "dependencies": {
- "xtend": {
- "version": "4.0.2",
- "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz",
- "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ=="
- }
- }
- },
"acorn": {
"version": "6.4.2",
"resolved": "https://registry.npmjs.org/acorn/-/acorn-6.4.2.tgz",
"version": "2.6.3",
"resolved": "https://registry.npmjs.org/async/-/async-2.6.3.tgz",
"integrity": "sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg==",
+ "dev": true,
"requires": {
"lodash": "^4.17.14"
}
"base64-js": {
"version": "1.5.1",
"resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz",
- "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==",
- "dev": true
+ "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA=="
},
"big.js": {
"version": "5.2.2",
"safe-buffer": "^5.1.2"
}
},
+ "buffer": {
+ "version": "5.7.1",
+ "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz",
+ "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==",
+ "requires": {
+ "base64-js": "^1.3.1",
+ "ieee754": "^1.1.13"
+ }
+ },
"buffer-from": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz",
"core-util-is": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
- "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac="
+ "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=",
+ "dev": true
},
"cosmiconfig": {
"version": "5.2.1",
}
}
},
+ "crc-32": {
+ "version": "1.2.2",
+ "resolved": "https://registry.npmjs.org/crc-32/-/crc-32-1.2.2.tgz",
+ "integrity": "sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ=="
+ },
"create-ecdh": {
"version": "4.0.4",
"resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.4.tgz",
"integrity": "sha1-JJXduvbrh0q7Dhvp3yLS5aVEMmw=",
"dev": true
},
- "deferred-leveldown": {
- "version": "1.2.2",
- "resolved": "https://registry.npmjs.org/deferred-leveldown/-/deferred-leveldown-1.2.2.tgz",
- "integrity": "sha512-uukrWD2bguRtXilKt6cAWKyoXrTSMo5m7crUdLfWQmu8kIm88w3QZoUL+6nhpfKVmhHANER6Re3sKoNoZ3IKMA==",
- "requires": {
- "abstract-leveldown": "~2.6.0"
- }
- },
"define-property": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz",
"integrity": "sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==",
"dev": true
},
+ "encoding-down": {
+ "version": "6.3.0",
+ "resolved": "https://registry.npmjs.org/encoding-down/-/encoding-down-6.3.0.tgz",
+ "integrity": "sha512-QKrV0iKR6MZVJV08QY0wp1e7vF6QbhnbQhb07bwpEyuz4uZiZgPlEGdkCROuFkUwdxlFaiPIhjyarH1ee/3vhw==",
+ "requires": {
+ "abstract-leveldown": "^6.2.1",
+ "inherits": "^2.0.3",
+ "level-codec": "^9.0.0",
+ "level-errors": "^2.0.0"
+ },
+ "dependencies": {
+ "abstract-leveldown": {
+ "version": "6.3.0",
+ "resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-6.3.0.tgz",
+ "integrity": "sha512-TU5nlYgta8YrBMNpc9FwQzRbiXsj49gsALsXadbGHt9CROPzX5fB0rWDR5mtdpOOKa5XqRFpbj1QroPAoPzVjQ==",
+ "requires": {
+ "buffer": "^5.5.0",
+ "immediate": "^3.2.3",
+ "level-concat-iterator": "~2.0.0",
+ "level-supports": "~1.0.0",
+ "xtend": "~4.0.0"
+ }
+ },
+ "level-codec": {
+ "version": "9.0.2",
+ "resolved": "https://registry.npmjs.org/level-codec/-/level-codec-9.0.2.tgz",
+ "integrity": "sha512-UyIwNb1lJBChJnGfjmO0OR+ezh2iVu1Kas3nvBS/BzGnx79dv6g7unpKIDNPMhfdTEGoc7mC8uAu51XEtX+FHQ==",
+ "requires": {
+ "buffer": "^5.6.0"
+ }
+ },
+ "level-errors": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/level-errors/-/level-errors-2.0.1.tgz",
+ "integrity": "sha512-UVprBJXite4gPS+3VznfgDSU8PTRuVX0NXwoWW50KLxd2yw4Y1t2JUR5In1itQnudZqRMT9DlAM3Q//9NCjCFw==",
+ "requires": {
+ "errno": "~0.1.1"
+ }
+ },
+ "xtend": {
+ "version": "4.0.2",
+ "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz",
+ "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ=="
+ }
+ }
+ },
"end-of-stream": {
"version": "1.4.4",
"resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz",
}
}
},
- "ethereumjs-block": {
- "version": "2.2.0",
- "resolved": "https://registry.npmjs.org/ethereumjs-block/-/ethereumjs-block-2.2.0.tgz",
- "integrity": "sha512-Ye+uG/L2wrp364Zihdlr/GfC3ft+zG8PdHcRtsBFNNH1CkOhxOwdB8friBU85n89uRZ9eIMAywCq0F4CwT1wAw==",
- "requires": {
- "async": "^2.0.1",
- "ethereumjs-common": "^1.1.0",
- "ethereumjs-tx": "^1.2.2",
- "ethereumjs-util": "^5.0.0",
- "merkle-patricia-tree": "^2.1.2"
- }
- },
- "ethereumjs-common": {
- "version": "1.5.2",
- "resolved": "https://registry.npmjs.org/ethereumjs-common/-/ethereumjs-common-1.5.2.tgz",
- "integrity": "sha512-hTfZjwGX52GS2jcVO6E2sx4YuFnf0Fhp5ylo4pEPhEffNln7vS59Hr5sLnp3/QCazFLluuBZ+FZ6J5HTp0EqCA=="
- },
"ethereumjs-tx": {
"version": "1.3.7",
"resolved": "https://registry.npmjs.org/ethereumjs-tx/-/ethereumjs-tx-1.3.7.tgz",
"ieee754": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz",
- "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==",
- "dev": true
+ "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA=="
},
"iferr": {
"version": "0.1.5",
"integrity": "sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0=",
"dev": true
},
- "isarray": {
- "version": "0.0.1",
- "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz",
- "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8="
- },
"isexe": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
"invert-kv": "^1.0.0"
}
},
- "level-codec": {
- "version": "7.0.1",
- "resolved": "https://registry.npmjs.org/level-codec/-/level-codec-7.0.1.tgz",
- "integrity": "sha512-Ua/R9B9r3RasXdRmOtd+t9TCOEIIlts+TN/7XTT2unhDaL6sJn83S3rUyljbr6lVtw49N3/yA0HHjpV6Kzb2aQ=="
+ "level-concat-iterator": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/level-concat-iterator/-/level-concat-iterator-2.0.1.tgz",
+ "integrity": "sha512-OTKKOqeav2QWcERMJR7IS9CUo1sHnke2C0gkSmcR7QuEtFNLLzHQAvnMw8ykvEcv0Qtkg0p7FOwP1v9e5Smdcw=="
},
- "level-errors": {
- "version": "1.0.5",
- "resolved": "https://registry.npmjs.org/level-errors/-/level-errors-1.0.5.tgz",
- "integrity": "sha512-/cLUpQduF6bNrWuAC4pwtUKA5t669pCsCi2XbmojG2tFeOr9j6ShtdDCtFFQO1DRt+EVZhx9gPzP9G2bUaG4ig==",
+ "level-mem": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/level-mem/-/level-mem-5.0.1.tgz",
+ "integrity": "sha512-qd+qUJHXsGSFoHTziptAKXoLX87QjR7v2KMbqncDXPxQuCdsQlzmyX+gwrEHhlzn08vkf8TyipYyMmiC6Gobzg==",
"requires": {
- "errno": "~0.1.1"
- }
+ "level-packager": "^5.0.3",
+ "memdown": "^5.0.0"
},
- "level-iterator-stream": {
- "version": "1.3.1",
- "resolved": "https://registry.npmjs.org/level-iterator-stream/-/level-iterator-stream-1.3.1.tgz",
- "integrity": "sha1-5Dt4sagUPm+pek9IXrjqUwNS8u0=",
+ "dependencies": {
+ "abstract-leveldown": {
+ "version": "6.2.3",
+ "resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-6.2.3.tgz",
+ "integrity": "sha512-BsLm5vFMRUrrLeCcRc+G0t2qOaTzpoJQLOubq2XM72eNpjF5UdU5o/5NvlNhx95XHcAvcl8OMXr4mlg/fRgUXQ==",
"requires": {
- "inherits": "^2.0.1",
- "level-errors": "^1.0.3",
- "readable-stream": "^1.0.33",
- "xtend": "^4.0.0"
+ "buffer": "^5.5.0",
+ "immediate": "^3.2.3",
+ "level-concat-iterator": "~2.0.0",
+ "level-supports": "~1.0.0",
+ "xtend": "~4.0.0"
+ }
},
- "dependencies": {
- "readable-stream": {
- "version": "1.1.14",
- "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz",
- "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=",
+ "immediate": {
+ "version": "3.2.3",
+ "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.2.3.tgz",
+ "integrity": "sha1-0UD6j2FGWb1lQSMwl92qwlzdmRw="
+ },
+ "memdown": {
+ "version": "5.1.0",
+ "resolved": "https://registry.npmjs.org/memdown/-/memdown-5.1.0.tgz",
+ "integrity": "sha512-B3J+UizMRAlEArDjWHTMmadet+UKwHd3UjMgGBkZcKAxAYVPS9o0Yeiha4qvz7iGiL2Sb3igUft6p7nbFWctpw==",
"requires": {
- "core-util-is": "~1.0.0",
+ "abstract-leveldown": "~6.2.1",
+ "functional-red-black-tree": "~1.0.1",
+ "immediate": "~3.2.3",
"inherits": "~2.0.1",
- "isarray": "0.0.1",
- "string_decoder": "~0.10.x"
+ "ltgt": "~2.2.0",
+ "safe-buffer": "~5.2.0"
}
},
- "string_decoder": {
- "version": "0.10.31",
- "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz",
- "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ="
- },
"xtend": {
"version": "4.0.2",
"resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz",
}
}
},
- "level-ws": {
- "version": "0.0.0",
- "resolved": "https://registry.npmjs.org/level-ws/-/level-ws-0.0.0.tgz",
- "integrity": "sha1-Ny5RIXeSSgBCSwtDrvK7QkltIos=",
+ "level-packager": {
+ "version": "5.1.1",
+ "resolved": "https://registry.npmjs.org/level-packager/-/level-packager-5.1.1.tgz",
+ "integrity": "sha512-HMwMaQPlTC1IlcwT3+swhqf/NUO+ZhXVz6TY1zZIIZlIR0YSn8GtAAWmIvKjNY16ZkEg/JcpAuQskxsXqC0yOQ==",
"requires": {
- "readable-stream": "~1.0.15",
- "xtend": "~2.1.1"
+ "encoding-down": "^6.3.0",
+ "levelup": "^4.3.2"
},
"dependencies": {
- "readable-stream": {
- "version": "1.0.34",
- "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz",
- "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=",
+ "abstract-leveldown": {
+ "version": "6.2.3",
+ "resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-6.2.3.tgz",
+ "integrity": "sha512-BsLm5vFMRUrrLeCcRc+G0t2qOaTzpoJQLOubq2XM72eNpjF5UdU5o/5NvlNhx95XHcAvcl8OMXr4mlg/fRgUXQ==",
"requires": {
- "core-util-is": "~1.0.0",
- "inherits": "~2.0.1",
- "isarray": "0.0.1",
- "string_decoder": "~0.10.x"
+ "buffer": "^5.5.0",
+ "immediate": "^3.2.3",
+ "level-concat-iterator": "~2.0.0",
+ "level-supports": "~1.0.0",
+ "xtend": "~4.0.0"
}
},
- "string_decoder": {
- "version": "0.10.31",
- "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz",
- "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ="
+ "deferred-leveldown": {
+ "version": "5.3.0",
+ "resolved": "https://registry.npmjs.org/deferred-leveldown/-/deferred-leveldown-5.3.0.tgz",
+ "integrity": "sha512-a59VOT+oDy7vtAbLRCZwWgxu2BaCfd5Hk7wxJd48ei7I+nsg8Orlb9CLG0PMZienk9BSUKgeAqkO2+Lw+1+Ukw==",
+ "requires": {
+ "abstract-leveldown": "~6.2.1",
+ "inherits": "^2.0.3"
+ }
+ },
+ "level-errors": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/level-errors/-/level-errors-2.0.1.tgz",
+ "integrity": "sha512-UVprBJXite4gPS+3VznfgDSU8PTRuVX0NXwoWW50KLxd2yw4Y1t2JUR5In1itQnudZqRMT9DlAM3Q//9NCjCFw==",
+ "requires": {
+ "errno": "~0.1.1"
}
+ },
+ "level-iterator-stream": {
+ "version": "4.0.2",
+ "resolved": "https://registry.npmjs.org/level-iterator-stream/-/level-iterator-stream-4.0.2.tgz",
+ "integrity": "sha512-ZSthfEqzGSOMWoUGhTXdX9jv26d32XJuHz/5YnuHZzH6wldfWMOVwI9TBtKcya4BKTyTt3XVA0A3cF3q5CY30Q==",
+ "requires": {
+ "inherits": "^2.0.4",
+ "readable-stream": "^3.4.0",
+ "xtend": "^4.0.2"
}
},
"levelup": {
- "version": "1.3.9",
- "resolved": "https://registry.npmjs.org/levelup/-/levelup-1.3.9.tgz",
- "integrity": "sha512-VVGHfKIlmw8w1XqpGOAGwq6sZm2WwWLmlDcULkKWQXEA5EopA8OBNJ2Ck2v6bdk8HeEZSbCSEgzXadyQFm76sQ==",
- "requires": {
- "deferred-leveldown": "~1.2.1",
- "level-codec": "~7.0.0",
- "level-errors": "~1.0.3",
- "level-iterator-stream": "~1.3.0",
- "prr": "~1.0.1",
- "semver": "~5.4.1",
+ "version": "4.4.0",
+ "resolved": "https://registry.npmjs.org/levelup/-/levelup-4.4.0.tgz",
+ "integrity": "sha512-94++VFO3qN95cM/d6eBXvd894oJE0w3cInq9USsyQzzoJxmiYzPAocNcuGCPGGjoXqDVJcr3C1jzt1TSjyaiLQ==",
+ "requires": {
+ "deferred-leveldown": "~5.3.0",
+ "level-errors": "~2.0.0",
+ "level-iterator-stream": "~4.0.0",
+ "level-supports": "~1.0.0",
"xtend": "~4.0.0"
+ }
+ },
+ "xtend": {
+ "version": "4.0.2",
+ "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz",
+ "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ=="
+ }
+ }
+ },
+ "level-supports": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/level-supports/-/level-supports-1.0.1.tgz",
+ "integrity": "sha512-rXM7GYnW8gsl1vedTJIbzOrRv85c/2uCMpiiCzO2fndd06U/kUXEEU9evYn4zFggBOg36IsBW8LzqIpETwwQzg==",
+ "requires": {
+ "xtend": "^4.0.2"
},
"dependencies": {
"xtend": {
}
}
},
+ "level-ws": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/level-ws/-/level-ws-2.0.0.tgz",
+ "integrity": "sha512-1iv7VXx0G9ec1isqQZ7y5LmoZo/ewAsyDHNA8EFDW5hqH2Kqovm33nSFkSdnLLAK+I5FlT+lo5Cw9itGe+CpQA==",
+ "requires": {
+ "inherits": "^2.0.3",
+ "readable-stream": "^3.1.0",
+ "xtend": "^4.0.1"
+ }
+ },
"lines-and-columns": {
"version": "1.1.6",
"resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.1.6.tgz",
"lodash": {
"version": "4.17.21",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
- "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg=="
+ "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==",
+ "dev": true
},
"log-symbols": {
"version": "2.2.0",
"safe-buffer": "^5.1.2"
}
},
- "memdown": {
- "version": "1.4.1",
- "resolved": "https://registry.npmjs.org/memdown/-/memdown-1.4.1.tgz",
- "integrity": "sha1-tOThkhdGZP+65BNhqlAPMRnv4hU=",
- "requires": {
- "abstract-leveldown": "~2.7.1",
- "functional-red-black-tree": "^1.0.1",
- "immediate": "^3.2.3",
- "inherits": "~2.0.1",
- "ltgt": "~2.2.0",
- "safe-buffer": "~5.1.1"
- },
- "dependencies": {
- "abstract-leveldown": {
- "version": "2.7.2",
- "resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-2.7.2.tgz",
- "integrity": "sha512-+OVvxH2rHVEhWLdbudP6p0+dNMXu8JA1CbhP19T8paTYAcX7oJ4OVjT+ZUVpv7mITxXHqDMej+GdqXBmXkw09w==",
- "requires": {
- "xtend": "~4.0.0"
- }
- },
- "safe-buffer": {
- "version": "5.1.2",
- "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
- "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
- },
- "xtend": {
- "version": "4.0.2",
- "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz",
- "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ=="
- }
- }
- },
"memory-fs": {
"version": "0.4.1",
"resolved": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.4.1.tgz",
"dev": true
},
"merkle-patricia-tree": {
- "version": "2.3.2",
- "resolved": "https://registry.npmjs.org/merkle-patricia-tree/-/merkle-patricia-tree-2.3.2.tgz",
- "integrity": "sha512-81PW5m8oz/pz3GvsAwbauj7Y00rqm81Tzad77tHBwU7pIAtN+TJnMSOJhxBKflSVYhptMMb9RskhqHqrSm1V+g==",
- "requires": {
- "async": "^1.4.2",
- "ethereumjs-util": "^5.0.0",
- "level-ws": "0.0.0",
- "levelup": "^1.2.1",
- "memdown": "^1.0.0",
- "readable-stream": "^2.0.0",
- "rlp": "^2.0.0",
- "semaphore": ">=1.0.1"
+ "version": "4.2.4",
+ "resolved": "https://registry.npmjs.org/merkle-patricia-tree/-/merkle-patricia-tree-4.2.4.tgz",
+ "integrity": "sha512-eHbf/BG6eGNsqqfbLED9rIqbsF4+sykEaBn6OLNs71tjclbMcMOk1tEPmJKcNcNCLkvbpY/lwyOlizWsqPNo8w==",
+ "requires": {
+ "@types/levelup": "^4.3.0",
+ "ethereumjs-util": "^7.1.4",
+ "level-mem": "^5.0.1",
+ "level-ws": "^2.0.0",
+ "readable-stream": "^3.6.0",
+ "semaphore-async-await": "^1.5.1"
},
"dependencies": {
- "async": {
- "version": "1.5.2",
- "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz",
- "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo="
- },
- "isarray": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
- "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE="
- },
- "readable-stream": {
- "version": "2.3.7",
- "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz",
- "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==",
- "requires": {
- "core-util-is": "~1.0.0",
- "inherits": "~2.0.3",
- "isarray": "~1.0.0",
- "process-nextick-args": "~2.0.0",
- "safe-buffer": "~5.1.1",
- "string_decoder": "~1.1.1",
- "util-deprecate": "~1.0.1"
- }
- },
- "safe-buffer": {
- "version": "5.1.2",
- "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
- "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
+ "bn.js": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.0.tgz",
+ "integrity": "sha512-D7iWRBvnZE8ecXiLj/9wbxH7Tk79fAh8IHaTNq1RWRixsS02W+5qS+iE9yq6RYl0asXx5tw0bLhmT5pIfbSquw=="
},
- "string_decoder": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
- "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
+ "ethereumjs-util": {
+ "version": "7.1.4",
+ "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-7.1.4.tgz",
+ "integrity": "sha512-p6KmuPCX4mZIqsQzXfmSx9Y0l2hqf+VkAiwSisW3UKUFdk8ZkAt+AYaor83z2nSi6CU2zSsXMlD80hAbNEGM0A==",
"requires": {
- "safe-buffer": "~5.1.0"
+ "@types/bn.js": "^5.1.0",
+ "bn.js": "^5.1.2",
+ "create-hash": "^1.1.2",
+ "ethereum-cryptography": "^0.1.3",
+ "rlp": "^2.2.4"
}
}
}
}
}
},
- "object-keys": {
- "version": "0.4.0",
- "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-0.4.0.tgz",
- "integrity": "sha1-KKaq50KN0sOpLz2V8hM13SBOAzY="
- },
"object-visit": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz",
"process-nextick-args": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz",
- "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag=="
+ "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==",
+ "dev": true
},
"promise-inflight": {
"version": "1.0.1",
"node-gyp-build": "^4.2.0"
}
},
- "semaphore": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/semaphore/-/semaphore-1.1.0.tgz",
- "integrity": "sha512-O4OZEaNtkMd/K0i6js9SL+gqy0ZCBMgUvlSqHKi4IBdjhe7wB8pwztUk1BbZ1fmrvpwFrPbHzqd2w5pTcJH6LA=="
+ "semaphore-async-await": {
+ "version": "1.5.1",
+ "resolved": "https://registry.npmjs.org/semaphore-async-await/-/semaphore-async-await-1.5.1.tgz",
+ "integrity": "sha1-hXvvXjZEYBykuVcLh+nfXKEpdPo="
},
"semver": {
"version": "5.4.1",
"resolved": "https://registry.npmjs.org/semver/-/semver-5.4.1.tgz",
- "integrity": "sha512-WfG/X9+oATh81XtllIo/I8gOiY9EXRdv1cQdyykeXK17YcUW3EXUAi2To4pcH6nZtJPr7ZOpM5OMyWJZm+8Rsg=="
+ "integrity": "sha512-WfG/X9+oATh81XtllIo/I8gOiY9EXRdv1cQdyykeXK17YcUW3EXUAi2To4pcH6nZtJPr7ZOpM5OMyWJZm+8Rsg==",
+ "dev": true
},
"semver-compare": {
"version": "1.0.0",
"dev": true
},
"ts-loader": {
- "version": "7.0.5",
- "resolved": "https://registry.npmjs.org/ts-loader/-/ts-loader-7.0.5.tgz",
- "integrity": "sha512-zXypEIT6k3oTc+OZNx/cqElrsbBtYqDknf48OZos0NQ3RTt045fBIU8RRSu+suObBzYB355aIPGOe/3kj9h7Ig==",
+ "version": "8.0.0",
+ "resolved": "https://registry.npmjs.org/ts-loader/-/ts-loader-8.0.0.tgz",
+ "integrity": "sha512-giEW167rtK1V6eX/DnXEtOgcawwoIp6hqznqYNNSmraUZOq36zMhwBq12JMlYhxf50BC58bscsTSKKtE42zAuw==",
"dev": true,
"requires": {
"chalk": "^2.3.0",
"dev": true
},
"typescript": {
- "version": "3.9.9",
- "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.9.tgz",
- "integrity": "sha512-kdMjTiekY+z/ubJCATUPlRDl39vXYiMV9iyeMuEuXZh2we6zz80uovNN2WlAxmmdE/Z/YQe+EbOEXB5RHEED3w==",
+ "version": "4.6.3",
+ "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.6.3.tgz",
+ "integrity": "sha512-yNIatDa5iaofVozS/uQJEl3JRWLKKGJKh6Yaiv0GLGSuhpFJe7P3SbHZ8/yjAHRQwKRoA6YZqlfjXWmVzoVSMw==",
"dev": true
},
"uglify-js": {
"dev": true
},
"xtend": {
- "version": "2.1.2",
- "resolved": "https://registry.npmjs.org/xtend/-/xtend-2.1.2.tgz",
- "integrity": "sha1-bv7MKk2tjmlixJAbM3znuoe10os=",
- "requires": {
- "object-keys": "~0.4.0"
- }
+ "version": "4.0.2",
+ "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz",
+ "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ=="
},
"y18n": {
"version": "3.2.2",

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-block": "2.2.0",
"ethereumjs-tx": "1.3.7",
"ethereumjs-util": "^5.2.0",
- "merkle-patricia-tree": "2.3.2",
+ "merkle-patricia-tree": "^4.2.4",
"node-fetch": "^2.6.1"
},
"devDependencies": {
- "@types/ethereumjs-util": "^6.1.0",
"@types/node-fetch": "^2.5.12",
"@typescript-eslint/eslint-plugin": "^2.16.0",
"@typescript-eslint/parser": "^2.16.0",
"husky": "2.4.1",
"lint-staged": "8.2.1",
"smart-banner-webpack-plugin": "^3.0.1",
- "ts-loader": "^7.0.1",
+ "ts-loader": "^8.0.0",
"tslint": "^6.1.3",
- "typescript": "^3.8.3",
+ "typescript": "^4.6.3",
"webpack": "^4.43.0",
"webpack-cli": "^4.2.0",
"webpack-merge": "^4.2.2"

MODIFY
src/utils/proof_util.ts
src/utils/proof_util.ts
@@ -3,9 +3,11 @@ import { MerkleTree } from "./merkle_tree";
import ethUtils from "ethereumjs-util";
import { ITransactionReceipt, IBlock, IBlockWithTransaction } from "../interfaces";
import { mapPromise } from "./map_promise";
-const TRIE = require('merkle-patricia-tree');
+// const TRIE = require('merkle-patricia-tree');
+import { BaseTrie as TRIE } from 'merkle-patricia-tree';
const rlp = ethUtils.rlp;
-import EthereumBlock from 'ethereumjs-block/from-rpc';
+// import EthereumBlock from 'ethereumjs-block/from-rpc';
+import { Block as EthereumBlock } from '@ethereumjs/block';
import { Converter, promiseResolve, utils } from "..";
// Implementation adapted from Tom French's `matic-proofs` library used under MIT License
@@ -149,39 +151,57 @@ export class ProofUtil {
receipts.map(siblingReceipt => {
const path = rlp.encode(siblingReceipt.transactionIndex);
const rawReceipt = ProofUtil.getReceiptBytes(siblingReceipt);
- return new Promise((resolve, reject) => {
- receiptsTrie.put(path, rawReceipt, err => {
- if (err) {
- reject(err);
- } else {
- resolve({});
- }
- });
- });
+ return receiptsTrie.put(path, rawReceipt);
+ // return new Promise((resolve, reject) => {
+ // receiptsTrie.put(path, rawReceipt, err => {
+ // if (err) {
+ // reject(err);
+ // } else {
+ // resolve({});
+ // }
+ // });
+ // });
})
);
}).then(_ => {
+ return receiptsTrie.findPath(rlp.encode(receipt.transactionIndex), true);
// promise
- return new Promise((resolve, reject) => {
- receiptsTrie.findPath(rlp.encode(receipt.transactionIndex), (err, rawReceiptNode, reminder, stack) => {
- if (err) {
- return reject(err);
- }
+ // return new Promise((resolve, reject) => {
+ // receiptsTrie.findPath(rlp.encode(receipt.transactionIndex), true).then(result => {
+ // result.node.value
+ // })
+ // receiptsTrie.findPath(rlp.encode(receipt.transactionIndex), (err, rawReceiptNode, reminder, stack) => {
+ // if (err) {
+ // return reject(err);
+ // }
- if (reminder.length > 0) {
- return reject(new Error('Node does not contain the key'));
- }
+ // if (reminder.length > 0) {
+ // return reject(new Error('Node does not contain the key'));
+ // }
+ // const prf = {
+ // blockHash: ethUtils.toBuffer(receipt.blockHash),
+ // parentNodes: stack.map(s => s.raw),
+ // root: ProofUtil.getRawHeader(block).receiptTrie,
+ // path: rlp.encode(receipt.transactionIndex),
+ // value: ProofUtil.isTypedReceipt(receipt) ? rawReceiptNode.value : rlp.decode(rawReceiptNode.value)
+ // };
+ // resolve(prf);
+ // });
+ // });
+ }).then(result => {
+ if (result.remaining.length > 0) {
+ throw new Error('Node does not contain the key');
+ }
+ // result.node.value
const prf = {
blockHash: ethUtils.toBuffer(receipt.blockHash),
- parentNodes: stack.map(s => s.raw),
+ parentNodes: result.stack.map(s => s.raw),
root: ProofUtil.getRawHeader(block).receiptTrie,
path: rlp.encode(receipt.transactionIndex),
- value: ProofUtil.isTypedReceipt(receipt) ? rawReceiptNode.value : rlp.decode(rawReceiptNode.value)
+ value: ProofUtil.isTypedReceipt(receipt) ? result.node.value : rlp.decode(result.node.value)
};
- resolve(prf);
- });
- });
+ return prf;
});
}

MODIFY
test/debug.js
test/debug.js
@@ -43,11 +43,11 @@ const execute = async () => {
// setProofApi("https://apis.matic.network");
- // var result = await goerliERC20Token.withdrawExitFaster('0x1c20c41b9d97d1026aa456a21f13725df63edec1b1f43aacb180ebcc6340a2d3', {
- // returnTransaction: true
- // });
+ var result = await goerliERC20Token.withdrawExit('0x1c20c41b9d97d1026aa456a21f13725df63edec1b1f43aacb180ebcc6340a2d3', {
+ returnTransaction: true
+ });
- // return console.log('result', result);
+ return console.log('result', result);
// return console.log(await client.isDeposited('0x05b6d0d2280557c04de48d395f1f4ea9deb498fabb9bb09b9aec929db5ce62fa'));

update ethereumjs-block and merkle-patricia-tree