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

feat: node management, endorsing and gm #26

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

Agilulfo1820
Copy link
Member

Upgrade X2EarnApps to Version 2

Added Vechain Node XApp Endorsement feature.

Changes 🚀

  • Upgraded Contract(s):
    • X2EarnApps.sol to version 2

Storage Changes 📦

  • EndorsementUpgradeable.sol:
    • Added _unendorsedApps to store the list of apps pending endorsement.
    • Added _unendorsedAppsIndex to store mapping from app ID to index in the _unendorsedApps array.
    • Added _appEndorsers to store the mapping of each app ID to an array of node IDs that have endorsed it.
    • Added _nodeEnodorsmentScore to score the endorsement score for each node level.
    • Added _appGracePeriodStart to store the grace period elapsed by the app since endorsed.
    • Added _nodeToEndorsedApp to store the mapping of a node ID to the app it currently endorses.
    • Added _gracePeriodDuration to store the grace period threshold for no endorsement in blocks.
    • Added _endorsementScoreThreshold to store the endorsement score threshold for an app to be eligible for voting.
    • Added _appScores to store the score of each app.
    • Added _appSecurity to store the security score of each app.
    • Added _nodeManagementContract to store the node management contract address.
    • Added _veBetterPassport to store the VeBetterPassport contract address.
  • EndorsementUpgradeable.sol:
    • Added _creators to store a mapping of addresses that have a creators NFT and can manage interactions with Node holders for a specifc XApp.
    • Added _creatorApps to store the number of apps created by a creator.
    • Added _x2EarnCreatorContract to store the address of the X2Earn Creators contract.
  • VoteEligibilityUpgradeable.sol:
    • Added _blackList to store a record blacklisted X2Earn appIds.

New Features 🚀

  • Added EndorsementUpgradeable.sol module which makes up all X2EarnApps endorsement logic and functions (see docs for more info).
  • Replaced appApp() with submitApp().
  • Added getter isBlacklisted() to check if XApp is blacklisted.
  • Added removeAppCreator(), appCreators(), isAppCreator() and creatorApps() to manage and get info on X2Earn app creators.

Bug Fixes 🐛

    • Added libraries AdministrationUtils.sol, EndorsementUtils.sol, AppStorageUtils.sol and VoteEligibilityUtils.sol to store some of the logic for the X2EarnApps contracts modules to reduce contract size.

Upgrade RewardsPool, XAllocationPool, XAllocationVoting, Galaxy Member, Voter Rewards and B3TRGovernor to use new interfaces.

Deployed Node Management contract

@Agilulfo1820 Agilulfo1820 requested a review from a team as a code owner November 15, 2024 17:22
@Agilulfo1820 Agilulfo1820 marked this pull request as draft November 15, 2024 18:58
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.

1 participant