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
We still can read this type of data but the thing is it may meet problem if the ibc reflect packet is error.
The value should be embedded in SDK ACK packet struct (channeltypes.Acknowledgement) so feeabs chain module can handle the ibc ack packet.
SOLUTION
Contract: Embedded spot price value in ibc ack packet
let acknowledgement = to_binary(&AcknowledgementMsg::Ok(value))?;
Ok(IbcReceiveResponse::new()
.set_ack(acknowledgement)
.add_attribute("key_attr", "attr_value"))
Add check ack
var ack channeltypes.Acknowledgement
if err := types.ModuleCdc.UnmarshalJSON(acknowledgement, &ack); err != nil {
return sdkerrors.Wrapf(sdkerrors.ErrUnknownRequest, "cannot unmarshal packet acknowledgement: %v", err)
}
switch resp := ack.Response.(type) {
case *channeltypes.Acknowledgement_Result:
// Ack success logic
case *channeltypes.Acknowledgement_Error:
// Ack error logic
}
The text was updated successfully, but these errors were encountered:
@expertdicer pls check this issue, can you fix with contract side pls? I will handle with the chain side. @vuong177 some minor issue, but i think we can still use current version for demo. The result is unaffected
ISSUE
Currently, packet ack reflect from contract not correct. It only respone value(which is the raw data spot price from osmosis) here
=> To read this data, we just need to have json unmarshal with types.SpotPrice (Current running in vuong/testingquery branch).
fee-abstraction/x/feeabs/ibc_module.go
Lines 166 to 174 in 434d65d
We still can read this type of data but the thing is it may meet problem if the ibc reflect packet is error.
The value should be embedded in SDK ACK packet struct (channeltypes.Acknowledgement) so feeabs chain module can handle the ibc ack packet.
SOLUTION
The text was updated successfully, but these errors were encountered: