1
- import { Effect , Schedule , Data , Context , Schema , Arbitrary , FastCheck , LogLevel } from "effect"
1
+ import { Effect , Schedule , Data , Context , Schema , Arbitrary , FastCheck } from "effect"
2
2
import { http } from "viem"
3
3
import { privateKeyToAccount } from "viem/accounts"
4
4
import { sepolia } from "viem/chains"
@@ -14,9 +14,9 @@ import { hideBin } from "yargs/helpers"
14
14
import fs from "node:fs"
15
15
import type { Address } from "viem"
16
16
import { request , gql } from "graphql-request"
17
-
18
17
type Hex = `0x${string } `
19
18
19
+
20
20
// Chain pair configuration
21
21
interface ChainPair {
22
22
sourceChain : string
@@ -526,21 +526,13 @@ export const checkPackets = (
526
526
// reportedSendTxHashes.add(sendTxHash)
527
527
}
528
528
} else {
529
- yield * Effect . log ( {
530
- level : LogLevel . Error ,
531
- span : "checkPackets" ,
532
- message : `[TRANSFER_ERROR] > ${ timeframeMs } ms since send` ,
533
- annotations : {
534
- sendTxHash : `${ sendTxHash } ` ,
535
- chain_pair : `${ sourceChain } ->${ destinationChain } ` ,
536
- explorerUrl : `https://btc.union.build/explorer/transfers/${ sort_order_tx } ` ,
537
- issueType : "RECV_MISSNG"
538
- }
539
-
540
- } )
541
- // yield* Effect.log(
542
- // `[TRANSFER_ERROR: RECV MISSING] >${timeframeMs}ms since send. sendTxHash=${sendTxHash}, chain_pair${sourceChain}->${destinationChain}, url: https://btc.union.build/explorer/transfers/${sort_order_tx}`
543
- // )
529
+ yield * Effect . annotateLogs ( {
530
+ issueType : "RECV_MISSING" ,
531
+ sendTxHash,
532
+ chain_pair : `${ sourceChain } ->${ destinationChain } ` ,
533
+ explorerUrl : `https://btc.union.build/explorer/transfers/${ sort_order_tx } `
534
+ } ) ( Effect . log ( `[TRANSFER_ERROR] >${ timeframeMs } ms since send` ) )
535
+ // console.info("[TRANSFER_ERROR] >${timeframeMs}ms since send")
544
536
reportedSendTxHashes . add ( sendTxHash )
545
537
continue
546
538
}
0 commit comments