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

esdt improvements integration #5806

Merged

Conversation

BeniaminDrasovean
Copy link
Contributor

Reasoning behind the pull request

Proposed changes

Testing procedure

Pre-requisites

Based on the Contributing Guidelines the PR author and the reviewers must check the following requirements are met:

  • was the PR targeted to the correct branch?
  • if this is a larger feature that probably needs more than one PR, is there a feat branch created?
  • if this is a feat branch merging, do all satellite projects have a proper tag inside go.mod?

@BeniaminDrasovean BeniaminDrasovean changed the title enableEpochsHandler small fix esdt improvements integration Jan 8, 2024
@sasurobert sasurobert self-requested a review January 9, 2024 11:09
sasurobert
sasurobert previously approved these changes Jan 9, 2024
Base automatically changed from esdt-tokenType-storage-opt to feat/esdt-improvements January 10, 2024 10:21
@sasurobert sasurobert dismissed their stale review January 10, 2024 10:21

The base branch was changed.

Copy link

codecov bot commented Jan 10, 2024

Codecov Report

Attention: 8 lines in your changes are missing coverage. Please review.

Comparison is base (d24b625) 80.36% compared to head (be0224b) 80.40%.

Files Patch % Lines
vm/systemSmartContracts/esdt.go 74.19% 8 Missing ⚠️
Additional details and impacted files
@@                    Coverage Diff                     @@
##           feat/esdt-improvements    #5806      +/-   ##
==========================================================
+ Coverage                   80.36%   80.40%   +0.04%     
==========================================================
  Files                         710      710              
  Lines                       94310    94310              
==========================================================
+ Hits                        75789    75830      +41     
+ Misses                      13227    13186      -41     
  Partials                     5294     5294              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@iulianpascalau iulianpascalau self-requested a review January 10, 2024 11:10
@@ -697,9 +697,9 @@ func (handler *enableEpochsHandler) createAllFlagsMap() {
},
common.DynamicESDTFlag: {
isActiveInEpoch: func(epoch uint32) bool {
return epoch >= handler.enableEpochsConfig.NFTStopCreateEnableEpoch
return epoch >= handler.enableEpochsConfig.DynamicESDTEnableEpoch
Copy link
Contributor

Choose a reason for hiding this comment

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

unit test?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added

}

// SetTokenType does nothing as this is a disabled component
func (d *disabledGlobalSettingsHandler) SetTokenType(_ []byte, _ uint32) error {
Copy link
Contributor

Choose a reason for hiding this comment

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

this is no longer a GlobalSettingHandler. Why do we have this function here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The token type is saved in ESDTGlobalMetadata . GlobalSettingHandler manages ESDTGlobalMetadata


func TestESDTMetaDataRecreate(t *testing.T) {
tokenTypes := getDynamicTokenTypes()
for _, tokenType := range tokenTypes {
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

@BeniaminDrasovean BeniaminDrasovean merged commit 0753e2c into feat/esdt-improvements Feb 5, 2024
6 of 7 checks passed
@BeniaminDrasovean BeniaminDrasovean deleted the esdt-improvements-integration branch February 5, 2024 09:48
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.

3 participants