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

Update to use stable Viem / Wagmi versions #63

Merged
merged 26 commits into from
Feb 21, 2024
Merged

Update to use stable Viem / Wagmi versions #63

merged 26 commits into from
Feb 21, 2024

Conversation

zencephalon
Copy link
Collaborator

No description provided.

Copy link

vercel bot commented Feb 14, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
op-wagmi-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 21, 2024 2:36pm

Copy link
Contributor

github-actions bot commented Feb 14, 2024

Coverage Report for op-wagmi (.)

Status Category Percentage Covered / Total
🔵 Lines 38.12% 1114 / 2922
🔵 Statements 38.12% 1114 / 2922
🔵 Functions 32.55% 28 / 86
🔵 Branches 35.63% 31 / 87
File Coverage
File Stmts % Branch % Funcs % Lines Uncovered Lines
Changed Files
example/app/providers.tsx 0% 0% 0% 0% 1-28
example/components/DepositContainer.tsx 0% 0% 0% 0% 1-21
example/components/FinalizeContainer.tsx 0% 0% 0% 0% 1-15
example/components/NetworkSelector.tsx 0% 0% 0% 0% 1-31
example/components/ProveContainer.tsx 0% 0% 0% 0% 1-15
example/components/WithdrawContainer.tsx 0% 0% 0% 0% 1-20
example/components/WithdrawERC20.tsx 0% 0% 0% 0% 1-105
example/components/WithdrawETH.tsx 0% 0% 0% 0% 1-86
example/constants/chainIdToExplorer.ts 0% 0% 0% 0% 1-7
example/constants/networkToChainId.ts 0% 0% 0% 0% 1-7
example/hooks/useSelectedNetwork.ts 0% 0% 0% 0% 1-7
src/constants/errorMessages.ts 48.14% 100% 0% 48.14% 2-3, 6-7, 10-11, 14-15, 18-19, 22-23, 26-27
src/hooks/L1/useBlockNumberOfLatestL2OutputProposal.ts 0% 0% 0% 0% 1-23
src/hooks/L1/useGetL2OutputIndexAfter.ts 0% 0% 0% 0% 1-28
src/hooks/L1/useProveWithdrawalArgs.ts 0% 0% 0% 0% 1-124
src/hooks/L1/useSimulateDepositERC20.ts 100% 50% 100% 100%
src/hooks/L1/useSimulateDepositETH.ts 100% 75% 100% 100%
src/hooks/L1/useSimulateFinalizeWithdrawalTransaction.ts 100% 100% 100% 100%
src/hooks/L1/useSimulateProveWithdrawalTransaction.ts 100% 100% 100% 100%
src/hooks/L1/useWriteDepositERC20.ts 79.43% 66.66% 66.66% 79.43% 79-100
src/hooks/L1/useWriteDepositETH.ts 100% 100% 100% 100%
src/hooks/L1/useWriteFinalizeWithdrawalTransaction.ts 100% 100% 100% 100%
src/hooks/L1/useWriteProveWithdrawalTransaction.ts 100% 100% 100% 100%
src/hooks/L2/useSimulateWithdrawERC20.ts 100% 100% 100% 100%
src/hooks/L2/useSimulateWithdrawETH.ts 100% 100% 100% 100%
src/hooks/L2/useWriteWithdrawERC20.ts 79.2% 100% 66.66% 79.2% 74-94
src/hooks/L2/useWriteWithdrawETH.ts 78.7% 100% 66.66% 78.7% 79-101
src/types/UseSimulateOPActionBaseParameters.ts 0% 0% 0% 0% 1-43
src/types/UseSimulateOPActionBaseReturnType.ts 0% 0% 0% 0% 1-27
src/types/UseWriteOPActionBaseParameters.ts 0% 0% 0% 0% 1-6
src/types/UseWriteOPActionBaseReturnType.ts 0% 0% 0% 0% 1-48
src/types/WriteOPContractBaseParameters.ts 0% 0% 0% 0% 1-25
src/util/getStateTrieProof.ts 0% 0% 0% 0% 1-49
src/util/validateChains.ts 66.27% 50% 83.33% 66.27% 17-18, 20-21, 31-32, 42-43, 49-60, 67-71, 80-83
Generated in workflow #136

package.json Outdated
Comment on lines 105 to 107
"viem": "beta",
"wagmi": "beta"
"viem": "^2.7.9",
"wagmi": "^2.5.7"
Copy link
Collaborator

Choose a reason for hiding this comment

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

i think these be 2.x? that's what we have in op-viem and how wagmi has their peer dependencies set up

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 can change it to that, my understanding of the ^ operator is that ^2.7.9 and ^2.x have the same effect as they both allow any minor and patch version within 2

@lukasrosario
Copy link
Collaborator

lukasrosario commented Feb 14, 2024

@zencephalon looking good! can we update the example app to use this version?

do you think we can get the config changes in this update too? specifically, users shouldnt have to configure op chains as specified here anymore because viem 2 chains have op stack addresses. documentation should be updated to reflect this as well.

@lukasrosario
Copy link
Collaborator

i think we should also just use the viem 2 actions now instead of op-viem

@zencephalon
Copy link
Collaborator Author

@lukasrosario The Viem 2 actions don't map cleanly to op-viem or I would have done it already :/ E.g. Viem doesn't provide any simulation actions

@zencephalon
Copy link
Collaborator Author

@zencephalon looking good! can we update the example app to use this version?

The example app automatically uses whatever version is in the Workspace, no?

@lukasrosario
Copy link
Collaborator

ah i see ok, ack on the viem 2 actions. and yeah you're right it does use workspace, should be good.
so only requests are:

  • set up the peer dependencies so they're the same as op-viem, wagmi etc
  • remove op-config & update docs
  • pnpm changeset so we get an npm release pr

@lukasrosario
Copy link
Collaborator

nice, can you run pnpm changeset so we get the release?

Copy link
Collaborator

@lukasrosario lukasrosario left a comment

Choose a reason for hiding this comment

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

🚀🚀 awesome. can follow up but looks like something happened w/ the test coverage and now it's reporting on the example app

@lukasrosario lukasrosario merged commit ba63525 into master Feb 21, 2024
8 checks passed
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