Contracts and API Changes
The recent updates deprecate the StargateDelegation.sol and NodeManagement.sol contracts, consolidating functionalities within the Stargate.sol and StargateNFT.sol contracts. Key changes include the removal and replacement of functions to improve delegation handling and NFT transferability, as well as the migration of node management functionalities. Functions like stakeAndDelegate(), migrateAndDelegate(), and methods to manage node and reward processes have either been relocated or modified.
Contracts
StargateDelegation.solcontract is deprecated: all delegations and rewards are now handled by theStargate.solcontract.Removed, in
StargateNFT.sol, everything related to vet generated vtho (setters, getters, library), since the protocol is not generating VTHO just for owning VET, but only when delegating;Claimable delegation rewards are not automatically claimed any more upon a token transfer, only during unstake or new delegation, and such actions are handled by the
Stargate.solcontract.NFT is now always transferable, even when it is delegated to a validator.
API
stakeAndDelegate()now requires a fee paid in VTHO to allow skipping the maturity period, and the user needs to select a validator.migrate()function was removed, now it is only possible tomigrateAndDelegate()and a validator must be selected when performing such action.delegate()must receive a validator as a parameter and delegation does not start immediately but at the start of the next period of the validator; delegation now has 4 states: uknown, pending, active, exited.isDelegationActive()was removed in favour ofgetDelegationStatus().accumulatedRewards()was removed in favour oflockedRewards().Removed getters in
StargateNFT.solto optimize contract size:normalTokensCount(),getCap(),canTransfer(),ownsNormalToken(),isNormalToken(),levelsOwnedBy()The following functions are moved from
StargateNFT.solto theStargate.sol: -stake()-unstake()-stakeAndDelegate()-migrateAndDelegate()NodeManagement.solcontract is deprecated. Managers are now handled by theStargateNFT.solcontract. All previous managers fromNodeManagementwere migrated. The following functions have been deprecated:NodeManagement.getNodeManager()->StargateNFT.getTokenManager()NodeManagement.getNodeOwner()->StargateNFT.ownerOf()NodeManagement.getNodeLevel()->StargateNFT.getTokenLevel()NodeManagement.isNodeManager()->StargateNFT.isTokenManager()NodeManagement.delegateNode()->StargateNFT.addTokenManager()NodeManagement.removeNodeDelegation()->StargateNFT.removeTokenManager()NodeManagement.getNodeIds()-> call bothStargateNFT.idsOwnedBy()andStargateNFT.idsManagedBy()Legacy nodes are not being considered any more.
Was this helpful?

