nl_tokens: Returns an overflow - safe slice of an array . It right - pads the data with zeros to length .
pl_tokens: function getDataSlice ( data , offset , length ) { let len = new BN ( data . length ) if ( offset . gt ( len ) ) { offset = len } let end = offset . <mask> ( length ) if ( end . gt ( len ) ) { end = len } data = data . slice ( offset . toNumber ( ) , end . toNumber ( ) ) // Right-pad with zeros to fill dataLength bytes data = utils . setLengthRight ( data , length . toNumber ( ) ) return data }