feat: Rename ETH_RPC_URL -> RPC_URL

We support multiple chains so this may not just be ETH, but perhaps a Base URL for example.
This commit is contained in:
TAMARA LIPOWSKI
2025-02-28 13:49:59 -05:00
parent 5a2474c0f4
commit 9bb0d9bc84
3 changed files with 4 additions and 4 deletions

View File

@@ -25,7 +25,7 @@ permissions:
env:
CARGO_TERM_COLOR: always
ETH_RPC_URL: ${{ secrets.eth_rpc_url }}
RPC_URL: ${{ secrets.eth_rpc_url }}
jobs:
compile_and_test:

View File

@@ -269,7 +269,7 @@ mod tests {
/// This test actually calls the permit method on the Permit2 contract to verify the encoded
/// data works. It requires an Anvil fork, so please run with the following command: anvil
/// --fork-url <RPC-URL> And set up the following env var as ETH_RPC_URL=127.0.0.1:8545
/// --fork-url <RPC-URL> And set up the following env var as RPC_URL=127.0.0.1:8545
/// Use an account from anvil to fill the anvil_account and anvil_private_key variables
#[test]
#[cfg_attr(not(feature = "fork-tests"), ignore)]

View File

@@ -75,8 +75,8 @@ impl ProtocolApprovalsManager {
/// Gets the client used for interacting with the EVM-compatible network.
pub async fn get_client() -> Result<Arc<RootProvider<BoxTransport>>, EncodingError> {
dotenv().ok();
let eth_rpc_url = env::var("ETH_RPC_URL")
.map_err(|_| EncodingError::FatalError("Missing ETH_RPC_URL in environment".to_string()))?;
let eth_rpc_url = env::var("RPC_URL")
.map_err(|_| EncodingError::FatalError("Missing RPC_URL in environment".to_string()))?;
let client = ProviderBuilder::new()
.on_builtin(&eth_rpc_url)
.await