thrumdev / blobs

Blobchains on Polkadot and Kusama
https://docs-site-pi.vercel.app
Apache License 2.0
64 stars 8 forks source link

shim/cli: `query block` --json flag #254

Closed pepyakin closed 9 months ago

pepyakin commented 9 months ago

Which allows outputting block data as JSON. Example:

{
  "number": 3,
  "hash": "0xabc7c5d5210457ffd603c33ab074845decf4d1e502bd9c3fdbf444e5397ae3ce",
  "parent_hash": "0x8a9a668c175becbbd2e4f0e2e5080a982b2512627598710588e22aa6a8913a62",
  "tree_root": {
    "root": "0x4345eccd6becad8280a900c27f1dd61c7067dbc81349b6a310b50068045a2762",
    "min_ns": "0x00000000000000009a3298afb5ac71c7",
    "max_ns": "0x00000000000000009a3298afb5ac71c7"
  },
  "timestamp": 1708702272000,
  "blobs": [
    {
      "extrinsic_index": 2,
      "namespace": "0x00000000000000009a3298afb5ac71c7",
      "sender": "0xd43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d",
      "data": "0x5b73657474696e67735d0a74696d656f7574203d20313030300a0a5b72656c6179636861696e5d0a636f6d6d616e64203d2022706f6c6b61646f74220a636861696e203d2022726f636f636f2d6c6f63616c220a0a20205b5b72656c6179636861696e2e6e6f6465735d5d0a20206e616d65203d2022616c696365220a202077735f706f7274203d20393934340a20207270635f706f7274203d2033303434340a0a20205b5b72656c6179636861696e2e6e6f6465735d5d0a20206e616d65203d2022626f62220a202077735f706f7274203d20393935350a20207270635f706f7274203d2033303535350a0a5b5b70617261636861696e735d5d0a6964203d203130300a0a20205b70617261636861696e732e636f6c6c61746f725d0a20206e616d65203d2022636f6c6c61746f723031220a2020636f6d6d616e64203d2022696b7572612d6e6f6465220a202077735f706f7274203d20393938380a20207270635f706f7274203d2033313230300a202061726773203d205b222d2d73746174652d7072756e696e673d61726368697665225d0a"
    }
  ]
}
pepyakin commented 9 months ago

Current dependencies on/for this PR:

This stack of pull requests is managed by Graphite.

rphmeier commented 9 months ago

Merge activity