1

I'm trying to create a layer 2 blockchain. In this blockchain, I do some computing to add to a transaction. Basically, I want to add a custom type to store in the block alongside Extrinsics.

Are there any examples of this? Or, where should I take a look at the source code?

3
  • You are asking you add something additional to your block header? Or what does "along side Extrinsics" mean?
    – Shawn Tabrizi
    Apr 28, 2022 at 8:25
  • "Extrinsic" just means "external data". It does not necessarily need to be signed or (immediately) actionable, so you probably just want to define a new kind of extrinsic? Did you look at the Inherents/InherentData API? See pallet_timestamp for a simple example.
    – Gav
    Apr 28, 2022 at 8:53
  • @ShawnTabrizi Yes, I want to add additional data to the block header. Thanks, @ Gav, I'll take a look.
    – Burak
    Apr 28, 2022 at 17:39

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.