ScorexFoundation / sigmastate-interpreter

ErgoScript compiler and ErgoTree Interpreter implementation for Ergo blockchain
MIT License
62 stars 40 forks source link

[6.0] Box.getReg implementation #1015

Closed kushti closed 5 days ago

kushti commented 2 months ago

In this PR, Box.getReg to get register contents by index is implemented

Example:

{
   val x = SELF
   x.getReg[Long](0).get == SELF.value &&
   x.getReg[Coll[(Coll[Byte], Long)]](2).get == SELF.tokens &&
   x.getReg[Int](9).isEmpty
}

close #416

kushti commented 1 week ago

@aslesarenko comments addressed, please make another pass!