Using codec
To get a default codec do this:
You might instantiate it using a custom adapter, but all examples will cover common interface of a codec.
It's very easy as that to encode or decode objects like this:
Same interface applies to every possible type.
Fixed size arrays
Even though Swift is a very powerful and wonderful language, it misses fixed size arrays.
This is one of the features in Substrate, and is used extensively.
To declare fixed size array as one of the variables, please use next syntax:
Last updated