davvvvvvvy / pancakeswap-bot

🥞 Trading bot Pancakeswap
MIT License
42 stars 35 forks source link

UNSUPPORTED_OPERATION error #1

Open ozunaltun opened 3 years ago

ozunaltun commented 3 years ago

When I run the code I get an error like this, after the error the code runs and detects new pairs. However, it does not buy. I could not find where the error was.

Error: cannot override "_hex","_isBigNumber","fromTwos","toTwos","abs","add","sub","div","mul","mod","pow","and","or","xor","mask","shl","shr","eq","lt","lte","gt","gte","isNegative","isZero","toNumber","toString","toHexString","toJSON" (operation="overrides", overrides=["_hex","_isBigNumber","fromTwos","toTwos","abs","add","sub","div","mul","mod","pow","and","or","xor","mask","shl","shr","eq","lt","lte","gt","gte","isNegative","isZero","toNumber","toString","toHexString","toJSON"], code=UNSUPPORTED_OPERATION, version=contracts/5.0.12) at Logger.makeError (C:\virtual04\pancakeswap-bot-main\node_modules\@ethersproject\logger\lib\index.js:180:21) at Logger.throwError (C:\virtual04\pancakeswap-bot-main\node_modules\@ethersproject\logger\lib\index.js:189:20) at C:\virtual04\pancakeswap-bot-main\node_modules\@ethersproject\contracts\lib\index.js:237:32 at step (C:\virtual04\pancakeswap-bot-main\node_modules\@ethersproject\contracts\lib\index.js:48:23) at Object.next (C:\virtual04\pancakeswap-bot-main\node_modules\@ethersproject\contracts\lib\index.js:29:53) at fulfilled (C:\virtual04\pancakeswap-bot-main\node_modules\@ethersproject\contracts\lib\index.js:20:58) at processTicksAndRejections (node:internal/process/task_queues:96:5) { reason: 'cannot override "_hex","_isBigNumber","fromTwos","toTwos","abs","add","sub","div","mul","mod","pow","and","or","xor","mask","shl","shr","eq","lt","lte","gt","gte","isNegative","isZero","toNumber","toString","toHexString","toJSON"', code: 'UNSUPPORTED_OPERATION', operation: 'overrides', overrides: [ '_hex', '_isBigNumber', 'fromTwos', 'toTwos', 'abs', 'add', 'sub', 'div', 'mul', 'mod', 'pow', 'and', 'or', 'xor', 'mask', 'shl', 'shr', 'eq', 'lt', 'lte', 'gt', 'gte', 'isNegative', 'isZero', 'toNumber', 'toString', 'toHexString', 'toJSON' ] }

New pair detected
=================
token0: 0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c
token1: 0xC304742Fd4666B4A5f53Ad02Df999c3f6d6E5B69
pairAddress: 0x429798E066672819064c6335E8d7fBE4E622Bb45`
davvvvvvvy commented 3 years ago

Did you try to change gasPrice and gasLimit numbers?

When I run the code I get an error like this, after the error the code runs and detects new pairs. However, it does not buy. I could not find where the error was.

Error: cannot override "_hex","_isBigNumber","fromTwos","toTwos","abs","add","sub","div","mul","mod","pow","and","or","xor","mask","shl","shr","eq","lt","lte","gt","gte","isNegative","isZero","toNumber","toString","toHexString","toJSON" (operation="overrides", overrides=["_hex","_isBigNumber","fromTwos","toTwos","abs","add","sub","div","mul","mod","pow","and","or","xor","mask","shl","shr","eq","lt","lte","gt","gte","isNegative","isZero","toNumber","toString","toHexString","toJSON"], code=UNSUPPORTED_OPERATION, version=contracts/5.0.12)

at Logger.makeError (C:\virtual04\pancakeswap-bot-main\node_modules\@ethersproject\logger\lib\index.js:180:21)

at Logger.throwError (C:\virtual04\pancakeswap-bot-main\node_modules\@ethersproject\logger\lib\index.js:189:20)

at C:\virtual04\pancakeswap-bot-main\node_modules\@ethersproject\contracts\lib\index.js:237:32

at step (C:\virtual04\pancakeswap-bot-main\node_modules\@ethersproject\contracts\lib\index.js:48:23)

at Object.next (C:\virtual04\pancakeswap-bot-main\node_modules\@ethersproject\contracts\lib\index.js:29:53)

at fulfilled (C:\virtual04\pancakeswap-bot-main\node_modules\@ethersproject\contracts\lib\index.js:20:58)

at processTicksAndRejections (node:internal/process/task_queues:96:5) {

reason: 'cannot override "_hex","_isBigNumber","fromTwos","toTwos","abs","add","sub","div","mul","mod","pow","and","or","xor","mask","shl","shr","eq","lt","lte","gt","gte","isNegative","isZero","toNumber","toString","toHexString","toJSON"',

code: 'UNSUPPORTED_OPERATION',

operation: 'overrides',

overrides: [

'_hex',     '_isBigNumber', 'fromTwos',

'toTwos',   'abs',          'add',

'sub',      'div',          'mul',

'mod',      'pow',          'and',

'or',       'xor',          'mask',

'shl',      'shr',          'eq',

'lt',       'lte',          'gt',

'gte',      'isNegative',   'isZero',

'toNumber', 'toString',     'toHexString',

'toJSON'

]

}

New pair detected

=================

token0: 0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c

token1: 0xC304742Fd4666B4A5f53Ad02Df999c3f6d6E5B69

pairAddress: 0x429798E066672819064c6335E8d7fBE4E622Bb45`
ikhwanb commented 3 years ago

Hi, i got the same error too, i've change the gas code as per this snippet. Please assist thanks.

Date.now() + 1000 * 60 * 10, // 10 minutes
    {
        gasPrice: '10000',
        gasLimit: '2000000'
    },
  )
  const receipt = await tx.wait()
Spedejr commented 3 years ago

i have same problem too i tried to adjust gas prices and i0+0+istal type script and ethers

Spedejr commented 3 years ago

i just detects new pairs nothing else

davvvvvvvy commented 3 years ago

I have done this in Python and it works. Would upload later