Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions contract_manager/scripts/latency_entropy_with_callback.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ const parser = yargs(hideBin(process.argv))
"Usage: $0 --private-key <private-key> --chain <chain-id> | --all-chains <testnet|mainnet>",
)
.options({
provider: {
type: "string",
desc: "Provider address to use for the request. Will use the default provider if not specified",
demandOption: false,
},
chain: {
type: "string",
desc: "test latency for the contract on this chain",
Expand All @@ -33,8 +38,9 @@ const parser = yargs(hideBin(process.argv))
async function testLatency(
contract: EvmEntropyContract,
privateKey: PrivateKey,
provider?: string,
) {
const provider = await contract.getDefaultProvider();
provider = provider || await contract.getDefaultProvider();
const userRandomNumber = contract.generateUserRandomNumber();
const requestResponse = await contract.requestRandomness(
userRandomNumber,
Expand Down Expand Up @@ -109,7 +115,7 @@ async function main() {
} else if (argv.chain) {
const chain = DefaultStore.getChainOrThrow(argv.chain, EvmChain);
const contract = findEntropyContract(chain);
await testLatency(contract, privateKey);
await testLatency(contract, privateKey, argv.provider);
}
}

Expand Down
6 changes: 3 additions & 3 deletions contract_manager/store/chains/EvmChains.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -781,7 +781,7 @@
type: EvmChain
- id: abstract
mainnet: true
rpcUrl: https://api-efe16d37.ml.eeffc03e557f4daf.com/
rpcUrl: https://api.mainnet.abs.xyz
networkId: 2741
type: EvmChain
- id: eventum_testnet
Expand Down Expand Up @@ -831,13 +831,13 @@
type: EvmChain
- id: monad_testnet
mainnet: false
rpcUrl: https://rpc.monad-testnet.category.xyz/rpc/nSyzM1wlIgaALWzbh3oIg5rW65AC6yjqrslOE8wb
rpcUrl: https://testnet-rpc.monad.xyz
networkId: 10143
type: EvmChain
- id: berachain_mainnet
mainnet: true
networkId: 80094
rpcUrl: https://fluent-thrilling-scion.furtim-network.quiknode.pro/$ENV_RABECHAIN_API_KEY
rpcUrl: https://rpc.berachain.com
type: EvmChain
- id: story
mainnet: true
Expand Down
Loading