Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: replace with erc6492 lib and call rpc directly w/o http #649

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all 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
214 changes: 22 additions & 192 deletions Cargo.lock

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

8 changes: 6 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@ 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.30.0", features = ["cacao"] }
erc6492 = { git = "https://github.com/WalletConnect/erc6492.git" }
alloy-provider = { git = "https://github.com/alloy-rs/alloy.git", rev = "d68a6b7" }
alloy-transport = { git = "https://github.com/alloy-rs/alloy.git", rev = "d68a6b7" }
alloy-rpc-client = { git = "https://github.com/alloy-rs/alloy.git", rev = "d68a6b7" }
alloy-json-rpc = { git = "https://github.com/alloy-rs/alloy.git", rev = "d68a6b7" }

# Async
async-trait = "0.1.57"
Expand All @@ -31,7 +35,7 @@ reqwest = { version= "0.11", features = ["deflate", "brotli", "gzip"] }
# Serialization
rmp-serde = "1.1"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
serde_json = { version = "1.0", features = ["raw_value"] }
serde_piecewise_default = "0.2"
serde-aux = "3.1"
validator = { version = "0.16", features = ["derive"] }
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Endpoint: `https://rpc.walletconnect.com/v1?chainId=eip155:1&projectId=<your-pro
For example:

```bash
curl -X POST "https://rpc.walletconnect.com/v1?chainId=eip155:1&projectId=<your-project-id>" --data '{"id":"1","jsonrpc":"2.0","method":"eth_chainId","params":[]}'
curl -H "Content-Type: application/json" -X POST "https://rpc.walletconnect.com/v1?chainId=eip155:1&projectId=<your-project-id>" --data '{"id":"1","jsonrpc":"2.0","method":"eth_chainId","params":[]}'
```

Obtain a `projectId` from <https://cloud.walletconnect.com>
Expand Down Expand Up @@ -41,7 +41,7 @@ just run

```bash
# projectId is not validated under default .env.example configuration
curl -X POST "http://localhost:3000/v1?chainId=eip155:1&projectId=someid" --data '{"id":"1","jsonrpc":"2.0","method":"eth_chainId","params":[]}'
curl -H "Content-Type: application/json" -X POST "http://localhost:3000/v1?chainId=eip155:1&projectId=someid" --data '{"id":"1","jsonrpc":"2.0","method":"eth_chainId","params":[]}'
```

## Testing
Expand Down
Loading
Loading