0

I have a contract that originates correctly when exception_optimization_level is set to debug-message and default-line. The contract tests, compiles, and works as expected except for a bug that is only present on testnet.

I've used the full-debug level in the past to see more information, but now when I change the exception level I receive the following when trying to originate:

{
  errors: [
    {
      kind: 'permanent',
      id: 'proto.011-PtHangz2.michelson_v1.ill_typed_contract',
      ill_typed_code: [Array],
      type_map: []
    },
    {
      kind: 'permanent',
      id: 'proto.011-PtHangz2.michelson_v1.unexpected_lazy_storage',
      loc: 469
    }
  ],
  id: 'proto.011-PtHangz2.michelson_v1.unexpected_lazy_storage',
  kind: 'permanent'
}

According to the documentation unexpected_lazy_storage means:

a big_map or sapling_state type was found in a position where it could end up stored inside a big_map

Why do I only receive this error during origination when the exception level is set to full-debug and how do I fix it?

1 Answer 1

1

Full debug implies that exceptions are filled with as much information as possible. As you’ve seen, you must have a big map somewhere it shouldn’t be. I’m not sure if something changed or not in Michelson. It would be interesting to see where exactly at the location of the error. The Tezos client gives more information (also when typing).

4
  • 1
    Lazy storages (Big maps and Sapling states) are forbidden in instructions PACK, UNPACK, APPLY, FAILWITH, and PUSH, in views inputs and outputs, and in big_map values. Feb 12, 2022 at 15:36
  • 1
    I guess we get a big_map in a FAILWITH here.
    – FFF
    Feb 13, 2022 at 2:01
  • is there a discord server where we can discuss this a bit deeper?
    – 0x10
    Feb 13, 2022 at 3:05
  • There is currently a telegram group. t.me/SmartPy_io
    – FFF
    Feb 13, 2022 at 10:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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