Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sometimes it succeeds, sometimes it fails #104

Open
buder-cp opened this issue Nov 22, 2021 · 7 comments
Open

Sometimes it succeeds, sometimes it fails #104

buder-cp opened this issue Nov 22, 2021 · 7 comments

Comments

@buder-cp
Copy link

buder-cp commented Nov 22, 2021

My configuration is as follows:
SLIPPAGE=49
GWEI=5
GAS_LIMIT=450000
MIN_LIQUIDITY_ADDED=0.0001

AMOUNT_OF_BNB=0.001
TO_PURCHASE=0xa7a3caa735ea009662ef985c52b0fbc87acc63b4

WSS_NODE=wss://bsc-ws-node.nariox.org:443

It is often displayed as follows:

PS F:\pancake\bot-pancakeswap\bot-pancakeswap> node .\bot.js
Listening for Liquidity Addition to token 0xa7a3caa735ea009662ef985c52b0fbc87acc63b4
events.js:180
throw er; // Unhandled 'error' event
^

Error: getaddrinfo ENOTFOUND bsc-ws-node.nariox.org
at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:60:26)
Emitted 'error' event at:
at ClientRequest. (F:\pancake\bot-pancakeswap\bot-pancakeswap\node_modules\ws\lib\websocket.js:555:15)
at ClientRequest.emit (events.js:203:13)
at TLSSocket.socketErrorListener (_http_client.js:402:9)
at TLSSocket.emit (events.js:203:13)
at emitErrorNT (internal/streams/destroy.js:91:8)
at emitErrorAndCloseNT (internal/streams/destroy.js:59:3)
at processTicksAndRejections (internal/process/task_queues.js:77:11) {
errno: 'ENOTFOUND',
code: 'ENOTFOUND',
syscall: 'getaddrinfo',
hostname: 'bsc-ws-node.nariox.org'
}

Sometimes it displays as follows:

PS F:\pancake\bot-pancakeswap\bot-pancakeswap> node .\bot.js
Listening for Liquidity Addition to token 0xa7a3caa735ea009662ef985c52b0fbc87acc63b4
pairAddress: 0x15d6A19B91112301d81384E3DEe5A2bf39B00B4D
value BNB : 0.023097950514140386
ready to buy
Start to buy
Buying Token
=================
tokenIn: 0.001 0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c (BNB)
tokenOut: 13268193626613 0xa7a3caa735ea009662ef985c52b0fbc87acc63b4

Processing Transaction.....
amountIn: 0.001 0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c (BNB)
amountOutMin: 13268193626613
tokenIn: 0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c
tokenOut: 0xa7a3caa735ea009662ef985c52b0fbc87acc63b4
data.recipient: 0x245d3312E5041f202eB27304e518445248218905
data.gasLimit: 450000
data.gasPrice: 5000000000
Transaction receipt : https://www.bscscan.com/tx/0x20cef1e2a4a7067e8a1904d43d0a0063b06711100743bc83ce5de669d51d7ec7

The first one means failure, and the second one means success?

thank you

@Nafidinara
Copy link
Owner

wss://bsc-ws-node.nariox.org:443 have unstable connection. you should use private node

@buder-cp
Copy link
Author

wss://bsc-ws-node.nariox.org:443 have unstable connection. you should use private node

now,When I use this bsc-ws-node.nariox.org:443, the probability of success is high

When I use ws-matic-mainnet.chainstacklabs.com or rpc-ws-mainnet.kcc.network, I always get an error:

PS F:\pancake\bot-pancakeswap\bot-pancakeswap> node .\bot.js
Listening for Liquidity Addition to token 0xa7a3caa735ea009662ef985c52b0fbc87acc63b4
(node:20120) UnhandledPromiseRejectionWarning: Error: call revert exception (method="getPair(address,address)", errorSignature=null, errorArgs=[null], reason=null, code=CALL_EXCEPTION, version=abi/5.1.2)
at Logger.makeError (F:\pancake\bot-pancakeswap\bot-pancakeswap\node_modules@ethersproject\logger\lib\index.js:180:21)
at Logger.throwError (F:\pancake\bot-pancakeswap\bot-pancakeswap\node_modules@ethersproject\logger\lib\index.js:189:20)
at Interface.decodeFunctionResult (F:\pancake\bot-pancakeswap\bot-pancakeswap\node_modules@ethersproject\abi\lib\interface.js:289:23)
at Contract. (F:\pancake\bot-pancakeswap\bot-pancakeswap\node_modules@ethersproject\contracts\lib\index.js:329:56)
at step (F:\pancake\bot-pancakeswap\bot-pancakeswap\node_modules@ethersproject\contracts\lib\index.js:48:23)
at Object.next (F:\pancake\bot-pancakeswap\bot-pancakeswap\node_modules@ethersproject\contracts\lib\index.js:29:53)
at fulfilled (F:\pancake\bot-pancakeswap\bot-pancakeswap\node_modules@ethersproject\contracts\lib\index.js:20:58)
at processTicksAndRejections (internal/process/task_queues.js:85:5)
(node:20120) 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(). (rejection id: 1)
(node:20120) [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.

@buder-cp
Copy link
Author

Can you tell me where to get the private node

@Nafidinara
Copy link
Owner

use for bsc network

@buder-cp
Copy link
Author

I found the tutorial https://docs.binance.org/smart-chain/developer/fullnode.html, the rent and environment setup are a bit complicated.
thank you again.
I may need to buy your service.

@Nafidinara
Copy link
Owner

you can join our discord group

@stephanvebrian
Copy link

you could try https://app.ankr.com/, their free tier is good for personal project

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants