1

Attempted to originate a contract but getting a storage type error when trying to originate it

Error: proto.005-PsBabyM1.michelson_v1.ill_formed_type
Error: proto.005-PsBabyM1.michelson_v1.invalid_arity


              {
                "kind": "permanent",
                "id": "proto.005-PsBabyM1.michelson_v1.invalid_arity",
                "location": 16,
                "primitive_name": "key",
                "expected_arity": 0,
                "wrong_arity": 0
              }



storage   (pair (pair (list %owners key) (nat %threshold)) (map %txRecords string (pair (pair (pair (pair (mutez %amount) (bytes %needSignData)) (set %signers key)) (address %to)) (string %txId))))

Could someone please help me understand why this storage type is ill defined ?

The original contract which led to this error was written in smartpy: https://tinyurl.com/v9x9cuj

2

The problem lies in this part (set %signers key). The set requires that its elements are comparable, but key type is not comparable. To get around this, you could use key_hash for the set instead, which is comparable and you can compute it from key.

For details:

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.