Typescript devkit for interacting with the Boost V2 Protocol
When a field is declared as TUPLE in the PrimitiveType
of an EventAction
, we unpack its bit-packed fieldIndex to drill down through each nested level of the tuple. Each sub-index occupies 6 bits (values 0–63), and a sub-index of 63 is treated as a terminator—signaling the end of further drilling. Once we locate the leaf in the nested structure, the code infers the final (non-tuple) PrimitiveType by reading the ABI definition (address, uint256, string, etc.) at that leaf node.