celo-org / developer-tooling

🛠️ SDKs and CLI for interacting with Celo
Apache License 2.0
10 stars 6 forks source link

move away from web3 v1. (requires refactor) #64

Open aaronmgdr opened 8 months ago

aaronmgdr commented 8 months ago

Currently on web3 1.10.3 (final version for 1.x) we need to move away for security

There are api changes which nessessaitate some design thinking on how we re build on top of the new version

https://docs.web3js.org/guides/web3_upgrade_guide/x/

### Tasks
- [ ] https://github.com/celo-org/developer-tooling/issues/303
- [ ] https://github.com/celo-org/developer-tooling/issues/312
- [ ] https://github.com/celo-org/developer-tooling/issues/318
aaronmgdr commented 8 months ago

this is a mega big upgrade

aaronmgdr commented 6 months ago

reading over the upgrade guide and guide to create transaction plugins for web3 v4. i think the signing that happens in wallet-base would become a web3 plugin @celo/web3-plugin-gas-tokens if wallet-base was the only wallet-*** package i would say thats all there was to it however...

the celo/wallet- system of packages is a bit hard to move as it doesnt really correspond as far as i see with uses of the term wallet in web3 (or ethers or viem) they are kinds like signers in the sense that the signTransaction is in them. maybe they can go away? but will need to make sure hsm signers and ledger signing and all that still work. which will be tricky to test

aaronmgdr commented 6 months ago

potentially blocked by #220

although we could possibly get around it by

  1. doing the upgrades in dt repo
  2. releasing beta
  3. using beta in socialconnect repo
  4. upgrading web3 in sc repo
  5. releasing updated identity package as a beta
  6. using that identity beta in dt repo for cli
  7. releasing full prod releases from dt repo.
aaronmgdr commented 5 months ago

pausing for now

aaronmgdr commented 2 months ago

obvious move is to web3 v1. however given the complexity at this point its likely not more difficult to move to contractkit / cli being powered by viem,