-
-
Notifications
You must be signed in to change notification settings - Fork 13
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 from ethjs
to ethers
#29
base: main
Are you sure you want to change the base?
Conversation
I forgot to update the readme! Edit: README has been updated; this should be good to go now. |
`ethers` is better maintained than `ethjs`, and we've been migrating many of our packages to use it. This should work equivalently. This will be a breaking change because this will change public properties of the method registry class.
96ee678
to
9af43c5
Compare
The version of `ethjs-query` we're using has an unlisted dependency upon `babel-runtime`, and will crash if it's not present. Currently it's working because `babel-runtime` is being brought in by another dependency (`fetch-mock`), but that dependency is removed in another PR (#340). Until we can migrate away from using this version of `ethjs-query`, `babel-runtime` has been added as an explicit dependency to ensure it is present. `ethjs-query` is a transitive dependency of `eth-method-registry` via `ethjs`. There is a PR open on `eth-method-registry` to replace `ethjs` altogether [1]. Once those are merged and released, we can update `eth-method-registry` here and remove this `babel-runtime` dependency. [1]: MetaMask/eth-method-registry#29
The version of `ethjs-query` we're using has an unlisted dependency upon `babel-runtime`, and will crash if it's not present. Currently it's working because `babel-runtime` is being brought in by another dependency (`fetch-mock`), but that dependency is removed in another PR (#340). Until we can migrate away from using this version of `ethjs-query`, `babel-runtime` has been added as an explicit dependency to ensure it is present. `ethjs-query` is a transitive dependency of `eth-method-registry` via `ethjs`. There is a PR open on `eth-method-registry` to replace `ethjs` altogether [1]. Once those are merged and released, we can update `eth-method-registry` here and remove this `babel-runtime` dependency. [1]: MetaMask/eth-method-registry#29
|
||
interface DeployedRegistryContract { | ||
entries (bytes: string): string[]; | ||
provider: Provider; |
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.
It might be better to expect an EIP-1193 provider here rather than an ethers provider.
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.
Moving this back into draft until we come up with a better interface to use here.
@Gudahtt could this be revisted? I think removing ethjs across all the dependencies we maintain would be a solid move considering its staleness. |
Happy to take this on, but i'd like more clarification on the issue you highlighted. |
I think what we want here is a type that represents an EIP-1193 provider. Then we can pass a provider that implements that interface (e.g. an Ethers provider) without being tied to a specific version of that specific library |
The version of `ethjs-query` we're using has an unlisted dependency upon `babel-runtime`, and will crash if it's not present. Currently it's working because `babel-runtime` is being brought in by another dependency (`fetch-mock`), but that dependency is removed in another PR (#340). Until we can migrate away from using this version of `ethjs-query`, `babel-runtime` has been added as an explicit dependency to ensure it is present. `ethjs-query` is a transitive dependency of `eth-method-registry` via `ethjs`. There is a PR open on `eth-method-registry` to replace `ethjs` altogether [1]. Once those are merged and released, we can update `eth-method-registry` here and remove this `babel-runtime` dependency. [1]: MetaMask/eth-method-registry#29
The version of `ethjs-query` we're using has an unlisted dependency upon `babel-runtime`, and will crash if it's not present. Currently it's working because `babel-runtime` is being brought in by another dependency (`fetch-mock`), but that dependency is removed in another PR (#340). Until we can migrate away from using this version of `ethjs-query`, `babel-runtime` has been added as an explicit dependency to ensure it is present. `ethjs-query` is a transitive dependency of `eth-method-registry` via `ethjs`. There is a PR open on `eth-method-registry` to replace `ethjs` altogether [1]. Once those are merged and released, we can update `eth-method-registry` here and remove this `babel-runtime` dependency. [1]: MetaMask/eth-method-registry#29
ethers
is better maintained thanethjs
, and we've been migrating many of our packages to use it. This should work equivalently.This will be a breaking change because this will change public properties of the method registry class.