Skip to content

Commit

Permalink
feat: partial prepareCalls impl (#789)
Browse files Browse the repository at this point in the history
* chore: upgrade IRN and alloy

* chore: bump

* chore: remove submodule

* chore: use tagged versions

* feat: wallet service

* chore: implement logic

* chore: bump yttrium

* chore: gas

* chore: bump yttrium

* feat: implement dummy signature and paymaster

* chore: bump yttrium

* fix: reject if paymaster service is provided

* chore: bump yttrium

* chore: fmt

* chore: add TODOs

* chore: use tagged version
  • Loading branch information
chris13524 authored Sep 26, 2024
1 parent b0edc93 commit 39583b7
Show file tree
Hide file tree
Showing 10 changed files with 1,317 additions and 156 deletions.
913 changes: 762 additions & 151 deletions Cargo.lock

Large diffs are not rendered by default.

9 changes: 8 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ build = "build.rs"
[dependencies]
wc = { git = "https://github.com/WalletConnect/utils-rs.git", tag = "v0.9.0", features = ["alloc", "analytics", "future", "http", "metrics", "geoip", "geoblock", "rate_limit"] }
relay_rpc = { git = "https://github.com/WalletConnect/WalletConnectRust.git", tag = "v0.32.0", features = ["cacao"] }
yttrium = { git = "https://github.com/reown-com/yttrium.git", rev = "51e836e" }

# Async
async-trait = "0.1.82"
Expand Down Expand Up @@ -79,7 +80,7 @@ rand = "0.8.5"
rand_core = "0.6"
prometheus-http-query = "0.6.6"
ethers = { version = "2.0.11", git = "https://github.com/gakonst/ethers-rs" } # using Git version because crates.io version fails clippy
alloy-primitives = "0.8"
alloy = { version = "0.3.6", features = ["providers"] }

bytes = "1.7.1"
data-encoding = "2.6.0"
Expand All @@ -91,6 +92,8 @@ uuid = "1.10"

# System CPU and Memory metrics
sysinfo = "0.30"
eyre = "0.6.12"
fastlz-rs = "0.0.3"

[dev-dependencies]
jsonrpc = "0.18.0"
Expand All @@ -100,9 +103,13 @@ test-context = "0.1"
vergen = { version = "6", default-features = false, features = ["build", "cargo", "git"] }

[features]
full = []
test-localhost = []

[profile.release-debug]
inherits = "release"
lto = "thin"
debug = 1

# [patch.'https://github.com/reown-com/yttrium.git']
# yttrium = { path = "../yttrium/crates/yttrium" }
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2022 WalletConnect
Copyright (c) 2024 reown inc.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
5 changes: 3 additions & 2 deletions justfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
binary-crate := "."
tf-dir := "terraform"
set dotenv-load

export JUST_ROOT := justfile_directory()

Expand Down Expand Up @@ -159,7 +160,7 @@ cargo-test-default: _check-cmd-cargo
# Run project tests with all features activated
cargo-test-all: _check-cmd-cargo
@printf '==> Testing project ({{ light-green }}all features{{ nocolor }})\n'
cargo test --all-features
cargo test --features=full

# Run tests from project documentation
cargo-test-doc: _check-cmd-cargo
Expand All @@ -179,7 +180,7 @@ cargo-check: _check-cmd-cargo
# Check rust project with clippy
cargo-clippy: _check-cmd-cargo-clippy
@printf '==> Running {{ color-cmd }}clippy{{ nocolor }}\n'
cargo clippy --all-features --tests -- -D clippy::all
cargo clippy --features=full --tests -- -D clippy::all

# Check unused dependencies
cargo-udeps: _check-cmd-cargo-udeps
Expand Down
1 change: 1 addition & 0 deletions src/analytics/message_info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ pub enum MessageSource {
ProfileAttributesSigValidate,
ProfileRegisterSigValidate,
SessionCoSignSigValidate,
WalletPrepareCalls,
}

#[cfg(test)]
Expand Down
1 change: 1 addition & 0 deletions src/handlers/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ pub mod profile;
pub mod proxy;
pub mod sessions;
pub mod supported_chains;
pub mod wallet;
pub mod ws_proxy;

static HANDLER_TASK_METRICS: TaskMetrics = TaskMetrics::new("handler_task");
Expand Down
2 changes: 2 additions & 0 deletions src/handlers/wallet/mod.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
pub mod prepare_calls;
// pub mod send_prepare_calls;
Loading

0 comments on commit 39583b7

Please sign in to comment.