goldenfiredo / rarity

81 stars 35 forks source link

合约执行报错后不会自动运行了 #2

Closed zhanghan328 closed 3 years ago

zhanghan328 commented 3 years ago

summoner id: 1188350 {"0":"0","1":"0","2":"3","3":"1","_xp":"0","_log":"0","_class":"3","_level":"1"} 9/10/2021 4:26:27 PM adventure your account: 0x3E7Da839ee2FE8e59692115643FBBa099CE33C55 nonce: 0 transaction sent, wait for response. Error: Returned error: nonce too low at Object.ErrorResponse (/Users/zhanghan/hero/rarity3/node_modules/web3-core-helpers/lib/errors.js:28:19) at /Users/zhanghan/hero/rarity3/node_modules/web3-core-requestmanager/lib/index.js:303:36 at XMLHttpRequest.request.onreadystatechange (/Users/zhanghan/hero/rarity3/node_modules/web3-providers-http/lib/index.js:98:13) at XMLHttpRequestEventTarget.dispatchEvent (/Users/zhanghan/hero/rarity3/node_modules/xhr2-cookies/dist/xml-http-request-event-target.js:34:22) at XMLHttpRequest._setReadyState (/Users/zhanghan/hero/rarity3/node_modules/xhr2-cookies/dist/xml-http-request.js:208:14) at XMLHttpRequest._onHttpResponseEnd (/Users/zhanghan/hero/rarity3/node_modules/xhr2-cookies/dist/xml-http-request.js:318:14) at IncomingMessage. (/Users/zhanghan/hero/rarity3/node_modules/xhr2-cookies/dist/xml-http-request.js:289:61) at IncomingMessage.emit (events.js:327:22) at endReadableNT (_stream_readable.js:1220:12) at processTicksAndRejections (internal/process/task_queues.js:84:21) { data: null }

summoner id: 1188480 {"0":"0","1":"0","2":"0","3":"0","_xp":"0","_log":"0","_class":"0","_level":"0"} level up your account: 0x3E7Da839ee2FE8e59692115643FBBa099CE33C55 nonce: 269 transaction sent, wait for response. hash:0xc0851c02e25d3bb35a2f907c84dc89a8d78165d4093a75c432fde284a5a8e923 9/10/2021 4:26:38 PM adventure your account: 0x3E7Da839ee2FE8e59692115643FBBa099CE33C55 nonce: 0 transaction sent, wait for response. Error: Returned error: nonce too low at Object.ErrorResponse (/Users/zhanghan/hero/rarity3/node_modules/web3-core-helpers/lib/errors.js:28:19) at /Users/zhanghan/hero/rarity3/node_modules/web3-core-requestmanager/lib/index.js:303:36 at XMLHttpRequest.request.onreadystatechange (/Users/zhanghan/hero/rarity3/node_modules/web3-providers-http/lib/index.js:98:13) at XMLHttpRequestEventTarget.dispatchEvent (/Users/zhanghan/hero/rarity3/node_modules/xhr2-cookies/dist/xml-http-request-event-target.js:34:22) at XMLHttpRequest._setReadyState (/Users/zhanghan/hero/rarity3/node_modules/xhr2-cookies/dist/xml-http-request.js:208:14) at XMLHttpRequest._onHttpResponseEnd (/Users/zhanghan/hero/rarity3/node_modules/xhr2-cookies/dist/xml-http-request.js:318:14) at IncomingMessage. (/Users/zhanghan/hero/rarity3/node_modules/xhr2-cookies/dist/xml-http-request.js:289:61) at IncomingMessage.emit (events.js:327:22) at endReadableNT (_stream_readable.js:1220:12) at processTicksAndRejections (internal/process/task_queues.js:84:21) { data: null } confirmation: 0 Error: Transaction has been reverted by the EVM: { "blockHash": "0x0000835700000ccc1d8c3f492ba951c65fa59b43549764a21a3f79768b7c1d5e", "blockNumber": 16806507, "contractAddress": null, "cumulativeGasUsed": 644134, "from": "0x3e7da839ee2fe8e59692115643fbba099ce33c55", "gasUsed": 52937, "logs": [], "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "status": false, "to": "0xce761d788df608bd21bdd59d6f4b54b2e27f25bb", "transactionHash": "0xc0851c02e25d3bb35a2f907c84dc89a8d78165d4093a75c432fde284a5a8e923", "transactionIndex": 8 } at Object.TransactionError (/Users/zhanghan/hero/rarity3/node_modules/web3-core-helpers/lib/errors.js:87:21) at Object.TransactionRevertedWithoutReasonError (/Users/zhanghan/hero/rarity3/node_modules/web3-core-helpers/lib/errors.js:98:21) at /Users/zhanghan/hero/rarity3/node_modules/web3-core-method/lib/index.js:394:57 at processTicksAndRejections (internal/process/task_queues.js:97:5) { receipt: { blockHash: '0x0000835700000ccc1d8c3f492ba951c65fa59b43549764a21a3f79768b7c1d5e', blockNumber: 16806507, contractAddress: null, cumulativeGasUsed: 644134, from: '0x3e7da839ee2fe8e59692115643fbba099ce33c55', gasUsed: 52937, logs: [], logsBloom: '0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000', status: false, to: '0xce761d788df608bd21bdd59d6f4b54b2e27f25bb', transactionHash: '0xc0851c02e25d3bb35a2f907c84dc89a8d78165d4093a75c432fde284a5a8e923', transactionIndex: 8 } }

fengyun88 commented 3 years ago

这种情况应该如何处理

zhanghan328 commented 3 years ago

这种情况应该如何处理 是由于之前的合约读取数据错误造成的。你看获取到等级是0。直接屏蔽掉吧。

fengyun88 commented 3 years ago

主要是脚本在那里卡着不执行了