-
Notifications
You must be signed in to change notification settings - Fork 100
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A question of ContractParameter.FromJson(ByteString) #293
Comments
Could you make a unit test for reproduce the issue? I don't understand very well the problem |
This issue is caused by reading json of StackItem as ContractParameter, and I doubt whether this is correct ... And it seems that StackItemType & ContractParameterType are not accordance in more than one types: ContractParameterType.ByteArray & StackItemType.Pointer |
Both RpcServer and RpcClient use |
Only RpcClient need to deal with the invokescript's result. |
Now we get
ByteString
type of result's stack when invoke contract, it'sStackItemType
.In RpcClient, we convert stack use:
neo-modules/src/RpcClient/Models/RpcInvokeResult.cs
Line 47 in dcd946a
but in
ContractParameter.FromJson(JObject json)
is noByteString
type, it's should beContractParameterType
:https://github.com/neo-project/neo/blob/b47157669cabc9c4f0f4ff56cf4fe2a82905bcfe/src/neo/SmartContract/ContractParameter.cs#L58
Can we support
StackItemType
convert toContractParameterType
orStackItem.FromJson(JObject json)
etc ?The text was updated successfully, but these errors were encountered: