#Impossible to represent Option<Symbol> in xdr?

3 messages · Page 1 of 1 (latest)

scarlet coyote
#

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

GitHub

Staging area for future version of Stellar XDR. Contribute to stellar/stellar-xdr development by creating an account on GitHub.

humble hornet
#

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.

strange frigate