Skip to content

Strath/wasm legacy v4#75

Merged
kien6034 merged 4 commits intoorbitorg:feat/v14_1from
classic-terra:strath/wasm-legacy-v4
Mar 17, 2026
Merged

Strath/wasm legacy v4#75
kien6034 merged 4 commits intoorbitorg:feat/v14_1from
classic-terra:strath/wasm-legacy-v4

Conversation

@StrathCole
Copy link

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:

  • Added the translateLegacyValueForKey, translateLegacyCodeInfoValue, and translateLegacyContractInfoValue functions to legacy_store.go to translate legacy code and contract info values to the new format when accessing via new keys. (custom/wasm/legacy_store.go)
  • Updated the Get method and iterator logic in legacyWasmStore to 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:

  • Added tests TestLegacyStore_TranslatesLegacyMetadataValues and TestLegacyStore_IteratorTranslatesLegacyMetadataValues to verify correct translation of legacy contract and code info values in both direct Get calls and iteration scenarios. (custom/wasm/query_handler_test.go)

Dependency update:

  • Updated github.com/cometbft/cometbft dependency from version v0.37.16 to v0.37.18 in go.mod. (go.mod)

Imports:

  • Added necessary imports for wasmtypes and legacytypes in both implementation and test files to support translation and testing. (custom/wasm/legacy_store.go, custom/wasm/query_handler_test.go) [1] [2]

@kien6034 kien6034 merged commit fce6bb5 into orbitorg:feat/v14_1 Mar 17, 2026
27 of 29 checks passed
@kien6034 kien6034 deleted the strath/wasm-legacy-v4 branch March 17, 2026 11:53
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