Skip to content
This repository was archived by the owner on Feb 24, 2025. It is now read-only.

Improve scripts#49

Merged
bbenligiray merged 3 commits into
mainfrom
improve-scripts
Jul 13, 2023
Merged

Improve scripts#49
bbenligiray merged 3 commits into
mainfrom
improve-scripts

Conversation

@bbenligiray

Copy link
Copy Markdown
Member

I need to add new testnets and these were blocking me

@bbenligiray bbenligiray requested a review from andreogle July 13, 2023 13:22
@bbenligiray bbenligiray self-assigned this Jul 13, 2023
Comment thread scripts/ping-providers.ts
@@ -1,7 +1,8 @@
import { JsonRpcProvider } from 'ethers';
import { CHAINS, getChainByAlias } from '../src';

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍🏻

const BLOCK_LOOKBACK = 400_000;

async function calculateAverageBlockTimes(): Promise<void> {
const specifiedChain = CHAINS.find(chain => chain.alias === process.env.CHAIN);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A command line arg would probably be better imo (i.e. yarn providers:time --chain-alias=xyz), but this works too.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah it's not ideal but I'm in a rush

@bbenligiray bbenligiray merged commit 1a8df94 into main Jul 13, 2023
@bbenligiray bbenligiray deleted the improve-scripts branch July 13, 2023 14:11
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants