Make sure the queries return proper Response Structs instead of naked values
Opened this issue · 0 comments
kerber0x commented
Go through all the contracts and make sure the queries are returning proper Response structs, such as
#[cw_serde]
#[derive(QueryResponses)]
pub enum QueryMsg {
/// Returns the amount of tokens that have been bonded by the specified address.
#[returns(BondedResponse)]
Bonded { address: String },
}
#[cw_serde]
pub struct BondedResponse {
pub bonded: Uint128,
}
vs
#[cw_serde]
#[derive(QueryResponses)]
pub enum QueryMsg {
/// Returns the amount of tokens that have been bonded by the specified address.
#[returns(Uint128)]
Bonded { address: String },
}
Note that the changes could break things for the front ends, so make sure to coordinate with the respective teams before migrating the contracts.
P.S.:
The only exception can be the Config
struct.