Skip to content
This repository was archived by the owner on Jan 27, 2026. It is now read-only.

Commit ce48fde

Browse files
authored
imp(worker): use build based default rpc for prod build (#533)
* add worker default rpc
1 parent d6ed167 commit ce48fde

3 files changed

Lines changed: 7 additions & 2 deletions

File tree

.github/workflows/prod-release.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ jobs:
5454
override: true
5555

5656
- name: Build all workspace members
57+
env:
58+
WORKER_RPC_URL: https://sepolia.base.org
5759
if: steps.check_tag.outputs.exists == 'false'
5860
run: |
5961
export CARGO_BUILD_JOBS=$(nproc)

crates/worker/build.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,7 @@ fn main() {
44
if let Ok(version) = std::env::var("WORKER_VERSION") {
55
println!("cargo:rustc-env=WORKER_VERSION={}", version);
66
}
7+
if let Ok(rpc_url) = std::env::var("WORKER_RPC_URL") {
8+
println!("cargo:rustc-env=WORKER_RPC_URL={}", rpc_url);
9+
}
710
}

crates/worker/src/cli/command.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,11 @@ pub struct Cli {
4343
#[command(subcommand)]
4444
pub command: Commands,
4545
}
46-
4746
#[derive(Subcommand)]
4847
pub enum Commands {
4948
Run {
5049
/// RPC URL
51-
#[arg(long, default_value = "http://localhost:8545")]
50+
#[arg(long, default_value = option_env!("WORKER_RPC_URL").unwrap_or("http://localhost:8545"))]
5251
rpc_url: String,
5352

5453
/// Port number for the worker to listen on - DEPRECATED
@@ -224,6 +223,7 @@ pub async fn execute_command(
224223
let version = APP_VERSION;
225224
Console::section("🚀 PRIME WORKER INITIALIZATION - beta");
226225
Console::info("Version", version);
226+
227227
/*
228228
Initialize Wallet instances
229229
*/

0 commit comments

Comments
 (0)