-
Notifications
You must be signed in to change notification settings - Fork 10
feat: Endorsement Chain #165
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: beta
Are you sure you want to change the base?
Changes from all commits
c2a0881
6176182
24dbecb
c7cf475
faeee44
acbd3fe
53e346c
0411334
ffb9d3d
c28a659
7bd32c0
086e5cc
134d312
b2025b2
ecb5fd7
9a47ed9
0dbe40d
d14425e
63c156a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,48 @@ | ||
| export const DEFAULT_KEY = '4d5a4e3f2f6d2b0a1f2e9b8f8a3c7a0b8d4f5c2e7b1a1c3f2e7b8c2d5a4f7e3e'; | ||
|
|
||
| // Match JSON-RPC / HTTP codes as standalone tokens (not inside block numbers, gas, chain IDs). | ||
| const rpcCode = (code: string): string => `(?:^|[^0-9])${code}(?![0-9])`; | ||
|
|
||
| export const INFURA_FREE_TIER_RANGE_RE = new RegExp( | ||
| `free tier plan|10\\s*block difference|block range should work:\\s*\\[0x0,\\s*0x9\\]|Upgrade to PAYG|${rpcCode('-32600')}`, | ||
|
Check warning on line 7 in src/constants.ts
|
||
| 'i', | ||
| ); | ||
| // reponse extracted from infura logs and also alchemy logs | ||
| export const RANGE_TOO_LARGE_ERROR_RE = new RegExp( | ||
| [ | ||
| 'query returned more than', | ||
| 'too large', | ||
| 'block range', | ||
| '10,?000 results', | ||
| 'response size', | ||
| 'exceeds limit', | ||
| '10\\s*block', | ||
|
Check warning on line 19 in src/constants.ts
|
||
| 'free tier', | ||
| 'block difference', | ||
| 'Upgrade to PAYG', | ||
| rpcCode('-32012'), | ||
| rpcCode('-32600'), | ||
| ].join('|'), | ||
| 'i', | ||
| ); | ||
| // response extracted from infura logs and also alchemy logs | ||
| export const RATE_LIMIT_ERROR_RE = new RegExp( | ||
| [ | ||
| `rate-?limit`, | ||
| `too many requests`, | ||
| `could not coalesce`, | ||
| rpcCode('429'), | ||
| rpcCode('-32005'), | ||
| ].join('|'), | ||
| 'i', | ||
| ); | ||
|
|
||
| export const INITIAL_CHUNK_SIZE = 10_000; | ||
| export const FREE_TIER_MAX_CHUNK_SIZE = 10; | ||
| export const MIN_CHUNK_SIZE = 1; | ||
| export const MAX_CHUNK_SIZE = 50_000; | ||
| export const DEFAULT_MAX_BLOCKS_TO_SCAN = 200_000; | ||
| export const FREE_TIER_MAX_REQUESTS = 5_000; | ||
| export const FREE_TIER_MAX_DURATION_MS = 60_000; | ||
| export const RATE_LIMIT_MAX_RETRIES = 3; | ||
| export const RATE_LIMIT_BASE_DELAY_MS = 500; | ||
Uh oh!
There was an error while loading. Please reload this page.