Skip to content

Commit

Permalink
- fetching spec version and previous spec version
Browse files Browse the repository at this point in the history
- updating the metadata in the block header if it has been updated
  • Loading branch information
Eduard-Voiculescu committed Jul 9, 2024
1 parent 509a5e1 commit 097b273
Show file tree
Hide file tree
Showing 4 changed files with 268 additions and 192 deletions.
13 changes: 12 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,5 +117,16 @@ func main() {
log.Fatalf("Failed to marshal extrinsic: %v", err)
}

fmt.Println(string(m))
_ = m

block0, err := types.NewHashFromHexString("0x1555a60f789e322c607f8b8df062cf0441484897b547028c378509d5e56eec48")
if err != nil {
log.Fatalf("Failed to create block hash: %v", err)
}
specVerion, err := api.RPC.State.GetRuntimeVersion(block0)
if err != nil {
log.Fatalf("Failed to get runtime version: %v", err)
}

fmt.Println("Spec Version: ", specVerion.SpecVersion)
}
Loading

0 comments on commit 097b273

Please sign in to comment.