To fix both ado>>query and ado>>execute commands are not working for v2 contracts.
Implementation
There is a change in base andr queries, For v1 contracts all the base andr queries are under and_query obj key. Now andr_query is gone and they all moved to base level queries for v2.
To support both old and latest contracts, We have applied below patch code temporarily,
-> First will fetch the schema version of the contract using queryContractRaw function of CosmWasm query
-> Then based on the schema version, If v1 then will push the base andr queries under the and_query obj key, And if it is v2 then we will use them as base level queries without and_query obj key.
This patch is until we entirely shift to v2. After moving we will drop supporting v1
Testing
Tested both ado>>query and ado>>execute commands for both v1 and v2 contracts from CLI and they are working fine
Notes
NA
Future work
Remove the patch code that supporting v1 contracts
Motivation
To fix both ado>>query and ado>>execute commands are not working for v2 contracts.
Implementation
There is a change in base andr queries, For v1 contracts all the base andr queries are under and_query obj key. Now andr_query is gone and they all moved to base level queries for v2.
To support both old and latest contracts, We have applied below patch code temporarily, -> First will fetch the schema version of the contract using queryContractRaw function of CosmWasm query -> Then based on the schema version, If v1 then will push the base andr queries under the and_query obj key, And if it is v2 then we will use them as base level queries without and_query obj key.
This patch is until we entirely shift to v2. After moving we will drop supporting v1
Testing
Tested both ado>>query and ado>>execute commands for both v1 and v2 contracts from CLI and they are working fine
Notes
NA
Future work
Remove the patch code that supporting v1 contracts