dappuniversity / price-bot

397 stars 392 forks source link

Invalid number of parameters for "getExpectedRate". Got 3 expected 4! #35

Open bielsky0 opened 2 years ago

bielsky0 commented 2 years ago

When I pulled changes from PR#13 i go this error:

Error: Invalid number of parameters for "getExpectedRate". Got 3 expected 4! at Object.InvalidNumberOfParams (/home/skygate/Dokumenty/blockchain/price-bot/node_modules/web3-core-helpers/src/errors.js:32:16) at Object._createTxObject (/home/skygate/Dokumenty/blockchain/price-bot/node_modules/web3-eth-contract/src/index.js:699:22) at checkPair (/home/skygate/Dokumenty/blockchain/price-bot/index.js:69:6) at processTicksAndRejections (internal/process/task_queues.js:95:5) at monitorPrice (/home/skygate/Dokumenty/blockchain/price-bot/index.js:102:5) at Timeout._onTimeout (/home/skygate/Dokumenty/blockchain/price-bot/index.js:146:3)

Shaikh-Ahmad commented 2 years ago

I also got the same error message When I pulled changes from PR#13. if anyone know something about it kindly do tell. thanks

Glebexe commented 2 years ago

You should find and delete "{"name":"usePermissionless","type":"bool"}" in the KYBER_RATE_ABI. It is a description of that parameter which you removed. And also you don't need to change name of the function "slippageRate" or you will need to change the name of it also in the descritprion in the KYBER_RATE_ABI. Idk why he didn't mentioned it. I took for me about 5 hours to figure it out.