Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,13 @@ ENABLE_DA_TRACKING=false
# FAUCET_AMOUNT=0.01
# FAUCET_COOLDOWN_MINUTES=30

# Optional: force Docker to emulate/build a specific architecture.
# Leave unset for native host builds.
# Common values:
# DOCKER_DEFAULT_PLATFORM=linux/amd64
# DOCKER_DEFAULT_PLATFORM=linux/arm64
# DOCKER_DEFAULT_PLATFORM=linux/arm64/v8

# Optional snapshot feature (daily pg_dump backups)
# SNAPSHOT_ENABLED=false
# SNAPSHOT_TIME=03:00 # UTC time (HH:MM) to run daily pg_dump
Expand Down
18 changes: 13 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,9 @@ jobs:
uses: actions/checkout@v4

- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
components: rustfmt

- name: Format
Expand All @@ -40,8 +41,9 @@ jobs:
uses: actions/checkout@v4

- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
components: clippy

- name: Cache Cargo
Expand All @@ -63,7 +65,9 @@ jobs:
uses: actions/checkout@v4

- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable

- name: Cache Cargo
uses: Swatinem/rust-cache@v2
Expand Down Expand Up @@ -102,7 +106,9 @@ jobs:
uses: actions/checkout@v4

- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable

- name: Cache Cargo
uses: Swatinem/rust-cache@v2
Expand Down Expand Up @@ -194,7 +200,9 @@ jobs:
fetch-depth: 0

- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable

- name: Cache Cargo
uses: Swatinem/rust-cache@v2
Expand Down
19 changes: 11 additions & 8 deletions backend/crates/atlas-server/src/api/handlers/contracts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -399,13 +399,14 @@ async fn get_solc_binary(version: &str, cache_dir: &str) -> Result<PathBuf, Atla
fn solc_binary_target(os: &str, arch: &str) -> Result<&'static str, AtlasError> {
match (os, arch) {
("linux", "x86_64") => Ok("linux-amd64"),
("linux", "aarch64") => Ok("linux-arm64"),
// Solidity's official static macOS binaries are currently published under
// macosx-amd64. Apple Silicon can execute them natively via Rosetta.
("macos", "x86_64") | ("macos", "aarch64") => Ok("macosx-amd64"),
_ => Err(AtlasError::Verification(format!(
"unsupported platform for native solc download: {os}/{arch}. \
Official Solidity static binaries are currently available for linux/x86_64 \
and macOS. For Docker on Apple Silicon, run atlas-server as linux/amd64."
Official Solidity static binaries are currently available for \
linux/x86_64, linux/aarch64, and macOS."
))),
}
}
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Outdated
Expand Down Expand Up @@ -1010,17 +1011,19 @@ mod tests {
}

#[test]
fn solc_binary_target_supports_macos_arm64_via_rosetta() {
fn solc_binary_target_supports_linux_arm64() {
assert_eq!(
solc_binary_target("macos", "aarch64").unwrap(),
"macosx-amd64"
solc_binary_target("linux", "aarch64").unwrap(),
"linux-arm64"
);
}

#[test]
fn solc_binary_target_rejects_linux_arm64() {
let err = solc_binary_target("linux", "aarch64").unwrap_err();
assert!(matches!(err, AtlasError::Verification(_)));
fn solc_binary_target_supports_macos_arm64_via_rosetta() {
assert_eq!(
solc_binary_target("macos", "aarch64").unwrap(),
"macosx-amd64"
);
}

#[test]
Expand Down
7 changes: 3 additions & 4 deletions backend/crates/atlas-server/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,10 @@ pub(crate) fn postgres_connection_config(db_url: &str) -> Result<PostgresConnect

for (key, value) in url.query_pairs() {
match key.as_ref() {
"dbname" => {
if !value.is_empty() {
database_name = value.into_owned();
}
"dbname" if !value.is_empty() => {
database_name = value.into_owned();
}
"dbname" => {}
Comment thread
coderabbitai[bot] marked this conversation as resolved.
"host" => {
set_pg_env(&mut env_vars, "PGHOST", value.as_ref());
}
Expand Down
5 changes: 2 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@ services:
retries: 5

atlas-server:
# Contract verification downloads Solidity's official linux-amd64 binary.
# Keep atlas-server on amd64 locally so verification works on Apple Silicon.
platform: linux/amd64
build:
context: ./backend
dockerfile: Dockerfile
Expand All @@ -40,6 +37,8 @@ services:
FAUCET_ENABLED: ${FAUCET_ENABLED:-false}
CHAIN_NAME: ${CHAIN_NAME:-Unknown}
CHAIN_LOGO_URL: ${CHAIN_LOGO_URL:-}
CHAIN_LOGO_URL_LIGHT: ${CHAIN_LOGO_URL_LIGHT:-}
CHAIN_LOGO_URL_DARK: ${CHAIN_LOGO_URL_DARK:-}
ACCENT_COLOR: ${ACCENT_COLOR:-}
BACKGROUND_COLOR_DARK: ${BACKGROUND_COLOR_DARK:-}
BACKGROUND_COLOR_LIGHT: ${BACKGROUND_COLOR_LIGHT:-}
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ const StatusPage = lazy(() => import('./pages/StatusPage'));

function PageLoader() {
return (
<div className="flex items-center justify-center h-64">
<span className="text-gray-500 text-sm">Loading...</span>
<div className="card flex h-64 items-center justify-center">
<span className="kicker">Loading route</span>
</div>
);
}
Expand Down
9 changes: 9 additions & 0 deletions frontend/src/assets/defaultLogos.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import darkLogo from './evolve-logo.svg';
import lightLogo from './evolve-logo-light.svg';
import type { Theme } from '../context/theme-context';

export function getDefaultLogo(theme: Theme): string {
return theme === 'light' ? lightLogo : darkLogo;
}

export { darkLogo as defaultDarkLogo, lightLogo as defaultLightLogo };
Loading
Loading