hsouf / pancakeSwap_trading_bot

12 stars 3 forks source link

Transaction failing everytime #2

Open tusharkekw opened 3 years ago

tusharkekw commented 3 years ago

My transaction is getting failed everytime. here and console is showing error that i have pasted below Please help

UnhandledPromiseRejectionWarning: Error: transaction failed (transactionHash="0xb0de2bde50646394e73762dd52c450d049ed90bb7af80f53208a030e3ee7493f", transaction={"nonce":16,"gasPrice":{"type":"BigNumber","hex":"0x012a05f200"},"gasLimit":{"type":"BigNumber","hex":"0x013880"},"to":"0x05fF2B0DB69458A0750badebc4f9e13aDd608C7F","value":{"type":"BigNumber","hex":"0x00"},"data":"0x38ed1739000000000000000000000000000000000000000000000000016345785d8a0000000000000000000000000000000000000000000000000000001a361eaa695c9b00000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000676a469e7686a4ead311628dbb92bb2c80b59f000000000000000000000000000000000000000000000000000000017a482ee2210000000000000000000000000000000000000000000000000000000000000002000000000000000000000000e9e7cea3dedca5984780bafc599bd69add087d560000000000000000000000000e09fabb73bd3ade0a17ecc321fd13a19e81ce82","chainId":56,"v":148,"r":"0xbcdf118fdb6b17bae22ada2d270d27b4efead4324f6ca32e8226abc9a9ab2b60","s":"0x41db8d3301fe4301dbc1aa326017766e12416868b89d003aaab76cbd19a8ce05","from":"0x676A469E7686a4Ead311628dBb92Bb2c80b59f00","hash":"0xb0de2bde50646394e73762dd52c450d049ed90bb7af80f53208a030e3ee7493f","type":null}, receipt={"to":"0x05fF2B0DB69458A0750badebc4f9e13aDd608C7F","from":"0x676A469E7686a4Ead311628dBb92Bb2c80b59f00","contractAddress":null,"transactionIndex":38,"gasUsed":{"type":"BigNumber","hex":"0x013759"},"logsBloom":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","blockHash":"0x6d64085be531b2281d47665da4981f146130fd641e88ba3d4bce3ae3065300b0","transactionHash":"0xb0de2bde50646394e73762dd52c450d049ed90bb7af80f53208a030e3ee7493f","logs":[],"blockNumber":8632427,"confirmations":1,"cumulativeGasUsed":{"type":"BigNumber","hex":"0x6072a1"},"status":0,"byzantium":true}, code=CALL_EXCEPTION, version=providers/5.3.1) at Logger.makeError (/home/tushar/koding/projects/webscrapper/node_modules/@ethersproject/logger/lib/index.js:187:21) at Logger.throwError (/home/tushar/koding/projects/webscrapper/node_modules/@ethersproject/logger/lib/index.js:196:20) at JsonRpcProvider. (/home/tushar/koding/projects/webscrapper/node_modules/@ethersproject/providers/lib/base-provider.js:1301:36) at step (/home/tushar/koding/projects/webscrapper/node_modules/@ethersproject/providers/lib/base-provider.js:48:23) at Object.next (/home/tushar/koding/projects/webscrapper/node_modules/@ethersproject/providers/lib/base-provider.js:29:53) at fulfilled (/home/tushar/koding/projects/webscrapper/node_modules/@ethersproject/providers/lib/base-provider.js:20:58)

hsouf commented 3 years ago

@krim6ix Your gas limit is too low. Retry the transaction with a gas limit of 400k.

tusharkekw commented 3 years ago

Hey thanks for taking out the time and replying i really appreciate it. It is working fine now ya it was a gas problem . But it only works for well established tokens like cake and bunny , not woking even for poocoin vetted tokens . It gives this error in other cases : cannot estimate gas; transaction may fail or may require manual gas limit. Even though i am passing an parameter for gas limit then also it is asking for manual gas limit . Tried searching on google about this but no luck . Complete error below. Thanks

Error: cannot estimate gas; transaction may fail or may require manual gas limit (error={"reason":"processing response error","code":"SERVER_ERROR","body":"{\"jsonrpc\":\"2.0\",\"id\":69,\"error\":{\"code\":-32000,\"message\":\"execution reverted\"}}","error":{"code":-32000},"requestBody":"{\"method\":\"eth_call\",\"params\":[{\"gas\":\"0x55730\",\"gasPrice\":\"0x12a05f200\",\"from\":\"0x676a469e7686a4ead311628dbb92bb2c80b59f00\",\"to\":\"0x05ff2b0db69458a0750badebc4f9e13add608c7f\",\"data\":\"0xd06ca61f000000000000000000000000000000000000000000000000002386f26fc1000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000002000000000000000000000000e9e7cea3dedca5984780bafc599bd69add087d56000000000000000000000000580de58c1bd593a43dadcf0a739d504621817c05\"},\"latest\"],\"id\":69,\"jsonrpc\":\"2.0\"}","requestMethod":"POST","url":"https://bsc-dataseed1.binance.org:443"}, method="call", transaction={"from":"0x676A469E7686a4Ead311628dBb92Bb2c80b59f00","gasLimit":{"type":"BigNumber","hex":"0x055730"},"gasPrice":{"type":"BigNumber","hex":"0x012a05f200"},"to":"0x05fF2B0DB69458A0750badebc4f9e13aDd608C7F","data":"0xd06ca61f000000000000000000000000000000000000000000000000002386f26fc1000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000002000000000000000000000000e9e7cea3dedca5984780bafc599bd69add087d56000000000000000000000000580de58c1bd593a43dadcf0a739d504621817c05","accessList":null}, code=UNPREDICTABLE_GAS_LIMIT, version=providers/5.3.1)