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

Integration tests idea #1

Closed
zsluedem opened this issue Nov 23, 2022 · 3 comments
Closed

Integration tests idea #1

zsluedem opened this issue Nov 23, 2022 · 3 comments
Assignees

Comments

@zsluedem
Copy link
Collaborator

zsluedem commented Nov 23, 2022

Problem

We need a local Ethereum network tool like Hardhat tests. They should provide enough gRPCJSON endpoint and correct EVM execution. The bundler could be able to integrate with the local test network.

Proposed solution

I suggest we used the anvil tool. It is written in Rust and it is light enough for tests.

@Vid201 Please let me know if you have some other options to choose.

Goal

  1. Introduce anvil tool into the repo.
  2. Setup the test environment for abstract contracts .
  3. Integrate with the anvil node with bundler.(This could be another issue.)

The goal here is to achieve 1 and 2.

@Vid201
Copy link
Member

Vid201 commented Nov 23, 2022

That's a great issue!

Hmmm, it's an option to use anvil. Corrent me if I'm wrong, but both hardhat and anvil do not support gRPC endpoints.

But I think it's fine to start with JSON RPC calls to either hardhat or anvil (we can reuse/start hardhat setup from here, no need to add the setup here at the beginning) with ethers-rs. This way, we do not have to worry about the wallet side and smart contracts (and deploying them). gRPC would come into play when bundler is integrated into the execution client and would have direct access to the blockchain state and EVM.

Similar to how stackup-bundler connect to Ethereum node with ethclient (geth).

At later stages we could develop some client SDK and tests for client side also.

What do you think? @zsluedem

@zsluedem
Copy link
Collaborator Author

Correct me if I'm wrong, but both hardhat and anvil do not support gRPC endpoints.

Both hardhat and anvil support eth JSON RPC endpoint(not gRPC, my bad) -> hardhat JSON RPC and Anvil JSON.

But I think it's fine to start with JSON RPC calls to either hardhat or anvil (we can reuse/start hardhat setup from here, no need to add the setup here at the beginning) with ethers-rs.

Yes. I was exploring using ethers-rs for setting up the smart contract yesterday.

This way, we do not have to worry about the wallet side and smart contracts (and deploying them). gRPC would come into play when bundler is integrated into the execution client and would have direct access to the blockchain state and EVM.

I think I misunderstood your idea on gRPC in the very first place. Thanks for correcting me! We n

Similar to how stackup-bundler connect to Ethereum node with ethclient (geth).

Got it! Thanks~

@zsluedem
Copy link
Collaborator Author

#26 closing this now because anvil is successfully landed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants