When parsing an account or instruction from its raw data, it would be useful to also include a type attribute that uses the generate account or instruction enums such as MyProgramInstruction.Transfer.
That way, someone can use that type attribute to easily distinguish between the objects they've parsed.
When parsing an account or instruction from its raw data, it would be useful to also include a
type
attribute that uses the generate account or instruction enums such asMyProgramInstruction.Transfer
.That way, someone can use that
type
attribute to easily distinguish between the objects they've parsed.