Skip to content

Commit

Permalink
Adds MetadataHash calculation on Build to Kusama People chain (#371)
Browse files Browse the repository at this point in the history
<!-- Remember that you can run `/merge` to enable auto-merge in the PR
-->

<!-- Remember to modify the changelog. If you don't need to modify it,
you can check the following box.
Instead, if you have already modified it, simply delete the following
line. -->

This adds the calculation of the MetadataHash upon build in the Kusama
People Chains Runtime. I don't think this needs a CHANGELOG entry, but I
could be mistaken.

---------

Co-authored-by: Bastian Köcher <[email protected]>
  • Loading branch information
SBalaguer and bkchr authored Jul 24, 2024
1 parent 4eb5267 commit 7674917
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,10 @@ Note: This release only affects the following runtimes and is not a full system
- Kusama Relay Chain
- Kusama Bridge Hub

### Fixed

- Kusama People: Build the metadata hash at build time, so that `CheckMetadata` can use it at runtime ([polkadot-fellows/runtimes#371](https://github.com/polkadot-fellows/runtimes/pull/371))

## [1.2.7] 14.06.2024

Note: This release only affects the following runtimes and is not a full system release:
Expand Down
13 changes: 8 additions & 5 deletions system-parachains/people/people-kusama/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,15 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#[cfg(feature = "std")]
#[cfg(all(feature = "std", not(feature = "metadata-hash")))]
fn main() {
substrate_wasm_builder::WasmBuilder::new()
.with_current_project()
.export_heap_base()
.import_memory()
substrate_wasm_builder::WasmBuilder::build_using_defaults()
}

#[cfg(all(feature = "std", feature = "metadata-hash"))]
fn main() {
substrate_wasm_builder::WasmBuilder::init_with_defaults()
.enable_metadata_hash("KSM", 12)
.build()
}

Expand Down

0 comments on commit 7674917

Please sign in to comment.