Giter Club home page Giter Club logo

pancakeswapbot's Introduction

Nice to see you here !

I enjoy my work and being able to create new solutions to day-to-day problems through programming, I love being able to work with other people and learn from each other, computing is not only my job but also a hobby, so in my In my free time I work on my own in different projects that you can find in my Github.

I am interested in projects with new microservices architectures, oriented to events and prepared for high availability and performance in cloud environments.

I would like to continue my career in a technological branch, managing teams and working together with great professionals but without neglecting the reason that made me start in this profession.

I am always willing to learn new ways of working and keep growing, so don't hesitate to contact me.

https://linktr.ee/DiegoTobalina

Linkedin Badge

⚡ Technologies

JavaScript Nodejs Java MongoDB Redis ElasticSearch GraphQL PostgreSQL MySQL Heroku Docker DigitalOcean Amazon AWS Microsoft Azure Google Cloud Git GitHub GitLab BitBucket Raspberry Pi

Github Stats Top Langs

pancakeswapbot's People

Contributors

bsc-predict avatar xbidi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

pancakeswapbot's Issues

how start?

root@Ubuntu-2004-focal-64-minimal ~/PancakeSwapBot # npm start

[email protected] start
ts-node src/bot.ts

Bot started at 9:05
/root/PancakeSwapBot/node_modules/@ethersproject/logger/src.ts/index.ts:225
const error: any = new Error(message);
^
Error: call revert exception (method="currentEpoch()", errorArgs=null, errorName=null, errorSignature=null, reason=null, code=CALL_EXCEPTION, version=abi/5.5.0)
at Logger.makeError (/root/PancakeSwapBot/node_modules/@ethersproject/logger/src.ts/index.ts:225:28)
at Logger.throwError (/root/PancakeSwapBot/node_modules/@ethersproject/logger/src.ts/index.ts:237:20)
at Interface.decodeFunctionResult (/root/PancakeSwapBot/node_modules/@ethersproject/abi/src.ts/interface.ts:425:23)
at Contract. (/root/PancakeSwapBot/node_modules/@ethersproject/contracts/src.ts/index.ts:392:44)
at step (/root/PancakeSwapBot/node_modules/@ethersproject/contracts/lib/index.js:48:23)
at Object.next (/root/PancakeSwapBot/node_modules/@ethersproject/contracts/lib/index.js:29:53)
at fulfilled (/root/PancakeSwapBot/node_modules/@ethersproject/contracts/lib/index.js:20:58)
at processTicksAndRejections (node:internal/process/task_queues:95:5) {
reason: null,
code: 'CALL_EXCEPTION',
method: 'currentEpoch()',
errorArgs: null,
errorName: null,
errorSignature: null,
address: '0x6e17072D6B2524aBB63134c632144F59Ca0aebbF',
args: [],
transaction: {
data: '0x76671808',
to: '0x6e17072D6B2524aBB63134c632144F59Ca0aebbF',
from: '0x6e17072D6B2524aBB63134c632144F59Ca0aebbF'
}
}

Doesn't claim the rewards

I'm not sure how it suppose to work but I'll explain my situation.

It wins one round, then it waits one.
When the next round starts, it shows this in the console.

Claimable epochs empty: []
Tx Success

But it doesn't claim it for some reason.
If I check the pancakeswap interface, the reward is still there, waiting to be claimed.
Could you please explain to me why is that happening?

Thank you!

Gas estimate problem

Hi there, thank you very much for this bot. I have been having lots of fun with it. However, sometimes it would get stuck with 'cannot estimate gas; transaction may fail or may require manual gas limit'.

Sometimes this happens in a timem where the bot is recovering from loss, and then it need to start from the beginning bet gain. Is there a way to resolve this?

Thanks

Your strategy just bets the on the bigger payout

Your strategy is very simple and you should state it outright. It bets on the higher payout at the time the bet is made. Your backtest is also inaccurate since it uses the final payout as the bet, but this is not known the time the bet is made.

You should make the strategy explicit in the README as it's simple to understand.

const bet = roundBullAmount < roundBearAmount ? 'bull' : 'bear';

https://github.com/xBidi/PancakeSwapBot/blob/main/src/bot.ts#L73

Transaction Fail

Hi there, sometimes I get the error below and it resets the whole bot, if you have 2-3 consecutive lost bets it will reset it back to the start, you'll be losing money.

Why would that happen?

Thank you!

1|ts-node  | Tx Started
1|ts-node  | Tx Error, calling reduceWaitingTimeByOneBlocks(waitingTime) Error: transaction failed (transactionHash="0xf6867c02184e5da80bfce0b63a99ec76d8bf51cab77a996ac42377ff7cf23e54", transaction={"nonce":1435,"gasPrice":{"type":"BigNumber","hex":"0x012a05f200"},"gasLimit":{"type":"BigNumber","hex":"0x01cd17"},"to":"0x18B2A687610328590Bc8F2e5fEdDe3b582A49cdA","value":{"type":"BigNumber","hex":"0x011c37937e080000"},"data":"0xaa6b873a0000000000000000000000000000000000000000000000000000000000007539","chainId":56,"v":148,"r":"0x13b9040f2407bab5df6b64562907774597b77ee38095e648b589a5a0481cf24d","s":"0x362069f6ec2834f1b2abcb2d2f55db7b0e1b4c817e8963c8185a01f901ccded8","from":"0xbA85c23C2C1A1aABDd86D0AAAA544C933FFeDa35","hash":"0xf6867c02184e5da80bfce0b63a99ec76d8bf51cab77a996ac42377ff7cf23e54","type":null,"confirmations":0}, receipt={"to":"0x18B2A687610328590Bc8F2e5fEdDe3b582A49cdA","from":"0xbA85c23C2C1A1aABDd86D0AAAA544C933FFeDa35","contractAddress":null,"transactionIndex":194,"gasUsed":{"type":"BigNumber","hex":"0x7475"},"logsBloom":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","blockHash":"0x02b12189416b117c8dc865e4d7913f9d973ee6bdb2b342ee23641e8736fe6ec5","transactionHash":"0xf6867c02184e5da80bfce0b63a99ec76d8bf51cab77a996ac42377ff7cf23e54","logs":[],"blockNumber":13700008,"confirmations":1,"cumulativeGasUsed":{"type":"BigNumber","hex":"0x01cf6ca3"},"status":0,"type":0,"byzantium":true}, code=CALL_EXCEPTION, version=providers/5.5.0)
1|ts-node  |     at Logger.makeError (/root/PSP/PancakeSwapBot/node_modules/@ethersproject/logger/src.ts/index.ts:225:28)
1|ts-node  |     at Logger.throwError (/root/PSP/PancakeSwapBot/node_modules/@ethersproject/logger/src.ts/index.ts:237:20)
1|ts-node  |     at JsonRpcProvider.<anonymous> (/root/PSP/PancakeSwapBot/node_modules/@ethersproject/providers/src.ts/base-provider.ts:1314:24)
1|ts-node  |     at step (/root/PSP/PancakeSwapBot/node_modules/@ethersproject/providers/lib/base-provider.js:48:23)
1|ts-node  |     at Object.next (/root/PSP/PancakeSwapBot/node_modules/@ethersproject/providers/lib/base-provider.js:29:53)
1|ts-node  |     at fulfilled (/root/PSP/PancakeSwapBot/node_modules/@ethersproject/providers/lib/base-provider.js:20:58) {
1|ts-node  |   reason: 'transaction failed',
1|ts-node  |   code: 'CALL_EXCEPTION',
1|ts-node  |   transactionHash: '0xf6867c02184e5da80bfce0b63a99ec76d8bf51cab77a996ac42377ff7cf23e54',
1|ts-node  |   transaction: {
1|ts-node  |     nonce: 1435,
1|ts-node  |     gasPrice: BigNumber { _hex: '0x012a05f200', _isBigNumber: true },
1|ts-node  |     gasLimit: BigNumber { _hex: '0x01cd17', _isBigNumber: true },
1|ts-node  |     to: '0x18B2A687610328590Bc8F2e5fEdDe3b582A49cdA',
1|ts-node  |     value: BigNumber { _hex: '0x011c37937e080000', _isBigNumber: true },
1|ts-node  |     data: '0xaa6b873a0000000000000000000000000000000000000000000000000000000000007539',
1|ts-node  |     chainId: 56,
1|ts-node  |     v: 148,
1|ts-node  |     r: '0x13b9040f2407bab5df6b64562907774597b77ee38095e648b589a5a0481cf24d',
1|ts-node  |     s: '0x362069f6ec2834f1b2abcb2d2f55db7b0e1b4c817e8963c8185a01f901ccded8',
1|ts-node  |     from: '0xbA85c23C2C1A1aABDd86D0AAAA544C933FFeDa35',
1|ts-node  |     hash: '0xf6867c02184e5da80bfce0b63a99ec76d8bf51cab77a996ac42377ff7cf23e54',
1|ts-node  |     type: null,
1|ts-node  |     confirmations: 0,
1|ts-node  |     wait: [Function (anonymous)]
1|ts-node  |   },
1|ts-node  |   receipt: {
1|ts-node  |     to: '0x18B2A687610328590Bc8F2e5fEdDe3b582A49cdA',
1|ts-node  |     from: '0xbA85c23C2C1A1aABDd86D0AAAA544C933FFeDa35',
1|ts-node  |     contractAddress: null,
1|ts-node  |     transactionIndex: 194,
1|ts-node  |     gasUsed: BigNumber { _hex: '0x7475', _isBigNumber: true },
1|ts-node  |     logsBloom: '0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000',
1|ts-node  |     blockHash: '0x02b12189416b117c8dc865e4d7913f9d973ee6bdb2b342ee23641e8736fe6ec5',
1|ts-node  |     transactionHash: '0xf6867c02184e5da80bfce0b63a99ec76d8bf51cab77a996ac42377ff7cf23e54',
1|ts-node  |     logs: [],
1|ts-node  |     blockNumber: 13700008,
1|ts-node  |     confirmations: 1,
1|ts-node  |     cumulativeGasUsed: BigNumber { _hex: '0x01cf6ca3', _isBigNumber: true },
1|ts-node  |     status: 0,
1|ts-node  |     type: 0,
1|ts-node  |     byzantium: true
1|ts-node  |   }
1|ts-node  | }

something wrong

Started epoch 57619, waiting
Waiting time ended
Bet selected: bear
The round 57618 is not ended, cant bet without knowing the last result
C:\Users\PancakeSwapBot\node_modules@ethersproject\logger\src.ts\index.ts:225
const error: any = new Error(message);
^
Error: missing revert data in call exception (error={"reason":"missing response","code":"SERVER_ERROR","requestBody":"{"method":"eth_call","params":[{"from":"0xde9bf5fd7e9fb1f6277f5c9d2b0e1ecb48e01af5","to":"0x18b2a687610328590bc8f2e5fedde3b582a49cda","data":"0x76671808"},"latest"],"id":120,"jsonrpc":"2.0"}","requestMethod":"POST","serverError":{"code":"ECONNRESET","path":null,"host":"bsc-dataseed.binance.org","port":443},"url":"https://bsc-dataseed.binance.org/"}, data="0x", code=CALL_EXCEPTION, version=providers/5.5.0)
at Logger.makeError (C:\Users\PancakeSwapBot\node_modules@ethersproject\logger\src.ts\index.ts:225:28)
at Logger.throwError (C:\Users\PancakeSwapBot\node_modules@ethersproject\logger\src.ts\index.ts:237:20)
at checkError (C:\Users\PancakeSwapBot\node_modules@ethersproject\providers\src.ts\json-rpc-provider.ts:34:16)
at JsonRpcProvider. (C:\Users\PancakeSwapBot\node_modules@ethersproject\providers\src.ts\json-rpc-provider.ts:562:20)
at step (C:\Users\PancakeSwapBot\node_modules@ethersproject\providers\lib\json-rpc-provider.js:48:23)
at Object.throw (C:\Users\PancakeSwapBot\node_modules@ethersproject\providers\lib\json-rpc-provider.js:29:53)
at rejected (C:\Users\PancakeSwapBot\node_modules@ethersproject\providers\lib\json-rpc-provider.js:21:65)
at processTicksAndRejections (node:internal/process/task_queues:96:5) {
reason: 'missing revert data in call exception',
code: 'CALL_EXCEPTION',
error: Error: missing response (requestBody="{"method":"eth_call","params":[{"from":"0xde9bf5fd7e9fb1f6277f5c9d2b0e1ecb48e01af5","to":"0x18b2a687610328590bc8f2e5fedde3b582a49cda","data":"0x76671808"},"latest"],"id":120,"jsonrpc":"2.0"}", requestMethod="POST", serverError={"code":"ECONNRESET","path":null,"host":"bsc-dataseed.binance.org","port":443}, url="https://bsc-dataseed.binance.org/", code=SERVER_ERROR, version=web/5.5.0)
at Logger.makeError (C:\Users\PancakeSwapBot\node_modules@ethersproject\logger\src.ts\index.ts:225:28)
at Logger.throwError (C:\Users\PancakeSwapBot\node_modules@ethersproject\logger\src.ts\index.ts:237:20)
at C:\Users\PancakeSwapBot\node_modules@ethersproject\web\src.ts\index.ts:234:28
at step (C:\Users\PancakeSwapBot\node_modules@ethersproject\web\lib\index.js:33:23)
at Object.throw (C:\Users\PancakeSwapBot\node_modules@ethersproject\web\lib\index.js:14:53)
at rejected (C:\Users\PancakeSwapBot\node_modules@ethersproject\web\lib\index.js:6:65)
at processTicksAndRejections (node:internal/process/task_queues:96:5) {
reason: 'missing response',
code: 'SERVER_ERROR',
requestBody: '{"method":"eth_call","params":[{"from":"0xde9bf5fd7e9fb1f6277f5c9d2b0e1ecb48e01af5","to":"0x18b2a687610328590bc8f2e5fedde3b582a49cda","data":"0x76671808"},"latest"],"id":120,"jsonrpc":"2.0"}',
requestMethod: 'POST',
serverError: Error: Client network socket disconnected before secure TLS connection was established
at connResetException (node:internal/errors:692:14)
at TLSSocket.onConnectEnd (node:_tls_wrap:1587:19)
at TLSSocket.emit (node:events:539:35)
at TLSSocket.emit (node:domain:475:12)
at endReadableNT (node:internal/streams/readable:1345:12)
at processTicksAndRejections (node:internal/process/task_queues:83:21) {
code: 'ECONNRESET',
path: null,
host: 'bsc-dataseed.binance.org',
port: 443,
localAddress: undefined
},
url: 'https://bsc-dataseed.binance.org/'
},
data: '0x'
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.