Skip to content

Commit

Permalink
feat: enables edu chain fastwithdrawal (#2103)
Browse files Browse the repository at this point in the history
Co-authored-by: Bartek <[email protected]>
  • Loading branch information
douglance and brtkx authored Dec 3, 2024
1 parent 417283c commit 4dc484d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
3 changes: 2 additions & 1 deletion packages/arb-token-bridge-ui/src/util/orbitChainsData.json
Original file line number Diff line number Diff line change
Expand Up @@ -670,7 +670,8 @@
"name": "EDU",
"symbol": "EDU",
"logoUrl": "/images/EduChainTokenLogo.png"
}
},
"fastWithdrawalTime": 3600000
}
},
{
Expand Down
14 changes: 11 additions & 3 deletions packages/scripts/src/addOrbitChain/provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,21 @@ export const getProvider = (chainInfo: {
name: string;
chainId: number;
}) => {
const THROTTLE_LIMIT = 10;

const connection: ConnectionInfo = {
url: chainInfo.rpcUrl,
timeout: 30000,
timeout: 300000,
allowGzip: true,
skipFetchSetup: true,
throttleLimit: 3,
throttleSlotInterval: 1000,
throttleLimit: THROTTLE_LIMIT,
throttleSlotInterval: 3000,
throttleCallback: async (attempt: number) => {
// Always retry until we hit the THROTTLE_LIMIT
// Otherwise, it only throttles for specific response codes
// Return true to continue retrying, false to stop
return attempt <= THROTTLE_LIMIT;
},
headers: {
Accept: "*/*",
"Accept-Encoding": "gzip, deflate, br",
Expand Down

0 comments on commit 4dc484d

Please sign in to comment.