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

Migrate CheckBuilder to viem #506

Open
shazarre opened this issue Jan 13, 2025 · 1 comment
Open

Migrate CheckBuilder to viem #506

shazarre opened this issue Jan 13, 2025 · 1 comment

Comments

@shazarre
Copy link
Contributor

shazarre commented Jan 13, 2025

In an effort to bootstrap viem migration in a managable way the idea is to migrate CheckBuilder class from packages/cli/src/utils/checks.ts so it uses viem client instead of web3/contract kit.

We should remove both following methods from the class:

  async getWeb3() {
    return this.cmd.getWeb3()
  }

  async getKit() {
    return this.cmd.getKit()
  }

The client (ideally WalletClient extended with publicActions) should be injected on demand and created by BaseCommand.

We can also check the coverage for the builder and cover explicitly whatever necessary (right now it's mostly/if not only indirectly tested by other tests).

Check this closed PR for ready code snippets and inspiration.

@shazarre shazarre added this to the 5 - Celo MVP Mainnet milestone Jan 13, 2025
@aaronmgdr
Copy link
Member

notes from call

must be able to use both viem and ck based commands at same time. because doing all it once would be too big. IE switch one command at a time.
can use most of base code for ViemCommand

stay focused!

keep tests as is!

add public actions to the walletClient on viem instead of separate clients.

make CheckBuilder work with viem. pass client to check builder from command. black box.

cb only needs public client support.

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