From 88490c76d31e33a44cf5be39e57276cd455a450a Mon Sep 17 00:00:00 2001 From: Chris Smith <1979423+chris13524@users.noreply.github.com> Date: Wed, 11 Dec 2024 12:18:03 -0500 Subject: [PATCH] chore: bump alloy & foundry to latest (#83) * chore: bump alloy & foundry to latest * chore: fix CodeQL * chore: fix syntax? * chore: fix CodeQL * chore: bump erc6492 * chore: ditch EOL versions * chore: fix merge * chore: fmt --- .github/workflows/release-kotlin.yml | 4 ++-- Cargo.toml | 6 +++--- Makefile | 5 +++++ crates/yttrium/src/chain_abstraction/tests.rs | 7 ++----- crates/yttrium_dart/rust/Cargo.toml | 5 ++--- test/scripts/forked_state/docker-compose.yaml | 2 +- 6 files changed, 15 insertions(+), 14 deletions(-) diff --git a/.github/workflows/release-kotlin.yml b/.github/workflows/release-kotlin.yml index a686afe9..6a97c8d7 100644 --- a/.github/workflows/release-kotlin.yml +++ b/.github/workflows/release-kotlin.yml @@ -81,7 +81,7 @@ jobs: cp target/${{ matrix.target }}/release/libuniffi_yttrium.so yttrium/libs/$abi_name/ - name: Upload artifacts - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: artifacts path: yttrium/ @@ -95,7 +95,7 @@ jobs: uses: actions/checkout@v3 - name: Download artifacts - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: artifacts path: yttrium/ diff --git a/Cargo.toml b/Cargo.toml index 79f90578..6955cecf 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -34,9 +34,9 @@ serde_json = "1.0" oslog = "0.2.0" log = "0.4.20" -alloy = "0.6.1" -alloy-provider = "0.6.1" -erc6492 = { git = "https://github.com/reown-com/erc6492.git", branch = "main" } +alloy = "0.7.3" +alloy-provider = "0.7.3" +erc6492 = { git = "https://github.com/reown-com/erc6492.git", rev = "3e764e1" } serial_test = "3.2.0" diff --git a/Makefile b/Makefile index 1f6d5b8d..3cbdd4fa 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,11 @@ CONFIG = debug PLATFORM_IOS = iOS Simulator,id=$(call udid_for,iOS 17.5,iPhone \d\+ Pro [^M]) +build: + # GitHub CodeQL is automatically calling `make build` on PRs + # This Makefile is deprecated, but we need to keep this make target for CodeQL to work + cargo build + build-swift-apple-platforms: export USE_LOCAL_RUST_XCFRAMEWORK=1; \ for platform in "iOS"; do \ diff --git a/crates/yttrium/src/chain_abstraction/tests.rs b/crates/yttrium/src/chain_abstraction/tests.rs index a6944f20..0fa1f26f 100644 --- a/crates/yttrium/src/chain_abstraction/tests.rs +++ b/crates/yttrium/src/chain_abstraction/tests.rs @@ -860,7 +860,7 @@ async fn happy_path() { txn.to.unwrap() ); assert_eq!(route_ui_fields.fee.fee.symbol, "ETH"); - assert_eq!(route_ui_fields.fee.fee.unit, Unit::ETHER); + assert_eq!(route_ui_fields.fee.fee.unit, Unit::ETHER.get()); assert!(floats_close( route_ui_fields.fee.fee.as_float_inaccurate(), Amount::new("NULL".to_owned(), fee, Unit::ETHER) @@ -1374,10 +1374,7 @@ async fn happy_path_full_dependency_on_route_ui_fields() { assert_eq!(result.metadata.funding_from.len(), 1); assert_eq!(result.metadata.funding_from.first().unwrap().symbol, "USDC"); - assert_eq!( - result.metadata.funding_from.first().unwrap().decimals, - Unit::new(6).unwrap() - ); + assert_eq!(result.metadata.funding_from.first().unwrap().decimals, 6); assert_eq!( result .metadata diff --git a/crates/yttrium_dart/rust/Cargo.toml b/crates/yttrium_dart/rust/Cargo.toml index 05bc86ae..38dbab5d 100644 --- a/crates/yttrium_dart/rust/Cargo.toml +++ b/crates/yttrium_dart/rust/Cargo.toml @@ -15,7 +15,7 @@ flutter_rust_bridge_codegen = "2.6.0" [dependencies] flutter_rust_bridge = "=2.7.0" -yttrium = { git = "https://github.com/reown-com/yttrium.git", package = "yttrium"} +yttrium = { path = "../../yttrium" } # uniffi = { git = "https://github.com/mozilla/uniffi-rs", rev = "e796e00ad150f8b14b61a859a2e8c6497b35074e" } openssl = { version = "0.10", features = ["vendored"] } openssl-sys = { version = "0.9.103", features = ["vendored"] } @@ -26,8 +26,7 @@ eyre.workspace = true thiserror.workspace = true alloy.workspace = true -alloy-provider = "0.6.1" -erc6492 = { git = "https://github.com/reown-com/erc6492.git", branch = "main" } +erc6492.workspace = true # Async tokio.workspace = true diff --git a/test/scripts/forked_state/docker-compose.yaml b/test/scripts/forked_state/docker-compose.yaml index 854067e4..c7be6332 100644 --- a/test/scripts/forked_state/docker-compose.yaml +++ b/test/scripts/forked_state/docker-compose.yaml @@ -1,6 +1,6 @@ services: anvil: - image: ghcr.io/foundry-rs/foundry:nightly-96105b4d240681c336e063eac0e250cc51a84414 + image: ghcr.io/foundry-rs/foundry:nightly-00efa0d5965269149f374ba142fb1c3c7edd6c94 restart: unless-stopped ports: ["8545:8545"] entrypoint: [ "anvil", "--fork-url", "https://gateway.tenderly.co/public/sepolia", "--host", "0.0.0.0", "--block-time", "0.1", "--gas-price", "1", "--silent", "--hardfork", "prague" ]