-
Notifications
You must be signed in to change notification settings - Fork 191
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
feat: bump ethers to v6 #6224
feat: bump ethers to v6 #6224
Conversation
Current dependencies on/for this PR:
This stack of pull requests is managed by Graphite. |
ab15bed
to
5a0dd6d
Compare
c34b8d7
to
f2820ca
Compare
feat: migrate AddressZero -> ZeroAddress wip: wip fix: types feat: hexValue -> toQuantity wip: wip wip: wip wip: wip wip: wip
This reverts commit 849fd13.
25972e7
to
4531a5f
Compare
.../providers/thorchain-savers/components/ThorchainSaversManager/Deposit/components/Confirm.tsx
Outdated
Show resolved
Hide resolved
.../providers/thorchain-savers/components/ThorchainSaversManager/Deposit/components/Confirm.tsx
Outdated
Show resolved
Hide resolved
src/features/defi/providers/foxy/components/FoxyManager/Deposit/components/Confirm.tsx
Show resolved
Hide resolved
packages/unchained-client/src/evm/bnbsmartchain/parser/bep20.ts
Outdated
Show resolved
Hide resolved
...providers/thorchain-savers/components/ThorchainSaversManager/Withdraw/components/Confirm.tsx
Outdated
Show resolved
Hide resolved
...roviders/thorchain-savers/components/ThorchainSaversManager/Withdraw/components/Withdraw.tsx
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
code-wise looking fantastic ser, will wait for second pass to dig into deep functional testing
Viem should have all you need here. We do have a splitSignature equiv here: https://viem.sh/docs/utilities/hexToSignature |
Testing pass 1 notes✅ Asset generation script happy ❌ EVM allowance approvals - the allowance step disappears from the UI steps which is confusing. Unsure if this is related to this PR or an existing issue https://github.com/shapeshift/web/assets/125113430/42387e9c-ea2c-4e52-9f4a-167a2e50deab ❌ voting power snapshot requests fire periodically (as expected), but frequently failing with code 500 ❌ EVM swap on 0x - unsure if PR related or other cause ❌ ERC20 allowance approval on lifi - clicking "sign transaction" on the allowance approval resulted in error toast: Then it seems the allowance succeeds somhow (?) but the allowance step disappears. Clicking "sign transaction" results in successful trade with an error on the approval: Both txs (approval and swap txs) are successful though Non-blockers / unrelated to this PRLending page shows react error spam related to missing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM now, all issues found unrelated to this pr or have existing ticket for separate fix
Description
This bumps ethers to the latest major i.e v6.
While at it, this also moves many of ethers utils to their viem equivalent, minimizing our reliance on ethers. Things like providers and signature/transaction utilities have been kept the ethers way, as:
splitSignature
and we would have to manually do secp256k1 elliptic curve business with e.g@noble/curves/secp256k1
or similar libsNotes:
@uniswap/sdk
so this keeps ethers v5 under theethers5
yarn alias, and also adds ethers v5 providers in our ethers singletonethers/lib/utils
react-app-rewired
aliasing that we use in web, in vitest.Tested:
- Browser provider does not allow to subscribe for EIP1193 events ethers-io/ethers.js#4334 still open upstream, but tested accounts and chain switch locally and this only seems to be error spew and not actually break anythingerrors.ts:117 Uncaught (in promise) TypeError: unknown ProviderEvent (argument="event", value="accountsChanged", code=INVALID_ARGUMENT, version=6.11.1)
useSendDetails
anduseFormSend
tests until wip: bump ethers to v6 hdwallet#666 goes inPull Request Type
Issue (if applicable)
Risk
Very high. Anything EVM could be broken, see the testing done in the PR description body above. We should give this the highest scrutiny and not be in any kind of rush to get this in, as this puts us in a better state lib-wise, leveraging the latest ethers major, but isn't something that should get in ASAP.
Testing
Tested
above. Anything EVM should be tested. Connection (for all wallets), accounts balances, DeFi metadata and user data, accounts/chain switch, approvals/allowance checks, Tx building and broadcasting (send, DeFi), message signing (CoW/wherever), etc.Engineering
Operations
Screenshots (if applicable)