-
Notifications
You must be signed in to change notification settings - Fork 21
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
Remove Ethers dependency from sapphire-paratime package, add viem v2 & wagmi v2 packages #303
base: main
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for oasisprotocol-sapphire-paratime canceled.
|
Feedback from Matevz
|
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.
Comments cover client code. Will send notes on integrations next. Still need to QA as well.
Sleeping over this, I would name the stable branch as |
f1ffea9
to
d05539d
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.
I took a QA pass around examples and the Hardhat fork which worked great :)
"types": "./dist/_types/index.d.ts", | ||
"default": "./dist/_esm/index.js" | ||
}, | ||
"scripts": { |
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.
(non-blocking) noting we don't have tests for this one.
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.
We don't have automated tests for this.
Will need Synpress / DappWrite tests for the frontend related stuff as can't test Wagmi + MetaMask without that.
request, | ||
), | ||
request, | ||
// TODO: wrap `getSigner()` |
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.
Or I guess devs could do this themselves.
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.
So, I can't easily test this without a provider like MetaMask, as getSigner
will try to enumerate accounts, e.g. in geth.
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 vote to merge, and we can iterate from there.
Simplified
sapphire-paratime
dependenciesethers
, this reduces bundled size significantly when used standalone or with Viemtweetnacl.js
, extracted necessary functions intomunacl.ts
sapphire.wrap
function, it now exposeswrapEthereumProvider
which only wraps EIP-1193 compatible providersTests:
clients/js/scripts/proxy.ts
) which will die if any unencrypted transactions, calls or gas estimates are made.Integrations:
@oasisprotocol/sapphire-ethers-v6
@oasisprotocol/wagmi-v2
@oasisprotocol/viem-v2
Removed duplicate example projects (e.g. where two projects use the exact same underlying libraries)
hardhat-viem
(Hardhat + Viem)onchain-signer
(Hardhat + Ignition + Ethers v6)hardhat-boilerplate
(Hardhat + Ethers v5 + frontend & bundling)wagmi-v2
(Wagmi + frontend & bundling)wagmi-v1