ContrageExeCutionError: ошибка произошла при попытке выполнить функцию внутри интеллектуального контракта
at function._isReverted (/users/giangtrinh/desktop/spaint -bot/node_modules/web3-core/lib/commonjs/web3_request_manager.js: 328: 19)
at web3requestmanager._processjsonrpcresponse (/users/giangtrinh/desktop/spectre-bot/node_modules/web3-core/lib/common /web3_request_manager.js:280:42)
at web3requestmanager. (/Users/giangtrinh/desktop/spectre-bot/node_modules/web3-core/lib/commonjs/web3_request_manager.js:167:29)
at generator.next ()
at fulfited (/users/ giangtrinh/desktop/spectre-bot/node_modules/web3-core/lib/commonjs/web3_request_manager.js: 21: 58)
at processticksandrejections (узел: внутренний/процесс/task_queues: 96: 5) {
Причина: [EIP838ExecutionError: выполнение возвращено] {
Причина: не определен,
code: -32000,
квитанция: не определен,
data: undefined
},
Код: 310,
квитанция: не определен
} < /p>
Вот мой код: < /p>
Код: Выделить всё
const tokenContract = new web3.eth.Contract(ERC20_ABI, tokenInfo.address, {
from: account,
gasPrice: '20000000000'
});
tokenContract.methods
.burn(stringAmount)
.send({
from: account,
chainId: chainId,
value: 0,
gasPrice,
})
.on("transactionHash", (hash) => {
console.log('hash', hash);
})
Подробнее здесь: https://stackoverflow.com/questions/794 ... ith-web3js
Мобильная версия