@@ -126,8 +126,8 @@ export class ClientCapability {
126126 static readonly CAPABILITY_NAME = 'evm'
127127 static readonly CAPABILITY_VERSION = '1.0.0'
128128
129- /** Available chain selectors */
130- static readonly SUPPORTED_CHAINS = {
129+ /** Available ChainSelector values */
130+ static readonly SUPPORTED_CHAIN_SELECTORS = {
131131 'avalanche-mainnet' : 6433500567565415381n ,
132132 'avalanche-testnet-fuji' : 14767482510784806043n ,
133133 'binance_smart_chain-mainnet-opbnb-1' : 465944652040885897n ,
@@ -143,7 +143,7 @@ export class ClientCapability {
143143 'polygon-testnet-amoy' : 16281711391670634445n ,
144144 } as const
145145
146- constructor ( private readonly chainSelector ? : bigint ) { }
146+ constructor ( private readonly ChainSelector : bigint ) { }
147147
148148 callContract (
149149 runtime : Runtime < unknown > ,
@@ -160,10 +160,8 @@ export class ClientCapability {
160160 payload = fromJson ( CallContractRequestSchema , input as CallContractRequestJson )
161161 }
162162
163- // Include chainSelector in capability ID for routing when specified
164- const capabilityId = this . chainSelector
165- ? `${ ClientCapability . CAPABILITY_NAME } :ChainSelector:${ this . chainSelector } @${ ClientCapability . CAPABILITY_VERSION } `
166- : ClientCapability . CAPABILITY_ID
163+ // Include all labels in capability ID for routing when specified
164+ const capabilityId = `${ ClientCapability . CAPABILITY_NAME } :ChainSelector:${ this . ChainSelector } @${ ClientCapability . CAPABILITY_VERSION } `
167165
168166 const capabilityResponse = runtime . callCapability < CallContractRequest , CallContractReply > ( {
169167 capabilityId,
@@ -197,10 +195,8 @@ export class ClientCapability {
197195 payload = fromJson ( FilterLogsRequestSchema , input as FilterLogsRequestJson )
198196 }
199197
200- // Include chainSelector in capability ID for routing when specified
201- const capabilityId = this . chainSelector
202- ? `${ ClientCapability . CAPABILITY_NAME } :ChainSelector:${ this . chainSelector } @${ ClientCapability . CAPABILITY_VERSION } `
203- : ClientCapability . CAPABILITY_ID
198+ // Include all labels in capability ID for routing when specified
199+ const capabilityId = `${ ClientCapability . CAPABILITY_NAME } :ChainSelector:${ this . ChainSelector } @${ ClientCapability . CAPABILITY_VERSION } `
204200
205201 const capabilityResponse = runtime . callCapability < FilterLogsRequest , FilterLogsReply > ( {
206202 capabilityId,
@@ -234,10 +230,8 @@ export class ClientCapability {
234230 payload = fromJson ( BalanceAtRequestSchema , input as BalanceAtRequestJson )
235231 }
236232
237- // Include chainSelector in capability ID for routing when specified
238- const capabilityId = this . chainSelector
239- ? `${ ClientCapability . CAPABILITY_NAME } :ChainSelector:${ this . chainSelector } @${ ClientCapability . CAPABILITY_VERSION } `
240- : ClientCapability . CAPABILITY_ID
233+ // Include all labels in capability ID for routing when specified
234+ const capabilityId = `${ ClientCapability . CAPABILITY_NAME } :ChainSelector:${ this . ChainSelector } @${ ClientCapability . CAPABILITY_VERSION } `
241235
242236 const capabilityResponse = runtime . callCapability < BalanceAtRequest , BalanceAtReply > ( {
243237 capabilityId,
@@ -271,10 +265,8 @@ export class ClientCapability {
271265 payload = fromJson ( EstimateGasRequestSchema , input as EstimateGasRequestJson )
272266 }
273267
274- // Include chainSelector in capability ID for routing when specified
275- const capabilityId = this . chainSelector
276- ? `${ ClientCapability . CAPABILITY_NAME } :ChainSelector:${ this . chainSelector } @${ ClientCapability . CAPABILITY_VERSION } `
277- : ClientCapability . CAPABILITY_ID
268+ // Include all labels in capability ID for routing when specified
269+ const capabilityId = `${ ClientCapability . CAPABILITY_NAME } :ChainSelector:${ this . ChainSelector } @${ ClientCapability . CAPABILITY_VERSION } `
278270
279271 const capabilityResponse = runtime . callCapability < EstimateGasRequest , EstimateGasReply > ( {
280272 capabilityId,
@@ -311,10 +303,8 @@ export class ClientCapability {
311303 )
312304 }
313305
314- // Include chainSelector in capability ID for routing when specified
315- const capabilityId = this . chainSelector
316- ? `${ ClientCapability . CAPABILITY_NAME } :ChainSelector:${ this . chainSelector } @${ ClientCapability . CAPABILITY_VERSION } `
317- : ClientCapability . CAPABILITY_ID
306+ // Include all labels in capability ID for routing when specified
307+ const capabilityId = `${ ClientCapability . CAPABILITY_NAME } :ChainSelector:${ this . ChainSelector } @${ ClientCapability . CAPABILITY_VERSION } `
318308
319309 const capabilityResponse = runtime . callCapability <
320310 GetTransactionByHashRequest ,
@@ -354,10 +344,8 @@ export class ClientCapability {
354344 )
355345 }
356346
357- // Include chainSelector in capability ID for routing when specified
358- const capabilityId = this . chainSelector
359- ? `${ ClientCapability . CAPABILITY_NAME } :ChainSelector:${ this . chainSelector } @${ ClientCapability . CAPABILITY_VERSION } `
360- : ClientCapability . CAPABILITY_ID
347+ // Include all labels in capability ID for routing when specified
348+ const capabilityId = `${ ClientCapability . CAPABILITY_NAME } :ChainSelector:${ this . ChainSelector } @${ ClientCapability . CAPABILITY_VERSION } `
361349
362350 const capabilityResponse = runtime . callCapability <
363351 GetTransactionReceiptRequest ,
@@ -394,10 +382,8 @@ export class ClientCapability {
394382 payload = fromJson ( HeaderByNumberRequestSchema , input as HeaderByNumberRequestJson )
395383 }
396384
397- // Include chainSelector in capability ID for routing when specified
398- const capabilityId = this . chainSelector
399- ? `${ ClientCapability . CAPABILITY_NAME } :ChainSelector:${ this . chainSelector } @${ ClientCapability . CAPABILITY_VERSION } `
400- : ClientCapability . CAPABILITY_ID
385+ // Include all labels in capability ID for routing when specified
386+ const capabilityId = `${ ClientCapability . CAPABILITY_NAME } :ChainSelector:${ this . ChainSelector } @${ ClientCapability . CAPABILITY_VERSION } `
401387
402388 const capabilityResponse = runtime . callCapability < HeaderByNumberRequest , HeaderByNumberReply > ( {
403389 capabilityId,
@@ -431,10 +417,8 @@ export class ClientCapability {
431417 payload = fromJson ( RegisterLogTrackingRequestSchema , input as RegisterLogTrackingRequestJson )
432418 }
433419
434- // Include chainSelector in capability ID for routing when specified
435- const capabilityId = this . chainSelector
436- ? `${ ClientCapability . CAPABILITY_NAME } :ChainSelector:${ this . chainSelector } @${ ClientCapability . CAPABILITY_VERSION } `
437- : ClientCapability . CAPABILITY_ID
420+ // Include all labels in capability ID for routing when specified
421+ const capabilityId = `${ ClientCapability . CAPABILITY_NAME } :ChainSelector:${ this . ChainSelector } @${ ClientCapability . CAPABILITY_VERSION } `
438422
439423 const capabilityResponse = runtime . callCapability < RegisterLogTrackingRequest , Empty > ( {
440424 capabilityId,
@@ -471,10 +455,8 @@ export class ClientCapability {
471455 )
472456 }
473457
474- // Include chainSelector in capability ID for routing when specified
475- const capabilityId = this . chainSelector
476- ? `${ ClientCapability . CAPABILITY_NAME } :ChainSelector:${ this . chainSelector } @${ ClientCapability . CAPABILITY_VERSION } `
477- : ClientCapability . CAPABILITY_ID
458+ // Include all labels in capability ID for routing when specified
459+ const capabilityId = `${ ClientCapability . CAPABILITY_NAME } :ChainSelector:${ this . ChainSelector } @${ ClientCapability . CAPABILITY_VERSION } `
478460
479461 const capabilityResponse = runtime . callCapability < UnregisterLogTrackingRequest , Empty > ( {
480462 capabilityId,
@@ -494,11 +476,9 @@ export class ClientCapability {
494476 }
495477
496478 logTrigger ( config : FilterLogTriggerRequestJson ) : ClientLogTrigger {
497- // Include chainSelector in capability ID for routing when specified
498- const capabilityId = this . chainSelector
499- ? `${ ClientCapability . CAPABILITY_NAME } :ChainSelector:${ this . chainSelector } @${ ClientCapability . CAPABILITY_VERSION } `
500- : ClientCapability . CAPABILITY_ID
501- return new ClientLogTrigger ( config , capabilityId , 'LogTrigger' )
479+ // Include all labels in capability ID for routing when specified
480+ const capabilityId = `${ ClientCapability . CAPABILITY_NAME } :ChainSelector:${ this . ChainSelector } @${ ClientCapability . CAPABILITY_VERSION } `
481+ return new ClientLogTrigger ( config , capabilityId , 'LogTrigger' , this . ChainSelector )
502482 }
503483
504484 writeReport (
@@ -519,10 +499,8 @@ export class ClientCapability {
519499 )
520500 }
521501
522- // Include chainSelector in capability ID for routing when specified
523- const capabilityId = this . chainSelector
524- ? `${ ClientCapability . CAPABILITY_NAME } :ChainSelector:${ this . chainSelector } @${ ClientCapability . CAPABILITY_VERSION } `
525- : ClientCapability . CAPABILITY_ID
502+ // Include all labels in capability ID for routing when specified
503+ const capabilityId = `${ ClientCapability . CAPABILITY_NAME } :ChainSelector:${ this . ChainSelector } @${ ClientCapability . CAPABILITY_VERSION } `
526504
527505 const capabilityResponse = runtime . callCapability < WriteReportRequest , WriteReportReply > ( {
528506 capabilityId,
@@ -551,6 +529,7 @@ class ClientLogTrigger implements Trigger<Log, Log> {
551529 config : FilterLogTriggerRequest | FilterLogTriggerRequestJson ,
552530 private readonly _capabilityId : string ,
553531 private readonly _method : string ,
532+ private readonly ChainSelector : bigint ,
554533 ) {
555534 // biome-ignore lint/suspicious/noExplicitAny: Needed for runtime type checking of protocol buffer messages
556535 this . config = ( config as any ) . $typeName
0 commit comments