feat: node management, endorsing and gm #26
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Upgrade
X2EarnApps
to Version 2Added Vechain Node XApp Endorsement feature.
Changes 🚀
X2EarnApps.sol
to version2
Storage Changes 📦
EndorsementUpgradeable.sol
:_unendorsedApps
to store the list of apps pending endorsement._unendorsedAppsIndex
to store mapping from app ID to index in the _unendorsedApps array._appEndorsers
to store the mapping of each app ID to an array of node IDs that have endorsed it._nodeEnodorsmentScore
to score the endorsement score for each node level._appGracePeriodStart
to store the grace period elapsed by the app since endorsed._nodeToEndorsedApp
to store the mapping of a node ID to the app it currently endorses._gracePeriodDuration
to store the grace period threshold for no endorsement in blocks._endorsementScoreThreshold
to store the endorsement score threshold for an app to be eligible for voting._appScores
to store the score of each app._appSecurity
to store the security score of each app._nodeManagementContract
to store the node management contract address._veBetterPassport
to store the VeBetterPassport contract address.EndorsementUpgradeable.sol
:_creators
to store a mapping of addresses that have a creators NFT and can manage interactions with Node holders for a specifc XApp._creatorApps
to store the number of apps created by a creator._x2EarnCreatorContract
to store the address of the X2Earn Creators contract.VoteEligibilityUpgradeable.sol
:_blackList
to store a record blacklisted X2Earn appIds.New Features 🚀
EndorsementUpgradeable.sol
module which makes up all X2EarnApps endorsement logic and functions (see docs for more info).appApp()
withsubmitApp()
.isBlacklisted()
to check if XApp is blacklisted.removeAppCreator()
,appCreators()
,isAppCreator()
andcreatorApps()
to manage and get info on X2Earn app creators.Bug Fixes 🐛
AdministrationUtils.sol
,EndorsementUtils.sol
,AppStorageUtils.sol
andVoteEligibilityUtils.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