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

Reduce ethers #2415

Merged
merged 11 commits into from
Oct 17, 2024
Merged

Reduce ethers #2415

merged 11 commits into from
Oct 17, 2024

Conversation

adamgall
Copy link
Member

Reduce and consolidate the usage of ethers to the bare minimum. Only thing blocking us from removing it entirely is our usage of @snapshot-labs/snapshot.js, which requires an instance of ethers.Providers.Web3Provider into its vote function.

Copy link

netlify bot commented Oct 16, 2024

Deploy Preview for decent-interface-dev ready!

Name Link
🔨 Latest commit 3ffe821
🔍 Latest deploy log https://app.netlify.com/sites/decent-interface-dev/deploys/67113da1fa894d00081b008e
😎 Deploy Preview https://deploy-preview-2415.app.dev.decentdao.org
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

src/hooks/DAO/proposal/useCastSnapshotVote.ts Show resolved Hide resolved
src/hooks/DAO/proposal/useCastVote.ts Outdated Show resolved Hide resolved
src/hooks/stake/lido/useLidoStaking.ts Outdated Show resolved Hide resolved
Comment on lines +76 to +81
if (validateENSName(values.destinationAddress) && publicClient) {
const ensAddress = await publicClient.getEnsAddress({ name: values.destinationAddress });
if (ensAddress === null) {
throw new Error('Invalid ENS name');
}
destAddress = ensAddress;
Copy link
Member Author

Choose a reason for hiding this comment

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

We were using an ethers instance to do an ENS name lookup here, but there's a similar function on viem's public client

src/providers/Ethers/hooks/useEthersSigner.ts Outdated Show resolved Hide resolved
src/providers/Providers.tsx Show resolved Hide resolved
Copy link
Contributor

@mudrila mudrila left a comment

Choose a reason for hiding this comment

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

Almost there...
I feel so hyped sir!
Thank you for this satisfying PR!

src/assets/abi/LidoStEthAbi.ts Outdated Show resolved Hide resolved
src/hooks/DAO/proposal/useCastSnapshotVote.ts Outdated Show resolved Hide resolved
src/hooks/stake/lido/useLidoStaking.ts Outdated Show resolved Hide resolved
src/hooks/stake/lido/useLidoStaking.ts Outdated Show resolved Hide resolved
src/hooks/utils/useSignerOrProvider.ts Outdated Show resolved Hide resolved
src/providers/Ethers/hooks/useEthersSigner.ts Outdated Show resolved Hide resolved
src/utils/snapshotVote.ts Outdated Show resolved Hide resolved
src/utils/snapshotVote.ts Outdated Show resolved Hide resolved
src/utils/snapshotVote.ts Outdated Show resolved Hide resolved
@adamgall
Copy link
Member Author

@Da-Colon please re-review.

@adamgall adamgall merged commit 7ab50af into develop Oct 17, 2024
10 checks passed
@adamgall adamgall deleted the reduce-ethers branch October 17, 2024 22:29
@adamgall adamgall restored the reduce-ethers branch October 17, 2024 22:31
@adamgall adamgall deleted the reduce-ethers branch October 17, 2024 22:33
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.

3 participants