File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,11 @@ const parser = yargs(hideBin(process.argv))
1313 "Usage: $0 --private-key <private-key> --chain <chain-id> | --all-chains <testnet|mainnet>" ,
1414 )
1515 . options ( {
16+ provider : {
17+ type : "string" ,
18+ desc : "Provider address to use for the request. Will use the default provider if not specified" ,
19+ demandOption : false ,
20+ } ,
1621 chain : {
1722 type : "string" ,
1823 desc : "test latency for the contract on this chain" ,
@@ -30,8 +35,9 @@ const parser = yargs(hideBin(process.argv))
3035async function testLatency (
3136 contract : EvmEntropyContract ,
3237 privateKey : PrivateKey ,
38+ provider ?: string ,
3339) {
34- const provider = await contract . getDefaultProvider ( ) ;
40+ provider = provider || await contract . getDefaultProvider ( ) ;
3541 const userRandomNumber = contract . generateUserRandomNumber ( ) ;
3642 const requestResponse = await contract . requestRandomness (
3743 userRandomNumber ,
@@ -106,7 +112,7 @@ async function main() {
106112 } else if ( argv . chain ) {
107113 const chain = DefaultStore . getChainOrThrow ( argv . chain , EvmChain ) ;
108114 const contract = findEntropyContract ( chain ) ;
109- await testLatency ( contract , privateKey ) ;
115+ await testLatency ( contract , privateKey , argv . provider ) ;
110116 }
111117}
112118
You can’t perform that action at this time.
0 commit comments