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

Keep showing "Object is of type 'unknown'" error when running bot on mainnet #54

Open
KatsuragiCSL opened this issue Jan 29, 2022 · 1 comment

Comments

@KatsuragiCSL
Copy link

KatsuragiCSL commented Jan 29, 2022

bot/index.ts:63:13 - error TS2571: Object is of type 'unknown'.

63         if (err.message === 'Too much pending tasks' || err.message === 'async-lock timed out') {
               ~~~
bot/index.ts:63:57 - error TS2571: Object is of type 'unknown'.

63         if (err.message === 'Too much pending tasks' || err.message === 'async-lock timed out') {

Seems it got some unexpected error? Do anyone have any idea how to deal with it?

Edit: by viewing debug logs, it seems to be the problem of cannot estimate gas; transaction may fail or may require manual gas limit, which due to "deprecated token pairs". I wonder is there a good way to know which token pairs are not deprecated?...

@voltaxvoltax
Copy link

voltaxvoltax commented Jun 8, 2022

AS a workaround, you need to put it like this under compilerOptions:

"compilerOptions": {
"useUnknownInCatchVariables": false
}

OR , install typescriptversion 4.2.4:
npm install typescript@4.2.4

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

2 participants