File tree 4 files changed +11
-8
lines changed
4 files changed +11
-8
lines changed Original file line number Diff line number Diff line change @@ -5,8 +5,8 @@ NEXT_PUBLIC_DAIMO_CHAIN="baseSepolia"
5
5
# INDEX_DATABASE_URL= defaults to local postgres, db=index
6
6
EXCHANGE_RATES_URL = " https://openexchangerates.org/api/latest.json?app_id=TODO"
7
7
DAIMO_BUNDLER_RPC = " https://api.pimlico.io/TODO"
8
- DAIMO_API_L1_RPC_WS = " TODO"
9
- DAIMO_API_L2_RPC_WS = " TODO"
8
+ DAIMO_API_L1_RPC = " TODO"
9
+ DAIMO_API_L2_RPC = " TODO"
10
10
11
11
# You can generate your own faucet EOA using Metamask/viem/ethers.
12
12
# Then, get Base Sepolia ETH here: https://www.alchemy.com/faucets/base-sepolia
Original file line number Diff line number Diff line change @@ -26,9 +26,9 @@ const zEnv = {
26
26
// we submit [compressed] bundles ourselves.
27
27
DAIMO_BUNDLER_RPC : z . string ( ) . startsWith ( "https://" ) ,
28
28
// Ethereum L1 RPC, with comma-delimited fallbacks.
29
- DAIMO_API_L1_RPC_WS : z . string ( ) ,
29
+ DAIMO_API_L1_RPC : z . string ( ) ,
30
30
// Ethereum L2 RPC, with comma-delimited fallbacks.
31
- DAIMO_API_L2_RPC_WS : z . string ( ) ,
31
+ DAIMO_API_L2_RPC : z . string ( ) ,
32
32
// Deployer, compressed userop bundler, + faucet EOA private key.
33
33
DAIMO_API_PRIVATE_KEY : z . string ( ) . optional ( ) . default ( "" ) ,
34
34
// Push notifications enabled? Should only be true in prod.
Original file line number Diff line number Diff line change @@ -106,9 +106,10 @@ export class ViemClient {
106
106
private extApiCache : IExternalApiCache
107
107
) {
108
108
this . account = this . walletClient . account ;
109
+ const { waitForTransactionReceipt } = publicClient ;
109
110
publicClient . waitForTransactionReceipt = ( args ) => {
110
111
// Viem's default is 6 = ~24s
111
- return publicClient . waitForTransactionReceipt ( {
112
+ return waitForTransactionReceipt ( {
112
113
...args ,
113
114
retryCount : 10 ,
114
115
timeout : 60_000 , // Wait at most 1 minute for a tx to confirm
@@ -449,7 +450,9 @@ export class ViemClient {
449
450
) } Tx submission attempt ${ attempt } with txId ${ txAttemptId } `
450
451
) ;
451
452
452
- await this . setOverrideParams ( localTxId , args , prevGasFees ) ;
453
+ await retryBackoff ( "setOverrideParams" , ( ) =>
454
+ this . setOverrideParams ( localTxId , args , prevGasFees )
455
+ ) ;
453
456
454
457
try {
455
458
const txHash = await this . walletClient . writeContract ( args ) ;
Original file line number Diff line number Diff line change @@ -13,8 +13,8 @@ import { privateKeyToAccount } from "viem/accounts";
13
13
import { getEnvApi } from "../env" ;
14
14
15
15
export function getTransportFromEnv ( ) {
16
- const l1RPCs = getEnvApi ( ) . DAIMO_API_L1_RPC_WS . split ( "," ) ;
17
- const l2RPCs = getEnvApi ( ) . DAIMO_API_L2_RPC_WS . split ( "," ) ;
16
+ const l1RPCs = getEnvApi ( ) . DAIMO_API_L1_RPC . split ( "," ) ;
17
+ const l2RPCs = getEnvApi ( ) . DAIMO_API_L2_RPC . split ( "," ) ;
18
18
19
19
console . log ( `[VIEM] using transport RPCs L1: ${ l1RPCs } , L2: ${ l2RPCs } ` ) ;
20
20
You can’t perform that action at this time.
0 commit comments