gweidart/evm-flashswap-arb

Wrong input order

yanrising opened this issue · 5 comments

I use local Geth in light mode. When I start bot I have message:
2022-11-28 15:09:53 debug: call revert exception; VM Exception while processing transaction: reverted with reason string "Wrong input order" [ See: https://links.ethers.org/v5-errors-CALL_EXCEPTION ] (method="getProfit(address,address)", data="0x08c379a00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001157726f6e6720696e707574206f72646572000000000000000000000000000000", errorArgs=["Wrong input order"], errorName="Error", errorSignature="Error(string)", reason="Wrong input order", code=CALL_EXCEPTION, version=abi/5.7.0)

Contract deployed without errors. Whats wrong?
Screenshot_1

Its error begin after change tokens in tokens.ts. I think problem at token contact. With original tokens.ts - no error

1 hour work normally and this error again.
Use local Geth in light mode. tokens.ts - default.
Any ideads? Add screenshot Geth
Screenshot_2

so did you figure it out? im seeing errors that seem somehow related as they are also when getProfit is called but instead give a 'reason' of 'complex number'.

ADDED: all tokens use 18 decimals...

so did you figure it out? im seeing errors that seem somehow related as they are also when getProfit is called but instead give a 'reason' of 'complex number'.

ADDED: all tokens use 18 decimals...

im pretty sure one of you, maybe both have since contacted me on Telegram and I helped get this issue resolved.

In regards to the “wrong input order” error you’re getting:

You need to make sure you’ve added the base token’s from your tokens.ts to the contract via the “addBaseToken” function. After deployment.

In regards to the decimal error:

this is a known issue / bug. I have fixed this issue and will be pushing the fix when I’m done thoroughly testing the entire repo update I’m planning.

also, this repo was just meant as a boilerplate / template to get people started and build on. Please feel free to create a pull request.

so did you figure it out? im seeing errors that seem somehow related as they are also when getProfit is called but instead give a 'reason' of 'complex number'.
ADDED: all tokens use 18 decimals...

im pretty sure one of you, maybe both have since contacted me on Telegram and I helped get this issue resolved.

In regards to the “wrong input order” error you’re getting:

You need to make sure you’ve added the base token’s from your tokens.ts to the contract via the “addBaseToken” function. After deployment.

In regards to the decimal error:

this is a known issue / bug. I have fixed this issue and will be pushing the fix when I’m done thoroughly testing the entire repo update I’m planning.

also, this repo was just meant as a boilerplate / template to get people started and build on. Please feel free to create a pull request.

tried to tip you 25 on the brave browser but i then realized you werent signed up. (was only using it to get my old settings, wouldn't say i'm promoting or bashing this browser.)

i've only posted here. ...i try to stay out of public entirely. i finally asked as a reply to this thread because i feel i've gone to the extent of my own knowledge and research sources have either failed me, were limited or (like now) i felt would lead me to the source or perhaps [bug you] get your attention in a less bothersome way.

that being said, i just want to make sure im understanding this so far, the "decimal error" you mention has to do with the "complex number" thing i'm running into right?

for the record, i know nothing when it comes to coding anything. but just from this one repo, i've learned more about solidity and coding in general than i have been able to gather from everything i've used to teach myself in the past 3+ years. (never paid for classes and thats why. would probably do so if you were teaching)

i just want to make sure it's nothing then that i can do to avoid "complex number" thing with project in the current state correct? you meant that its bug related... past that, with what i have learned from your project, i have started building some extra steps for this as there are some issues with the pool addresses and the wrapping of native token involved on chain i'm testing. (nothing to do with your code). this is the most progress i've accomplished since i started trying to code anything. and have gotten through several issues to this point by debugging it myself to find my own misunderstanding as the cause.

thanks. now i'm off to read what the heck a pull request is lol.