Functions

Given a constant value constant, a type ty, a state index, and a vector of subfield indices, serialize the constant into a vector of storage slots. The keys (slots) are generated using the state index and the subfield indices which are recursively built. The values are generated such that each subfield gets its own storage slot except for enums and strings which are spread over successive storage slots (use serialize_to_words in this case).

Given a constant value constant and a type ty, serialize the constant into a vector of words and add left padding up to size of ty.