-
Notifications
You must be signed in to change notification settings - Fork 30
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(sdk): migrate to ethers v6 #2374
base: feat/major-poc
Are you sure you want to change the base?
Conversation
View your CI Pipeline Execution ↗ for commit 7916bfc.
☁️ Nx Cloud last updated this comment at |
8bf5e2c
to
152ea6f
Compare
d00fbd7
to
1c0a592
Compare
c0b21c8
to
935c9d5
Compare
a6c281e
to
bdafd2d
Compare
1ac7dfe
to
3654777
Compare
cb7c27d
to
c0d1cfb
Compare
37a6202
to
33bbb5b
Compare
b094201
to
2d08363
Compare
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.
The orderbook updates make sense to me. One nit around remaining v5 naming that doesnt apply anymore
140adfc
to
d321490
Compare
09f6e24
to
36f069a
Compare
256faa6
to
313ed85
Compare
}, | ||
"host": "api.sandbox.x.immutable.com", | ||
"host": "api.sandbox.immutable.com", |
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.
The generated-clients
changes that relate to an updated OpenAPI spec can probably be pulled out into a separate PR
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.
One of those changes are related to this PR, as the main change was the updated chainID typing in the EIP712Domain type change, which was a required update to support the ethers v6 migration. If preferred, I can undo all the other unrelated changes but keep that one set of changes. 😄
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.
@zaidarain1 I believe @shirren has created a separate PR for this here
this.#rpcProvider = new StaticJsonRpcProvider({ | ||
url: this.#config.zkEvmRpcUrl, | ||
fetchOptions: { referrer: config.jsonRpcReferrer }, | ||
this.#rpcProvider = new JsonRpcProvider(this.#config.zkEvmRpcUrl, undefined, { |
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.
I believe we'll break the Game SDK(s) by no longer setting the referrer
to config.jsonRpcReferrer
🤔 Have we run this change by the Game SDK team?
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.
Ethers v6 doesn't set "client" as the referrer anymore, and referrer isn't able to be set for the provider either, so this shouldn't be a problem with "client" being set by default.
This was something that I was planning on testing with and bringing up to GameSDK once the SDK was finalised and approved from the @imtbl/sdk npm package side though before release.
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.
Oh nice! With that in mind then, we can remove the jsonRpcReferrer
arg from the config and Passport constructor , and simplify this logic
No description provided.