Fix pool router queries
Closed this issue · 0 comments
kerber0x commented
After we merged the 2-pool stableswap something might have broken with the pool router.
When executing the following:
{
"simulate_swap_operations": {
"offer_amount": "1000000",
"operations": [
{
"terra_swap": {
"offer_asset_info": {
"native_token": {
"denom": "uwhale"
}
},
"ask_asset_info": {
"token": {
"contract_addr": "migaloo1j08452mqwadp8xu25kn9rleyl2gufgfjnv0sn8dvynynakkjukcq5u780c"
}
}
}
}
]
}
}
we get the error:
Error: Query failed with (6): Error parsing into type terraswap::asset::PairInfo: unknown field `pair_type`, expected one of `asset_infos`, `contract_addr`, `liquidity_token`, `asset_decimals`: query wasm contract failed: unknown request
I believe it has to do with the fact we didn't migrate the PairInfo
used by the pool router (we introduced a new parameter in there to account for the stableswap).
Look at migrating the state of the pool router. For reference, you can look at how the state was migrated in the pool factory and the pair contract.
How to test
This is happening on the pool router deployed on Migaloo's testnet narwhal-1. The pool router address is migaloo1zwv6feuzhy6a9wekh96cd57lsarmqlwxdypdsplw6zhfncqw6ftqqhavvl
.