amm-arbitrageur
amm-arbitrageur copied to clipboard
Keep showing "Object is of type 'unknown'" error when running bot on mainnet
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?...
AS a workaround, you need to put it like this under compilerOptions:
"compilerOptions": { "useUnknownInCatchVariables": false }
OR , install typescriptversion 4.2.4: npm install [email protected]