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

Multichain erc20 vote weight + Native ETH voting #10049

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

rbennettcw
Copy link
Contributor

@rbennettcw rbennettcw commented Nov 26, 2024

Link to Issue

Closes: #9849
Closes: #9927

Description of Changes

  • Adds support for chain selection on ERC20 weighted topics
  • Adds support for native ETH for ERC20 weighted topics

Test Plan

  • Create topic with custom chain, vote on content in topic
  • Create topic with native eth, vote on content in topic

Deployment Plan

N/A

Other Considerations

  • Maybe native ETH should be a new topic type and not use ERC20 type?

@rbennettcw rbennettcw marked this pull request as ready for review December 2, 2024 14:38
@rbennettcw rbennettcw changed the title Multichain erc20 vote weight WIP Multichain erc20 vote weight + Native ETH voting Dec 2, 2024
Copy link
Contributor

@masvelio masvelio left a comment

Choose a reason for hiding this comment

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

  1. Change the name of the voting strategy from "Connect ERC 20" to "Use ERC20/ETH"

This one from the ticket is not applied

  1. Created community on BASE and topic with native address. Vote weight is 0 for me even though I have ~0.22 base eth in my wallet.

image

  1. Cant vote on a thread in topic that uses native token.
Kapture.2024-12-02.at.16.44.57.mp4

image

  1. There are some TS error around getTokenError in two components

});

console.log({ erc20Balance, userEthBalance });
Copy link
Contributor

Choose a reason for hiding this comment

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

remove

const nativeTokenMetadata: GetTokenMetadataResponse = {
decimals: 18,
logo: '',
name: 'ETH', // TODO: get native eth name/symbol
Copy link
Contributor

Choose a reason for hiding this comment

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

Are you gonna work on this TODO in this PR? If not, please create ticket and link it here in the comment.

fullWidth
tokenError={getTokenError()}
/>
<CWCheckbox
Copy link
Contributor

Choose a reason for hiding this comment

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

shouldnt this be only visible (and logic applied) on particular chains

per ticket:

If community is on Base or ETH, there will be a checkbox field beneath the token address field. This field would say "use native token"

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.

Add ETH based weighted voting Add weighted voting for other chains
2 participants