Shawn Lu 1 éve
szülő
commit
3023a006a2
1 módosított fájl, 2 hozzáadás és 2 törlés
  1. 2 2
      src/bridge/StargateClient.ts

+ 2 - 2
src/bridge/StargateClient.ts

@@ -47,7 +47,7 @@ export class StargateClient {
   async bridge(toChainId: number) {
     if(toChainId === ChainId.ZKSYNC) throw new Error('Unsupported.')
     return await polly()
-      .waitAndRetry([1000 * 60, 1000 * 60 * 2, 1000 * 60 * 3])
+      .waitAndRetry([1000 * 10, 1000 * 20, 1000 * 30, 1000 * 40])
       .executeForPromise(async info => {
         try {
           const routerEth = RouterETH__factory.connect(chainInfoMap[this.chainId].ethRouterAddress, this.wallet)
@@ -61,7 +61,7 @@ export class StargateClient {
           if (info.count > 0) {
             StargateClient.logger.info(`${this.wallet.address}: Retry ${info.count} times`)
           }
-          const rate = BigInt(info.count) * 30n + 100n
+          const rate = BigInt(info.count) * 50n + 100n
           // add 20% gas cost for each retry
           cost = (cost * rate) / 100n
           limit = (limit * rate) / 100n