abstract-encoding icon indicating copy to clipboard operation
abstract-encoding copied to clipboard

Optional parameters in decode/encode

Open axic opened this issue 9 years ago • 0 comments

Would be nice to have an official recommendation on optional parameters:

  • should they be discouraged
  • should they be after offset in encode and end in decode
  • any other option?

I'm thinking about following abstract-encoding in https://github.com/ethereumjs/rlp, which has:

rlp.decode(encoded, [skipRemainderCheck=false]) - Decodes a RLP encoded Buffer, Array or String and returns a Buffer or an Array of Buffers. If skipRemainderCheck is enabled rlp will just decode the first rlp sequence in the buffer. By default it would through an error if there is more bytes in Buffer than used by rlp sequence.

axic avatar Apr 14 '16 00:04 axic