#javascript #node.js #ethereum #solidity
Вопрос:
Это node.js код, пожалуйста, решить мою проблему, я новичок в солидности пожалуйста, скажите, что я могу сделать, чтобы решить этот смарт контракт адрес здесь:https://ropsten.etherscan.io/address/0xc1eabbead39fb8abbba23311858f3df0787ac8a8 вы можете увидеть те ошибки, но когда я развернуть мой контракт в Remix IDE, и я перешел к depolyed контракта раздел I работает хорошо
const nonce = await web3.eth.getTransactionCount(publicKey, 'latest'); // get latest nonce
let m = await contract.methods.mint(publicKey,_tokenId,_tokenUri).send({
from: myAccount.address,
gas: 800000,
nonce: nonce
})
console.log(m)
}
mint(publicKey,_tokenId,_tokenUri)```
I get This Error in my terminal
node nftint.js
(node:2540) UnhandledPromiseRejectionWarning: Error: Transaction has been reverted by the EVM:
{
"blockHash": "0x541a6738aca11b28f8af13cfcf9590658984f587626b26ba3c49ed6038093756",
"blockNumber": 11243999,
"contractAddress": null,
"cumulativeGasUsed": 1821965,
"effectiveGasPrice": "0x77359401",
"from": "0x913b845d1f509a52271ff3b7d107dd65e70fabab",
"gasUsed": 25743,
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"status": false,
"to": "0xc1eabbead39fb8abbba23311858f3df0787ac8a8",
"transactionHash": "0xa9b892dc5fd86c3fa75fe2bcb0a908d9481cd5924a7afecadb0d153efbf76f55",
"transactionIndex": 43,
"type": "0x0",
"events": {}
}
at Object.TransactionError (C:UsersjashanDownloadsnewprojgetter-setternode_modulesweb3-core-helperssrcerrors.js:63:21)
at Object.TransactionRevertedWithoutReasonError (C:UsersjashanDownloadsnewprojgetter-setternode_modulesweb3-core-helperssrcerrors.js:75:21)
at C:UsersjashanDownloadsnewprojgetter-setternode_modulesweb3-core-methodsrcindex.js:448:48
at processTicksAndRejections (internal/process/task_queues.js:95:5)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:2540) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 11)
(node:2540) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.