neo icon indicating copy to clipboard operation
neo copied to clipboard

ContractState FromJSON()

Open ixje opened this issue 2 years ago • 0 comments

Summary or problem description I'm running into a case where I'm asking for the ContractState using the getcontractstate RPC call and want to convert the JSON response into the native ContractState class. While ContractState has a ToJson() it does not have a FromJson counter part. I think it is reasonable to have the FromJson() counter part instead of asking users to add their own extension method.

Do you have any solution you want to propose? Add FromJson() to ContractState (also requires adding FromJson() to NefFile and MethodToken).

Neo Version

  • Neo 3

Where in the software does this update applies to?

  • SDK

ixje avatar Mar 15 '22 10:03 ixje