Skip to content

Recognize "0" as a legacy transaction type in serializeTransaction #1549

Answered by ricmoo
smartcontracts asked this question in Q&A
Discussion options

You must be logged in to vote

This is intentional; you should not use type 0, as it is not actually reserved in the EIP (so theoretically you could have a future transaction envelope version 0 which has some other behaviour). I've asked as well for type 0x19 to be reserved, but the EIP authors would prefer that be moved to some other registry. But for now, I think it is safe to assume 0x00 and 0x19 are considered reserved from an application point of view, but that isn't safe at the library level.

For your purposes, you should probably use null, but if your project has the TypeScript flag strict configured, you will need to use undefined (either will work, but I had intended for people to use null). In v6, the library…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by smartcontracts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #1547 on May 10, 2021 07:11.