Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
eb86813
XC-412: Remove `EvmRpcSetup::request` method
lpahlavi Sep 18, 2025
d78a8bb
XC-412: Remove blocking `EvmRpcSetup`
lpahlavi Sep 18, 2025
08fca95
XC-412: Rename `EvmRpcNonblockingSetup`
lpahlavi Sep 18, 2025
48f5a14
Remove `getMetrics` endpoint
lpahlavi Sep 19, 2025
7753b21
Merge branch 'main' into lpahlavi/remove-get-metrics-endpoint
lpahlavi Sep 26, 2025
27fb2c2
XC-412: Add `json_request` to EVM RPC canister
lpahlavi Sep 17, 2025
4bae381
XC-412: Revert unnecessary changes
lpahlavi Sep 26, 2025
97a712e
XC-412: Fix response ID
lpahlavi Sep 26, 2025
c478ad8
XC-412: Add feature flag to enable alloy
lpahlavi Sep 26, 2025
bab3c2b
XC-412: Remove `EvmRpcRequest::Output`
lpahlavi Sep 26, 2025
664ed9f
XC-412: Format
lpahlavi Sep 26, 2025
50bda83
XC-412: Add `EvmRpcResponseConverter` trait
lpahlavi Sep 29, 2025
87d13d9
XC-412: Clippy
lpahlavi Sep 29, 2025
ccd2866
Merge branch 'main' into lpahlavi/XC-412-add-raw-request
lpahlavi Sep 30, 2025
e1ecaf4
XC-412: Keep `json` variable name in Candid
lpahlavi Sep 30, 2025
f8f19e4
XC-412: Rename `json_request` to `multi_request`
lpahlavi Sep 30, 2025
87cd469
XC-412: Add some doc to `multi_request` in Candid file
lpahlavi Sep 30, 2025
e6da55b
XC-412: Fix `ResponseTransform::Raw`
lpahlavi Sep 30, 2025
003ebaa
XC-412: Add `RawJson` wrapper for `String`
lpahlavi Sep 30, 2025
caf1526
XC-412: Add metrics label for manual requests
lpahlavi Sep 30, 2025
de85525
XC-412: Add note about ID being overwritten
lpahlavi Sep 30, 2025
471fd8d
XC-412: Clippy
lpahlavi Sep 30, 2025
c183f06
XC-412: Change `RpcMethod::Custom` to hold `String`
lpahlavi Sep 30, 2025
0d3a318
XC-412: Add `is_manual_request="true"` to metrics assertions
lpahlavi Sep 30, 2025
91a056d
XC-412: Move `AlloyResponseConverter` to separate file
lpahlavi Sep 30, 2025
e6d4a02
XC-412: Don't use `EvmRpcRequest::CandidOutput` in `EvmRpcResponseCon…
lpahlavi Sep 30, 2025
a0aef0f
Merge branch 'lpahlavi/XC-412-add-raw-request' into lpahlavi/XC-412-a…
lpahlavi Sep 30, 2025
b843836
XC-412: Clippy
lpahlavi Sep 30, 2025
9599dda
Merge branch 'main' into lpahlavi/XC-412-alloy-feature-flag
lpahlavi Oct 1, 2025
8f5c1d5
XC-412: Add integration tests for Candid response types
lpahlavi Oct 1, 2025
79c9512
XC-412: Clippy
lpahlavi Oct 1, 2025
00404d9
XC-412: Clean-up `MultiRpcResult` imports in doc
lpahlavi Oct 1, 2025
266bc72
XC-502: Combine Candid and Alloy tests
lpahlavi Oct 6, 2025
cefeb12
XC-502: Fixup: delete test
lpahlavi Oct 6, 2025
d08a653
XC-502: Streamline expected result definitions
lpahlavi Oct 6, 2025
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
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ alloy-rpc-types = { workspace = true }
assert_matches = { workspace = true }
async-trait = { workspace = true }
candid_parser = { workspace = true }
evm_rpc_client = { path = "evm_rpc_client" }
evm_rpc_client = { path = "evm_rpc_client", features = ["alloy"] }
ic-crypto-test-utils-reproducible-rng = { git = "https://github.com/dfinity/ic", rev = "release-2024-09-26_01-31-base" }
ic-error-types = { workspace = true }
ic-management-canister-types = { workspace = true }
Expand Down
12 changes: 9 additions & 3 deletions evm_rpc_client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ repository = "https://github.com/dfinity/evm-rpc-canister"
documentation = "https://docs.rs/evm_rpc_client"

[dependencies]
alloy-primitives = { workspace = true }
alloy-rpc-types = { workspace = true }
alloy-primitives = { workspace = true, optional = true }
alloy-rpc-types = { workspace = true, optional = true }
async-trait = { workspace = true }
candid = { workspace = true }
evm_rpc_types = { path = "../evm_rpc_types", features = ["alloy"] }
evm_rpc_types = { path = "../evm_rpc_types" }
ic-cdk = { workspace = true }
ic-error-types = { workspace = true }
serde = { workspace = true }
Expand All @@ -24,4 +24,10 @@ strum = { workspace = true }

[dev-dependencies]
alloy-dyn-abi = { workspace = true }
alloy-primitives = { workspace = true }
alloy-rpc-types = { workspace = true }
evm_rpc_types = { path = "../evm_rpc_types", features = ["alloy"] }
tokio = { workspace = true, features = ["full"] }

[features]
alloy = ["evm_rpc_types/alloy", "dep:alloy-primitives", "dep:alloy-rpc-types"]
12 changes: 6 additions & 6 deletions evm_rpc_client/src/fixtures/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,28 +9,28 @@ use ic_error_types::RejectCode;
use serde::de::DeserializeOwned;
use std::collections::BTreeMap;

impl<R> ClientBuilder<R> {
impl<R, C> ClientBuilder<R, C> {
/// Set the runtime to a [`StubRuntime`].
pub fn with_stub_responses(self) -> ClientBuilder<StubRuntime> {
pub fn with_stub_responses(self) -> ClientBuilder<StubRuntime, C> {
self.with_runtime(|_runtime| StubRuntime::default())
}

/// Change the runtime to return the given stub response for all calls.
pub fn with_default_stub_response<Out: CandidType>(
self,
stub_response: Out,
) -> ClientBuilder<StubRuntime> {
) -> ClientBuilder<StubRuntime, C> {
self.with_stub_responses()
.with_default_response(stub_response)
}
}

impl ClientBuilder<StubRuntime> {
impl<C> ClientBuilder<StubRuntime, C> {
/// Change the runtime to return the given stub response for all calls.
pub fn with_default_response<Out: CandidType>(
self,
stub_response: Out,
) -> ClientBuilder<StubRuntime> {
) -> ClientBuilder<StubRuntime, C> {
self.with_runtime(|runtime| runtime.with_default_response(stub_response))
}

Expand All @@ -39,7 +39,7 @@ impl ClientBuilder<StubRuntime> {
self,
method_name: &str,
stub_response: Out,
) -> ClientBuilder<StubRuntime> {
) -> ClientBuilder<StubRuntime, C> {
self.with_runtime(|runtime| runtime.with_response_for_method(method_name, stub_response))
}
}
Expand Down
Loading