2

*Note that the answer to this question may be very similar to this one.

I tried out the code below within a part of a larger lambda function and got the following error. The purpose is just to convert the data from one type to another using pack/unpack.

code:

        myString = sp.local("myString", "dummyString")
        packedString = sp.pack(myString.value)
        myBytes = sp.unpack(packedString, t = sp.TBytes)

error:

Instruction not supported in interpreter: sp.unpack(sp.pack(myString.value), sp.TBytes)

I thought this instruction looked fine since unpack is the opposite of pack, but it doesn't seem so?

2

The instruction is correctly generated in the Michelson code but is not simulated in the SmartPy interpreter, yet.

This will be done eventually but it will take some time.

EDIT (Feb 2021). sp.pack should be complete now.

4
  • I came across the same issue again and was curious if it looked like this was in the works. Thanks!
    – Darius
    Feb 5 at 22:28
  • 1
    Yes, sp.pack should be reasonably complete now.
    – FFF
    Feb 6 at 2:35
  • Does it work with bls types? I got this error in SmartPy. Error: Interpreter. Instruction not supported in interpreter: sp.unpack(revLockConcat.value, sp.TBls12_381_fr)
    – Darius
    Feb 7 at 3:22
  • 1
    sp.pack is done in the interpreter (hopefully) but not sp.unpack. We’re closer than ever but not there yet.
    – FFF
    Feb 7 at 15:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.