You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The method setSuggestedParams() of the Java object MethodCallParams.Builder used for ABI calls with ATC is pulling TransactionParams from v1 API instead of v2's TransactionParametersResponse. These objects are serialized differently, as a consequence it is not possible to call ABI methods with the Java SDK.
Your environment
Software version: sandbox: 3.5.139117.dev
Steps to reproduce
TransactionParametersResponse sp = algod.TransactionParams().execute().body();
// create methodCallParams by builder (or create by constructor) for txntest method
MethodCallParams.Builder methodCallParamsBuilderTxn = new MethodCallParams.Builder();
// methodCallParams txn: commons params
...
methodCallParamsBuilderTxn.setSuggestedParams(sp);
Expected behaviour
Set suggested params pulled from algod v2 API as TransactionParametersResponse object
Actual behaviour
Getting error: The method setSuggestedParams(TransactionParams) in the type MethodCallParams.Builder is not applicable for the arguments (TransactionParametersResponse)
The text was updated successfully, but these errors were encountered:
I'm not familiar with the AtomicTransactionComposer, but my first impression is that the design for this feature overlaps with the preexisting transaction builders. Instead of using the "params" pattern, and a new builder convention why not add a new "MethodCallTransactionBuilder" class to the other builders?
Looking again this morning, it also seems that the MethodCallParams.Builder is missing at least one required common field:
genesis hash (or is that not required for method calls?)
Subject of the issue
The method
setSuggestedParams()
of the Java objectMethodCallParams.Builder
used for ABI calls with ATC is pullingTransactionParams
from v1 API instead of v2'sTransactionParametersResponse
. These objects are serialized differently, as a consequence it is not possible to call ABI methods with the Java SDK.Your environment
sandbox: 3.5.139117.dev
Steps to reproduce
Expected behaviour
Set suggested params pulled from algod v2 API as
TransactionParametersResponse
objectActual behaviour
Getting error:
The method setSuggestedParams(TransactionParams) in the type MethodCallParams.Builder is not applicable for the arguments (TransactionParametersResponse)
The text was updated successfully, but these errors were encountered: