Skip to content
This repository has been archived by the owner on Dec 7, 2022. It is now read-only.

got stuck in function getProfit #30

Open
ben2077 opened this issue Jun 15, 2021 · 3 comments
Open

got stuck in function getProfit #30

ben2077 opened this issue Jun 15, 2021 · 3 comments

Comments

@ben2077
Copy link

ben2077 commented Jun 15, 2021

yarn run v1.22.10
warning ../package.json: No license field
warning ../../../package.json: No license field
$ hardhat run --network bsc bot/index.ts
Creating Typechain artifacts in directory typechain for target ethers-v5
Successfully generated Typechain artifacts!
(node:51798) ExperimentalWarning: The fs.promises API is experimental
2021-06-16 04:01:32 info: Load pairs from json
2021-06-16 04:01:35 info: Start arbitraging
2021-06-16 04:01:39 info: BNB price: $365.58

I noticed that, every time i call the function getProfit, there will be:
2021-06-16 04:07:29 info: cannot estimate gas; transaction may fail or may require manual gas limit (error={"name":"ProviderError","code":3,"_isProviderError":true,"data":"0x08c379a0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000154e6f206261736520746f6b656e20696e20706169720000000000000000000000"}, method="call", transaction={"from":"0x343CEBd1E7D1A6838CD8b82f6238B29ad78e235E","to":"0xf53da1c2694b16692957d8c86212f4C45d472f32","data":"0x759eee10000000000000000000000000e7cc44de50b54906a9c1c48240650be2766481fc000000000000000000000000408d46d0f351f51ebc15e466aa897e5e0f5d2060","accessList":null}, code=UNPREDICTABLE_GAS_LIMIT, version=providers/5.3.1)

@nnzo
Copy link

nnzo commented Jul 1, 2021

Seem to be getting this error as well.

@paco0x
Copy link
Owner

paco0x commented Jul 1, 2021

There might be some error during the contract call. FWIK, some DEXes are suspended because of security issues. You might need to figure out that. Write a UT using hardhat's mainnet fork is a good way to debug because it can print the stack trace of error calls.

Sorry, I'm not maintaining this repo anymore. Actually, this is just for learning purposes.

@nnzo
Copy link

nnzo commented Jul 2, 2021

@paco0x All good! I'll take a look and of course update this issue if I find anything out.

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

No branches or pull requests

3 participants