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

ethers v5 --> v6 #131

Closed
wants to merge 17 commits into from
Closed

ethers v5 --> v6 #131

wants to merge 17 commits into from

Conversation

andrewkmin
Copy link
Collaborator

@andrewkmin andrewkmin commented Oct 11, 2023

Summary & Motivation

$title! The upgrade isn't quite complete until we have an Eip1193Bridge for Ethers v6. This is on the Ethers teams' radar; for now, if that's a crucial piece of functionality for our users, they can resort to using our Ethers v5 implementation.

How I Tested These Changes

  • Unit
  • Examples
    • with-gnosis
    • hi

@codesandbox-ci
Copy link

codesandbox-ci bot commented Oct 11, 2023

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Copy link
Contributor

@r-n-o r-n-o left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

v6 reads much better than v5 👏

Do you want to have a changeset here? I think you'll need to release a major version bump for @turnkey/ethers, and then see which packages depend on it. Might be good to spot check the examples using ethers but looks like you've done this already!

@@ -1,10 +1,10 @@
import { ethers } from "ethers";
import { TurnkeyActivityError, TurnkeyRequestError } from "@turnkey/http";
import type { TurnkeyClient } from "@turnkey/http";
import type { TypedDataSigner } from "@ethersproject/abstract-signer";
// import type { TypedDataSigner } from "@ethersproject/abstract-signer";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove?

Comment on lines 144 to 145
// maybe we no longer need to drop this
// delete unsignedTx.from;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you explain your reasoning? Generally, when it doubt: ✂️ -- we can always add this back later if needed.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe ethers v6 now has native support for eip1193 (no Eip1193Bridge required). However, I'm not sure this is currently unit testable in this way (node environment). I've reached out to the Ethers team to see if there is a new, Ethers v6-specific way of creating an eip1193 provider.

If they don't come up with a solution in a timely manner or say it's currently not supported, I'm also down to remove this test for now and revisit this topic altogether once we upgrade demo-consumer-wallet as a whole

@socket-security
Copy link

socket-security bot commented Oct 11, 2023

New dependencies detected. Learn more about Socket for GitHub ↗︎

Packages Version New capabilities Transitives Size Publisher
typechain 8.3.1 filesystem, environment +4 1.75 MB ethereum-ts-bot

@andrewkmin andrewkmin force-pushed the andrew/ethers-v6 branch 2 times, most recently from b4f2db1 to 88f8785 Compare October 12, 2023 16:11
@andrewkmin andrewkmin changed the title [WIP] ethers v5 --> v6 ethers v5 --> v6 Oct 16, 2023
@andrewkmin
Copy link
Collaborator Author

closing in favor of #200

@andrewkmin andrewkmin closed this Feb 7, 2024
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

Successfully merging this pull request may close these issues.

2 participants