Skip to content
This repository has been archived by the owner on Oct 19, 2024. It is now read-only.

tests: use sepolia #1989

Merged
merged 7 commits into from
Dec 31, 2022
Merged

tests: use sepolia #1989

merged 7 commits into from
Dec 31, 2022

Conversation

DaniPopes
Copy link
Collaborator

@DaniPopes DaniPopes commented Dec 30, 2022

Motivation

goerli moment

Solution

add sepolia to test provider and use it

fauceted from https://web.getlaika.app/faucets

PR Checklist

  • Added Tests
  • Added Documentation
  • Updated the changelog
  • Breaking changes

Copy link
Collaborator

@mattsse mattsse left a comment

Choose a reason for hiding this comment

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

having a sepolia provider makes total sense.

I think switching testing to sepolia, is probably also the right move for basic contract testing.

ethers-providers/src/lib.rs Outdated Show resolved Hide resolved
@@ -12,7 +12,7 @@ name: Tests
env:
ETHERSCAN_API_KEY_ETHEREUM: I5BXNZYP5GEDWFINGVEZKYIVU2695NPQZB
ETHERSCAN_API_KEY_CELO: B13XSMUT6Q3Q4WZ5DNQR8RXDBA2KNTMT4M
GOERLI_PRIVATE_KEY: "fa4a1a79e869a96fcb42727f75e3232d6865a82ea675bb95de967a7fe6a773b2"
SEPOLIA_PRIVATE_KEY: "fa4a1a79e869a96fcb42727f75e3232d6865a82ea675bb95de967a7fe6a773b2"
Copy link
Collaborator

Choose a reason for hiding this comment

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

let's keep goerli as well

we could also switch to gh secrets

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

do you mean we shouldn't change to sepolia at all, or just keep the env var name as goerli?

Copy link
Collaborator

Choose a reason for hiding this comment

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

keep both

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

problem is that tests are flaky with goerli

@mattsse mattsse mentioned this pull request Dec 30, 2022
4 tasks
Copy link
Owner

@gakonst gakonst left a comment

Choose a reason for hiding this comment

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

sorry to be nitpicky but let's remove all unrelated changes except the addition of the Sepolia provider :D

@@ -1,288 +1,283 @@
on:
Copy link
Owner

Choose a reason for hiding this comment

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

giga nit but pls configure your editor to not change the formatting on these files :D or let's do it in a separate PR intentionally

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

idk why it formats on search and replace, that was unintentional

ethers-middleware/tests/nonce_manager.rs Show resolved Hide resolved
@@ -756,16 +758,14 @@ pub mod test_provider {
}

impl TestProvider {
pub fn new(keys: &'static [&'static str], network: &str) -> Self {
Self { keys: Mutex::new(keys.iter().cycle()), network: network.to_owned() }
pub fn new(network: impl Into<String>) -> Self {
Copy link
Owner

@gakonst gakonst Dec 30, 2022

Choose a reason for hiding this comment

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

i'd like to keep this around so a consumer can specify providers w/ other infura keys in the future

@gakonst gakonst merged commit fd4da49 into gakonst:master Dec 31, 2022
@DaniPopes DaniPopes deleted the fix/goerli-tests branch January 27, 2023 17:00
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.

3 participants