Я не знаю как ее исправить, подскажите в чем может быть дело? Я установил web3 - "web3": "^1.6.1"
Вот сама ошибка:
constants.ts:29 Uncaught TypeError: Cannot read properties of undefined (reading 'from')
at node_modules/ethereumjs-util/dist.browser/constants.js (constants.ts:29)
at __require2 (chunk-324L4WHD.js?v=6750091b:48)
at node_modules/ethereumjs-util/dist.browser/index.js (index.ts:4)
at __require2 (chunk-324L4WHD.js?v=6750091b:48)
at node_modules/web3-utils/lib/utils.js (utils.js:25)
at __require2 (chunk-324L4WHD.js?v=6750091b:48)
at node_modules/web3-utils/lib/index.js (index.js:24)
at __require2 (chunk-324L4WHD.js?v=6750091b:48)
at node_modules/web3-core-helpers/lib/formatters.js (formatters.js:24)
at __require2 (chunk-324L4WHD.js?v=6750091b:48)
Вот мой код:
import Web3 from "web3";
export const Account = ({ id }) => {
const balance = new web3.eth.Contract([], id, {
from: "0x1234567890123456789012345678901234567891", // default from address
gasPrice: "20000000000", // default gas price in wei, 20 gwei in this case
});
return <div>test</div>;
};