Closed thlorenz closed 2 years ago
Renders tuples (indicated via tuple in the IDL).
tuple
This supports tuples nested inside other types as in the below example as well as tuples whose elements themselves are composites.
A part of nft-packs IDL was included to serve as a smoke-test and more detailed tests were added to the typemapper.
Rendering Vec<u32, u32, u32>
Vec<u32, u32, u32>
export type PackConfig = { weights: [number, number, number][] } export const packConfigBeet = new beet.FixableBeetArgsStruct<PackConfig>( [ [ 'weights', beet.array(beet.fixedSizeTuple([beet.u32, beet.u32, beet.u32])), ], ], 'PackConfig' )
Summary
Renders tuples (indicated via
tuple
in the IDL).This supports tuples nested inside other types as in the below example as well as tuples whose elements themselves are composites.
A part of nft-packs IDL was included to serve as a smoke-test and more detailed tests were added to the typemapper.
Example
Rendering
Vec<u32, u32, u32>