stratisproject / StratisBitcoinFullNode

Bitcoin full node in C#
https://stratisplatform.com
MIT License
787 stars 315 forks source link

Struct and array parameters in smart contracts #4102

Open drmathias opened 4 years ago

drmathias commented 4 years ago

I have a scenario where I am passing structs and struct arrays to a smart contract. At the moment, in my contract, I'm deserializing from a byte array inside the method.

In my service, I am initializing my struct type and then serializing it, so that it can be passed in a call to the contract. Ideally I wouldn't want to have to handle serialization, instead smart contracts could support struct and array parameters, which are deserialized in the call.