ergoplatform / sigmastate-interpreter

ErgoScript compiler and ErgoTree Interpreter implementation for Ergo blockchain
MIT License
63 stars 41 forks source link

[6.0] Global.fromBigEndianBytes implementation #1013

Closed kushti closed 1 month ago

kushti commented 5 months ago

A new Global.fromBigEndianBytes[TNum] method is implemented in this PR, which can parse big-endian two's complement binary representation of TNum type.

example:

{
  val l = 1088800L
  val ba = l.toBytes
  Global.fromBigEndianBytes[Long](ba) == l
}

close #993