File tree Expand file tree Collapse file tree 4 files changed +11
-8
lines changed
documentation/rrelayer/docs/pages
integration/sdk/transactions Expand file tree Collapse file tree 4 files changed +11
-8
lines changed Original file line number Diff line number Diff line change @@ -49,8 +49,8 @@ impl RelayersAllowedForRandom {
4949 // If the list is empty, it means all relayers are allowed (equivalent to "*")
5050 allowed_relayers. is_empty ( ) || allowed_relayers. contains ( relayer)
5151 } else {
52- // If no configuration exists for this chain, all relayers are allowed by default
53- true
52+ // If no configuration exists for this chain, the feature is disabled
53+ false
5454 }
5555 }
5656}
Original file line number Diff line number Diff line change @@ -31,7 +31,9 @@ pub async fn send_transaction_random(
3131
3232/// Selects a random available relayer for the specified chain.
3333///
34- /// Filters out paused and internal-only relayers before making the selection.
34+ /// Filters out paused, internal-only, and relayers only allowed for random selection.
35+ /// Note: The random relayer feature must be explicitly enabled via `allowed_random_relayers`
36+ /// config for the network, otherwise all relayers will be filtered out.
3537async fn select_random_relayer (
3638 state : & Arc < AppState > ,
3739 chain_id : & ChainId ,
Original file line number Diff line number Diff line change @@ -182,12 +182,13 @@ the documentation in the signer provider pages:
182182### allowed_random_relayers - optional
183183
184184Controls which relayers are eligible for selection when using the random relayer endpoint.
185- If not specified, all available relayers can be selected (equivalent to ` " * " ` ).
185+ ** If not specified, the random relayer feature is disabled for this network.**
186186
187187**Options:**
188- - ` " *" ` - Allow all relayers (default behavior)
188+ - ` " *" ` - Allow all relayers for random selection
189189- Single address - Only allow one specific relayer for random selection
190190- Array of addresses - Allow only the specified relayers for random selection
191+ - Not specified - Random relayer feature disabled
191192
192193` ` ` yaml [rrelayer.yaml]
193194name : first-rrelayer
@@ -210,14 +211,14 @@ networks: // [!code focus]
210211
211212**Examples:**
212213
213- Allow all relayers (default) :
214+ Enable for all relayers:
214215` ` ` yaml
215216allowed_random_relayers : " *"
216217` ` `
217218
218219Allow only specific relayers:
219220` ` ` yaml
220- allowed_random_relayers :
221+ allowed_random_relayers :
221222 - " 0x742f0677b50b0F1C2151865Dcb98BF32FeaF65c9"
222223 - " 0x8ba1f109551bD432803012645Hac136c6d3A60E7"
223224` ` `
Original file line number Diff line number Diff line change @@ -256,7 +256,7 @@ const txRequest: TransactionToSend = {
256256};
257257
258258// Send to a random relayer on the specified chain
259- let response = await client .network .sendTransactionRandom (chainId , txRequest );
259+ let response = await client .network .sendRandom (chainId , txRequest );
260260
261261// returns a TransactionReceipt - import { TransactionReceipt } from 'rrelayer';
262262let relayTransactionResult = await client .transaction .waitForTransactionReceiptById (
You can’t perform that action at this time.
0 commit comments