diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 6c7f336..e82bd29 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -8,7 +8,7 @@ on: env: CARGO_TERM_COLOR: always - INFURA_API_KEY: ${{ secrets.INFURA_API_KEY }} + MAINNET_RPC_URL: ${{ secrets.MAINNET_RPC_URL }} jobs: lint: diff --git a/src/tests.rs b/src/tests.rs index fe1c56a..44b2c28 100644 --- a/src/tests.rs +++ b/src/tests.rs @@ -9,12 +9,7 @@ use once_cell::sync::Lazy; pub(crate) static BLOCK_NUMBER: Lazy = Lazy::new(|| BlockId::from(17000000)); pub(crate) static RPC_URL: Lazy = Lazy::new(|| { dotenv().ok(); - format!( - "https://mainnet.infura.io/v3/{}", - std::env::var("INFURA_API_KEY").unwrap() - ) - .parse() - .unwrap() + std::env::var("MAINNET_RPC_URL").unwrap().parse().unwrap() }); pub(crate) static PROVIDER: Lazy = Lazy::new(|| ProviderBuilder::new().on_http(RPC_URL.clone()));