Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary of changes
This pull request introduces translation logic for legacy metadata values in the WASM store, ensuring compatibility between old and new key formats. It also adds comprehensive tests to verify the translation of legacy code and contract information, and updates a dependency version.
Translation logic for legacy metadata values:
translateLegacyValueForKey,translateLegacyCodeInfoValue, andtranslateLegacyContractInfoValuefunctions tolegacy_store.goto translate legacy code and contract info values to the new format when accessing via new keys. (custom/wasm/legacy_store.go)Getmethod and iterator logic inlegacyWasmStoreto utilize the translation functions, ensuring values returned for new keys are in the expected format. (custom/wasm/legacy_store.go) [1] [2]Testing legacy translation:
TestLegacyStore_TranslatesLegacyMetadataValuesandTestLegacyStore_IteratorTranslatesLegacyMetadataValuesto verify correct translation of legacy contract and code info values in both directGetcalls and iteration scenarios. (custom/wasm/query_handler_test.go)Dependency update:
github.com/cometbft/cometbftdependency from versionv0.37.16tov0.37.18ingo.mod. (go.mod)Imports:
wasmtypesandlegacytypesin both implementation and test files to support translation and testing. (custom/wasm/legacy_store.go,custom/wasm/query_handler_test.go) [1] [2]