Take some inspiration from https://github.com/ResiliaDev/EthABI Encoding and Decoding should both produce Results. This should be invalid: `-1` for `uint256`, or `257` for a `uint8`.