When inserting a string into registers in Ergo, I have this code
val byteColl = Javahelpers.SigmaDsl.Colls.fromArray(String.getBytes("utf-8"))
ErgoValue.Of(byteColl, ErgoType.byteType())
However, when I'm trying to compare the CollByte within the ErgoBox, with say, a token Id. I'm not getting the right String.
For example, for SigUSD, The id is: 03faf2cb329f2e90d6d23b58d91bbb6c046aa143261cc21f52fbe2824bfcbf04 However I'd get: [B@7a1b8a46
I'm doing println(inputBox.getRegisters.get(0).getValue.asInstanceOf[Coll[Byte]].toArray) to get the value, however I believe that value should be the same when evaluating ErgoScript?
How can I compare tokenId vs a stored string when evaluating within ErgoScript?