From looking at https://github.com/stellar/stellar-xdr/blob/next/Stellar-contract.x#L207, it seems like there's currently no way to represent Option<Symbol> in the xdr (nor any other of the "primitive" ScVals). Because ScObject is the current way to represent an "optional", and it can't have a Symbol as a child. Is that true? or am I misunderstanding the xdr?
cc @strange frigate
#Impossible to represent Option<Symbol> in xdr?
3 messages · Page 1 of 1 (latest)
What about an array of size up to 1. If the symbol isn’t set, you just send an empty array. This is how contractspec deals with defining optional function return values right now.
We used to use an array size of 1 but changed to the new optional form because it is more compact and efficient.