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

Remove chain node from topics + Fix ERC20 voting #9561

Merged
merged 17 commits into from
Oct 18, 2024

Conversation

rbennettcw
Copy link
Contributor

@rbennettcw rbennettcw commented Oct 16, 2024

Link to Issue

Closes: #9511

Description of Changes

  • Removed chain node ID from topic entity
  • Updated vote weight calculate func to use community chain node for both stake and ERC20
  • Changed vote weight columns from integer type to numeric to support large digit numbers
  • Changed UI to use string for vote weight columns + BigNumber for math operations
  • Changed vote multiplier column to support decimals

Test Plan

  • Set env FLAG_FARCASTER_CONTEST=false (needs to be disabled)
  • Set env FLAG_WEIGHTED_TOPICS=true
  • Run migration
  • ERC20
    • Create a topic with ERC20 weighted voting
      • NOTE: The UI may be broken when creating an ERC20 topic– if so, use API or modify DB topic directly
      • If you have CMN test token, use 0x429ae85883f82203D736e8fc203A455990745ca1 for the address
    • Vote on thread within topic, confirm upvote weight equals token balance
  • Stake
    • Create a topic with staked voting
    • Vote on thread within topic, confirm upvote weight equals stake balance
  • Unweighted
    • Create a topic without weighted voting
    • Vote on thread within topic, confirm weight == 1

Deployment Plan

Enable feature flag for weighted voting: FLAG_WEIGHTED_TOPICS

Other Considerations

N/A

@rbennettcw rbennettcw changed the title Remove chain node from topics Remove chain node from topics + Fix ERC20 voting Oct 16, 2024
@rbennettcw
Copy link
Contributor Author

@masvelio looks like the ERC20 UI needs to be updated to remove the chain node selection.

@masvelio
Copy link
Contributor

@masvelio looks like the ERC20 UI needs to be updated to remove the chain node selection.

the dropdown will be there, but will be disabled. I have merge some changes related to this flow so make sure to update your branch with the master

@rbennettcw rbennettcw requested a review from Rotorsoft October 18, 2024 05:34
@rbennettcw rbennettcw added the deployment plan (PRs only) requires manual infrastructure changes on release label Oct 18, 2024
@rbennettcw rbennettcw merged commit 9f6ac71 into master Oct 18, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deployment plan (PRs only) requires manual infrastructure changes on release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove chain node from topic + Fix ERC20 Voting
3 participants