Note: This PR lowers the mint cost from 266K gas to 165K gas
ZodiacsWands stores packed data in a struct called PackedWand. When rendering, data is retrieved from storage and unpacked into a structure called Wand. This structure is then being passed around during template instantiation.
Before this PR, mint was performing data packing itself and only then writing into storage.
This PR moves data packing off chain, with mint just writing into storage. The costs on mint are already super shaved, to the point where it's unlikely we can optimize much more.
Note: This PR lowers the mint cost from 266K gas to 165K gas
ZodiacsWands stores packed data in a struct called PackedWand. When rendering, data is retrieved from storage and unpacked into a structure called Wand. This structure is then being passed around during template instantiation.
Before this PR, mint was performing data packing itself and only then writing into storage.
This PR moves data packing off chain, with mint just writing into storage. The costs on mint are already super shaved, to the point where it's unlikely we can optimize much more.