This includes copying over the various files needed, while keeping refactoring at a minimum to somewhat try to ease the review. Additional refactoring will take place in follow-up PRs.
Remove anything related to minicbor, excepted for the HTTPs transform (cleanup_response), where the type of transform to use is encoded via minicbor.
Remove CandidType for all types used in JSON requests or responses. Those types are implementation details and should not be exposed outside of this canister.
Logging is currently disabled and will be the subject of a future PR (#276).
Copied metrics in src/rpc_client/eth_rpc/mod.rs is currently dead code and will be removed in a future PR (#277).
Noticeable Added Dependencies:
The goal is that none of the productive code depends on the IC repository and is the main driver for this PR. 2 temporary exceptions were added, which are crates with a very self-contain scoped:
ic-crypto-sha3: a wrapper around sha3. This crate will be published on crates.io
ic-ethereum-types: a crate for common Etheurem types (e.g. Address). This crate will be published on crates.io.
Thank you so much for taking this on! I pushed a commit to fix merge conflicts. This should be good to merge so we can build on top of these changes in parallel.
Remove the dependency on the
ic-cketh-minter
.This includes copying over the various files needed, while keeping refactoring at a minimum to somewhat try to ease the review. Additional refactoring will take place in follow-up PRs.
Overview of copied file
ic-cketh-minter
src/checked_amount.rs
src/rpc_client/checked_amount/mod.rs
src/checked_amount/tests.rs
src/rpc_client/checked_amount/tests.rs
src/eth_rpc.rs
src/rpc_client/eth_rpc/mod.rs
src/eth_rpc/tests.rs
src/rpc_client/eth_rpc/tests.rs
src/eth_rpc_error/mod.rs
src/rpc_client/eth_rpc_error/mod.rs
src/eth_rpc_error/tests.rs
src/rpc_client/eth_rpc_error/tests.rs
src/eth_rpc_client/mod.rs
src/rpc_client/mod.rs
src/numeric/mod.rs
src/rpc_client/numeric/mod.rs
src/numeric/tests.rs
src/rpc_client/numeric/tests.rs
src/eth_rpc_client/providers.rs
src/rpc_client/providers.rs
src/eth_rpc_client/requests.rs
src/rpc_client/requests.rs
src/eth_rpc_client/responses.rs
src/rpc_client/responses.rs
src/eth_rpc_client/tests.rs
src/rpc_client/tests.rs
Noticeable changes:
minicbor
, excepted for the HTTPs transform (cleanup_response
), where the type of transform to use is encoded viaminicbor
.CandidType
for all types used in JSON requests or responses. Those types are implementation details and should not be exposed outside of this canister.src/rpc_client/eth_rpc/mod.rs
is currently dead code and will be removed in a future PR (#277).Noticeable Added Dependencies:
The goal is that none of the productive code depends on the IC repository and is the main driver for this PR. 2 temporary exceptions were added, which are crates with a very self-contain scoped:
ic-crypto-sha3
: a wrapper aroundsha3
. This crate will be published oncrates.io
ic-ethereum-types
: a crate for common Etheurem types (e.g.Address
). This crate will be published oncrates.io
.