Skip to content

Commit

Permalink
feat: Rename ETH_RPC_URL -> RPC_URL
Browse files Browse the repository at this point in the history
We support multiple chains so this may not just be ETH, but perhaps a Base URL for example. It now matched tycho-execution.
  • Loading branch information
TAMARA LIPOWSKI committed Feb 28, 2025
1 parent 9d29ab6 commit 95cbc91
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests-and-lints-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ lazy_static = "1.4.0"
# Tycho dependencies
tycho-core = { git = "https://github.com/propeller-heads/tycho-indexer.git", package = "tycho-core", tag = "0.56.5" }
tycho-client = { git = "https://github.com/propeller-heads/tycho-indexer.git", package = "tycho-client", tag = "0.56.5" }
tycho-execution = { git = "https://github.com/propeller-heads/tycho-execution.git", package = "tycho-execution", features = ["evm"], tag = "0.56.0" }
tycho-execution = { git = "https://github.com/propeller-heads/tycho-execution.git", package = "tycho-execution", features = ["evm"], rev = "9bb0d9bc8495f4fff9006d9ed7e353042c023c9c" }

# EVM dependencies
foundry-config = { git = "https://github.com/foundry-rs/foundry", rev = "57bb12e", optional = true }
Expand Down
2 changes: 1 addition & 1 deletion examples/price_printer/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ quotes from each pool.
## How to run

```bash
export ETH_RPC_URL=<your-node-rpc-url>
export RPC_URL=<your-node-rpc-url>
cargo run --release --example price_printer -- --tvl-threshold 1000 --chain <ethereum | base>
```
8 changes: 4 additions & 4 deletions examples/quickstart/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ async fn main() {
.init();

let tycho_url =
env::var("TYCHO_URL").unwrap_or_else(|_| "tycho-beta.propellerheads.xyz".to_string());
env::var("TYCHO_URL").unwrap_or_else(|_| "tycho-base-beta.propellerheads.xyz".to_string());
let tycho_api_key: String =
env::var("TYCHO_API_KEY").unwrap_or_else(|_| "sampletoken".to_string());

Expand Down Expand Up @@ -148,10 +148,10 @@ async fn main() {
.with_chain(named_chain)
.wallet(tx_signer.clone())
.on_http(
env::var("ETH_RPC_URL")
.expect("ETH_RPC_URL env var not set")
env::var("RPC_URL")
.expect("RPC_URL env var not set")
.parse()
.expect("Failed to parse ETH_RPC_URL"),
.expect("Failed to parse RPC_URL"),
);

while let Some(message_result) = protocol_stream.next().await {
Expand Down
4 changes: 2 additions & 2 deletions src/evm/engine_db/simulation_db.rs
Original file line number Diff line number Diff line change
Expand Up @@ -465,9 +465,9 @@ mod tests {

fn get_client() -> Arc<RootProvider<BoxTransport>> {
let runtime = get_runtime().unwrap();
let eth_rpc_url = env::var("ETH_RPC_URL").unwrap_or_else(|_| {
let eth_rpc_url = env::var("RPC_URL").unwrap_or_else(|_| {
dotenv().expect("Missing .env file");
env::var("ETH_RPC_URL").expect("Missing ETH_RPC_URL in .env file")
env::var("RPC_URL").expect("Missing RPC_URL in .env file")
});
let client = runtime.block_on(async {
ProviderBuilder::new()
Expand Down
2 changes: 1 addition & 1 deletion src/evm/protocol/vm/erc20_token.rs
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ mod tests {

fn new_state() -> SimulationDB<RootProvider<BoxTransport>> {
dotenv().ok();
let eth_rpc_url = env::var("ETH_RPC_URL").expect("Missing ETH_RPC_URL in environment");
let eth_rpc_url = env::var("RPC_URL").expect("Missing RPC_URL in environment");
let runtime = tokio::runtime::Handle::try_current()
.is_err()
.then(|| tokio::runtime::Runtime::new().unwrap())
Expand Down
4 changes: 2 additions & 2 deletions src/evm/protocol/vm/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -444,9 +444,9 @@ mod tests {
#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
#[cfg_attr(not(feature = "network_tests"), ignore)]
async fn test_get_code_for_address() {
let rpc_url = env::var("ETH_RPC_URL").unwrap_or_else(|_| {
let rpc_url = env::var("RPC_URL").unwrap_or_else(|_| {
dotenv().expect("Missing .env file");
env::var("ETH_RPC_URL").expect("Missing ETH_RPC_URL in .env file")
env::var("RPC_URL").expect("Missing RPC_URL in .env file")
});

let address = "0x88e6A0c2dDD26FEEb64F039a2c41296FcB3f5640";
Expand Down
2 changes: 1 addition & 1 deletion src/evm/simulation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -620,7 +620,7 @@ mod tests {
}
fn new_state() -> SimulationDB<RootProvider<BoxTransport>> {
dotenv().ok();
let eth_rpc_url = env::var("ETH_RPC_URL").expect("Missing ETH_RPC_URL in environment");
let eth_rpc_url = env::var("RPC_URL").expect("Missing RPC_URL in environment");
let runtime = tokio::runtime::Handle::try_current()
.is_err()
.then(|| tokio::runtime::Runtime::new().unwrap())
Expand Down

0 comments on commit 95cbc91

Please sign in to comment.