aeternity / aesophia

Stand alone compiler for the Sophia smart contract language
https://docs.aeternity.com/aesophia
ISC License
52 stars 19 forks source link

Can't decode calldata/result with complex builtin types (AENS.name etc.) #344

Closed hanssv closed 3 years ago

hanssv commented 3 years ago

You'll get errors of the form:

Cannot translate FATE value {variant,[3],0,{{address,<<213,207,8,64,14,152,130,34,242,110,180,176,44,143,137,7,116,87,70,114,17,166,230,217,85,237,183,7,73,198,163,59>>}, {variant,[1,1],1,{200345}}, #{}}}        
    of Sophia type AENS.name

The problem is that builtin types aren't explicitly represented in the type - they need to be added in the decoder.