Add address typechecking from bytes
Clarification and motivation
Apparently nowadays address
can be represented using bytes literal. E. g. this contract is valid:
parameter nat;
storage nat;
code { CAR;
PUSH address 0x0000cd0baeb9c8bc98a05a37930630abaa725cbecb32;
DROP;
NIL operation; PAIR;
}
And tezos-client
seems to often print addresses as bytes.
Our typechecker finds this contract invalid because it can't parse ValueBytes
as address. I don't know how conversion should be made, but we should figure it out.
Acceptance criteria
- Value typechecker should handle "bytes as address" typechecking correctly, the same way as
tezos-client
does. - Since
tezos-client
often prints bytes, but people normally use string format (tz1blabla
and such), there should be an easy way to turn these bytes into the common format. It can be done via some existing tool and it is preferable (e. g. some one liner that I can run in terminal). If it is more complicated, let's add this conversion tomorley
.