A user reported that the following error occurred when trying to use the algod simulate endpoint:
HTTP 400: {"message":"failed to decode object: json decode error [pos 13]: no matching struct field found when decoding stream map with key Format"}
I reproduced the error and saw that it was because the simulate endpoint needed to be added to rawRequestPaths, otherwise the code uses the query params as the POST body. This required a code generation change as well: https://github.com/algorand/generator/pull/68
In order to add coverage, I enabled the @simulate cucumber tests and added the necessary step defs.
Note that these tests also cover simulating with the AtomicTransactionComposer, which this SDK didn't support. Instead of modifying the test tags to separate this out (and updating the other SDKs' tags), I ended up implementing the missing feature instead.
A user reported that the following error occurred when trying to use the algod simulate endpoint:
I reproduced the error and saw that it was because the simulate endpoint needed to be added to
rawRequestPaths
, otherwise the code uses the query params as the POST body. This required a code generation change as well: https://github.com/algorand/generator/pull/68In order to add coverage, I enabled the
@simulate
cucumber tests and added the necessary step defs.Note that these tests also cover simulating with the
AtomicTransactionComposer
, which this SDK didn't support. Instead of modifying the test tags to separate this out (and updating the other SDKs' tags), I ended up implementing the missing feature instead.