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

Switch Quest Chains from ethers to Viem for Contract Access #1761

Merged
merged 41 commits into from
Aug 13, 2024

Conversation

dysbulic
Copy link
Member

@dysbulic dysbulic commented Jul 9, 2024

Overview

What features/fixes does this PR include?

Replaces the Quest Chains SDK contract code generated by TypeChain with Viem's getContract.

Follow-Up Improvement Ideas

A Viem client masquerading as an ethers provider is still used in several places. Fully transitioning would likely not be too difficult.

This is part of the process of transitioning TheGame back to ethers v6 so we can use the Ethereum Attestation Service.

Also, this is part of migrating the wallet management infrastructure to WalletConnect’s (Wallet|App)Kit.

Implementation

Updates bunches of libraries including the GraphQL generation, ESLint, Ceramic, & yarn from 1.19 to 4.3. The yarn update required quite a bit of finagling with the building & deployment processes.

It switches local paths from using the paths directive of TypeScript to the imports section of package.json.

I'm creating a Viem WalletClient from window.ethereum without any additional sign-in. That may be problematic, but all that should get overhauled when integrating AppKit.

@dysbulic dysbulic requested a review from Innkeeping July 9, 2024 08:50
Copy link

vercel bot commented Jul 9, 2024

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

1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
the-game-web ⬜️ Ignored (Inspect) Visit Preview Aug 13, 2024 11:07am

@dysbulic dysbulic self-assigned this Jul 9, 2024
@github-actions github-actions bot temporarily deployed to Test-PR-1761 July 9, 2024 08:50 Destroyed
Copy link
Contributor

@Innkeeping Innkeeping left a comment

Choose a reason for hiding this comment

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

so much space saved with webp. hope viem helps on questchains

@github-actions github-actions bot temporarily deployed to Test-PR-1761 July 9, 2024 09:41 Destroyed
@github-actions github-actions bot temporarily deployed to Test-PR-1761 July 9, 2024 11:07 Destroyed
Copy link
Contributor

Choose a reason for hiding this comment

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

Do you need the comma before the parentheses on line 54 for Hasura Admin?

Copy link
Member Author

Choose a reason for hiding this comment

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

Lines will frequently include a trailing comma so that later when a line is added after it, you don't have to add a comma in that edit.

Otherwise, git will show both lines as changed even though the one that just got a comma isn't meaningfully different.

Copy link
Contributor

@Innkeeping Innkeeping left a comment

Choose a reason for hiding this comment

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

Seems good. Mentioned maybe an extra comma in another comment.

Copy link

@JesuscoinsIII JesuscoinsIII left a comment

Choose a reason for hiding this comment

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

updated

@github-actions github-actions bot temporarily deployed to Test-PR-1761 July 30, 2024 10:33 Destroyed
@dysbulic dysbulic added codebase code quality and/or dev tooling related dependencies Pull requests that update a dependency file bug-fix Ceramic Issues surrounding successful integration with the Ceramic Network labels Jul 30, 2024
Copy link
Contributor

@Innkeeping Innkeeping left a comment

Choose a reason for hiding this comment

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

👍

@github-actions github-actions bot temporarily deployed to Test-PR-1761 August 13, 2024 09:30 Destroyed
Copy link
Contributor

Choose a reason for hiding this comment

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

@dysbulic Does line 41 change need an actual url link also?

Copy link
Contributor

Choose a reason for hiding this comment

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

Or it's fine because line 44 refers to the env? I'm still getting backend build fails on the test build for dAcademy PR. @dysbulic

@dysbulic dysbulic marked this pull request as ready for review August 13, 2024 23:00
@dysbulic dysbulic merged commit 86a0031 into develop Aug 13, 2024
21 checks passed
@dysbulic dysbulic deleted the fix/quest-chains-ethers branch August 13, 2024 23:04
Copy link

Successfully undeployed the Preview of this Pull Request

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-fix Ceramic Issues surrounding successful integration with the Ceramic Network codebase code quality and/or dev tooling related dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants