Check out the Issue Explorer
Looking to fund some work? You can submit a new Funded Issue here.
**Is your feature request related to a problem? Please describe.**
Currently, the `Serialization.vy` which decodes `Transaction`s and `TransactionProofs` is not very well-written. Except for a few edge cases, it mostly just has some constants `X_START` and `X_LEN` and returns `slice(X, start = X_START, len = X_LEN)` as a result. This is highly repetetive code and makes deployment (and possibly decoding itself) gas-inefficient.
**Describe the solution you'd like**
What we'd like is a more intelligent decoder, which uses some `fieldID` (0,1,2,...) for each component (transfer.start, transfer.end, etc...). Some mapping `schemas[fieldID].start` and `schemas[fieldID].len` would then allow us to do all the decoding with a single function.
**Describe alternatives you've considered**
There's a few more complex decodings which happen, particularly in the case that the encoding has variable-length array such as [here](https://github.com/plasma-group/plasma-contracts/blob/ce9ae5dd37dab45f6c8e135c874944266c91bc36/contracts/Serialization.vy#L259) in `decodeIthTransferProofWithNumNodes`. There might be a more elegant solution to encompass this extra logic, but even just having the simpler ones do this would be a HUGE improvement.