Skip to content
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

RpcClient fails to parse response w/ ByteString type(preview 3) #300

Closed
devhawk opened this issue Jul 23, 2020 · 0 comments · Fixed by #302
Closed

RpcClient fails to parse response w/ ByteString type(preview 3) #300

devhawk opened this issue Jul 23, 2020 · 0 comments · Fixed by #302

Comments

@devhawk
Copy link
Contributor

devhawk commented Jul 23, 2020

Attempting to deploy a contract using RpcClient, In TransactionManager.MakeTransaction, the script is invoked to determine the system fee. The JSON response appears valid, but RpcInvokeResult.FromJson is failing. That function is attempting to parse the stack field of the results as an array of ContractParameter. That code is failing when attempting to convert "ByteString" to a ContractParameterType in JString.TryGetEnum

{
    "script": "0d2e037b2267726f757073223a5b5d2c226665617475726573223a7b2273746f72616765223a747275652c2270617961626c65223a66616c73657d2c22737570706f727465647374616e6461726473223a5b5d2c22616269223a7b2268617368223a22307831663939613965383764326330323233396238663062646361386362643564613736653634343236222c226d6574686f6473223a5b7b226e616d65223a227175657279222c22706172616d6574657273223a5b7b226e616d65223a22646f6d61696e222c2274797065223a22537472696e67227d5d2c226f6666736574223a302c2272657475726e74797065223a22427974654172726179227d2c7b226e616d65223a227265676973746572222c22706172616d6574657273223a5b7b226e616d65223a22646f6d61696e222c2274797065223a22537472696e67227d2c7b226e616d65223a226f776e6572222c2274797065223a22427974654172726179227d5d2c226f6666736574223a33312c2272657475726e74797065223a22426f6f6c65616e227d2c7b226e616d65223a227472616e73666572222c22706172616d6574657273223a5b7b226e616d65223a22646f6d61696e222c2274797065223a22537472696e67227d2c7b226e616d65223a22746f222c2274797065223a22427974654172726179227d5d2c226f6666736574223a3130322c2272657475726e74797065223a22426f6f6c65616e227d2c7b226e616d65223a2264656c657465222c22706172616d6574657273223a5b7b226e616d65223a22646f6d61696e222c2274797065223a22537472696e67227d5d2c226f6666736574223a3138392c2272657475726e74797065223a22426f6f6c65616e227d5d2c226576656e7473223a5b5d7d2c227065726d697373696f6e73223a5b7b22636f6e7472616374223a222a222c226d6574686f6473223a222a227d5d2c22747275737473223a5b5d2c22736166656d6574686f6473223a5b5d2c226578747261223a7b22417574686f72223a224e656f222c22456d61696c223a22646576406e656f2e6f7267222c224465736372697074696f6e223a2254686973206973206120636f6e7472616374206578616d706c65227d7d0d03015700010c0571756572792141cfe7479621419bf667ce78215041925de831405700020c0872656769737465722141cfe74796792141f827ec8c2507000000104021419bf667ce78215041925de8312707000000104021419bf667ce7879215341e63f188411405701020c087472616e736665722141cfe74796792141f827ec8c2507000000104021419bf667ce78215041925de831706825070000001040682141f827ec8c2507000000104021419bf667ce7879215341e63f188411405701010c0664656c6574652141cfe7479621419bf667ce78215041925de831706825070000001040682141f827ec8c2507000000104021419bf667ce782150412f58c5ed114041ce352c85",
    "state": "HALT",
    "gasconsumed": "107326000",
    "stack": [{
        "type": "Array",
        "value": [{
            "type": "ByteString",
            "value": "VwABDAVxdWVyeSFBz\\u002BdHliFBm/ZnznghUEGSXegxQFcAAgwIcmVnaXN0ZXIhQc/nR5Z5IUH4J\\u002ByMJQcAAAAQQCFBm/ZnznghUEGSXegxJwcAAAAQQCFBm/Znznh5IVNB5j8YhBFAVwECDAh0cmFuc2ZlciFBz\\u002BdHlnkhQfgn7IwlBwAAABBAIUGb9mfOeCFQQZJd6DFwaCUHAAAAEEBoIUH4J\\u002ByMJQcAAAAQQCFBm/Znznh5IVNB5j8YhBFAVwEBDAZkZWxldGUhQc/nR5YhQZv2Z854IVBBkl3oMXBoJQcAAAAQQGghQfgn7IwlBwAAABBAIUGb9mfOeCFQQS9Yxe0RQA=="
        }, {
            "type": "ByteString",
            "value": "eyJncm91cHMiOltdLCJmZWF0dXJlcyI6eyJzdG9yYWdlIjp0cnVlLCJwYXlhYmxlIjpmYWxzZX0sInN1cHBvcnRlZHN0YW5kYXJkcyI6W10sImFiaSI6eyJoYXNoIjoiMHgxZjk5YTllODdkMmMwMjIzOWI4ZjBiZGNhOGNiZDVkYTc2ZTY0NDI2IiwibWV0aG9kcyI6W3sibmFtZSI6InF1ZXJ5IiwicGFyYW1ldGVycyI6W3sibmFtZSI6ImRvbWFpbiIsInR5cGUiOiJTdHJpbmcifV0sIm9mZnNldCI6MCwicmV0dXJudHlwZSI6IkJ5dGVBcnJheSJ9LHsibmFtZSI6InJlZ2lzdGVyIiwicGFyYW1ldGVycyI6W3sibmFtZSI6ImRvbWFpbiIsInR5cGUiOiJTdHJpbmcifSx7Im5hbWUiOiJvd25lciIsInR5cGUiOiJCeXRlQXJyYXkifV0sIm9mZnNldCI6MzEsInJldHVybnR5cGUiOiJCb29sZWFuIn0seyJuYW1lIjoidHJhbnNmZXIiLCJwYXJhbWV0ZXJzIjpbeyJuYW1lIjoiZG9tYWluIiwidHlwZSI6IlN0cmluZyJ9LHsibmFtZSI6InRvIiwidHlwZSI6IkJ5dGVBcnJheSJ9XSwib2Zmc2V0IjoxMDIsInJldHVybnR5cGUiOiJCb29sZWFuIn0seyJuYW1lIjoiZGVsZXRlIiwicGFyYW1ldGVycyI6W3sibmFtZSI6ImRvbWFpbiIsInR5cGUiOiJTdHJpbmcifV0sIm9mZnNldCI6MTg5LCJyZXR1cm50eXBlIjoiQm9vbGVhbiJ9XSwiZXZlbnRzIjpbXX0sInBlcm1pc3Npb25zIjpbeyJjb250cmFjdCI6IioiLCJtZXRob2RzIjoiKiJ9XSwidHJ1c3RzIjpbXSwic2FmZW1ldGhvZHMiOltdLCJleHRyYSI6eyJBdXRob3IiOiJOZW8iLCJFbWFpbCI6ImRldkBuZW8ub3JnIiwiRGVzY3JpcHRpb24iOiJUaGlzIGlzIGEgY29udHJhY3QgZXhhbXBsZSJ9fQ=="
        }, {
            "type": "Boolean",
            "value": true
        }, {
            "type": "Boolean",
            "value": false
        }]
    }],
    "tx": null
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant