perf(ethereum): reduce number of calls by batching all polling node calls (#840)
* initial refactoring * rebase lint error * start implementing reducer * multicall reducer * working multicall! * clean up performance, re-fix annoying error * use multicall everywhere * use multicall for balances * fix lint warning * Use checksummed address * Fix strict warning * get it to a working state with the more generic form * convert useETHBalances * Remove the eth-scan contract completely * Remove the eth-scan contract completely more * Default export * Put the encoding/decoding in the methods that can do it most efficiently * Avoid duplicate fetches via debounce * Reduce delay to something less noticeable * Return null if pair reserves are undefined to indicate it does not exist
Showing
| ... | @@ -14,7 +14,6 @@ | ... | @@ -14,7 +14,6 @@ |
| "@ethersproject/units": "^5.0.0-beta.132", | "@ethersproject/units": "^5.0.0-beta.132", | ||
| "@ethersproject/wallet": "^5.0.0-beta.141", | "@ethersproject/wallet": "^5.0.0-beta.141", | ||
| "@material-ui/core": "^4.9.5", | "@material-ui/core": "^4.9.5", | ||
| "@mycrypto/eth-scan": "^2.1.0", | |||
| "@popperjs/core": "^2.4.0", | "@popperjs/core": "^2.4.0", | ||
| "@reach/dialog": "^0.10.3", | "@reach/dialog": "^0.10.3", | ||
| "@reach/portal": "^0.10.3", | "@reach/portal": "^0.10.3", | ||
| ... | @@ -79,7 +78,6 @@ | ... | @@ -79,7 +78,6 @@ |
| "serve": "^11.3.0", | "serve": "^11.3.0", | ||
| "start-server-and-test": "^1.11.0", | "start-server-and-test": "^1.11.0", | ||
| "styled-components": "^4.2.0", | "styled-components": "^4.2.0", | ||
| "swr": "0.1.18", | |||
| "typescript": "^3.8.3", | "typescript": "^3.8.3", | ||
| "use-media": "^1.4.0" | "use-media": "^1.4.0" | ||
| }, | }, | ||
| ... | ... |
src/constants/abis/erc20.ts
0 → 100644
src/data/index.ts
deleted
100644 → 0
src/data/tsconfig.json
0 → 100644
src/hooks/useBodyKeyDown.ts
0 → 100644
src/hooks/useContract.ts
0 → 100644
src/hooks/useDebounce.ts
0 → 100644
src/hooks/useENSName.ts
0 → 100644
src/hooks/usePrevious.ts
0 → 100644
src/hooks/useToggle.ts
0 → 100644
src/state/multicall/hooks.ts
0 → 100644
src/utils/chunkArray.test.ts
0 → 100644
src/utils/chunkArray.ts
0 → 100644
Please register or sign in to comment