Open nicolaslara opened 11 months ago
hey @nicolaslara! is this free to pick up?
yes!
I have one question: is hash-prefix
this issue refers to and the one we want to provide as an argument is this?
const types.SenderPrefix untyped string = "ibc-wasm-hook-intermediary"
CC: @nicolaslara
Yeah, exactly
Background
IBC hooks exposes a function to derive the intermediate sender: https://github.com/osmosis-labs/osmosis/blob/main/x/ibc-hooks/client/cli/query.go#L62. This is very similar to the function used by PFM, the only difference is the prefix used.
Allowing users to customize the prefix would make it easy to predict the PFM addresses using this function. This will be useful in tests (https://github.com/osmosis-labs/osmosis/pull/5954/files#diff-7d1fc1e232b55677582b51e2623aae6d8c15b5f0960ac6100fc7d733cb795dacR1308) and when crafting packets to forward that may depend on the sender (XCSv2)
Suggested Design
Modify the query to take two optional parameters
--hash-prefix
andbech32-prefix
and pass them to a helper function. The basic function used in ibc hooks should still have the hash prefix hardcoded and just use the helper internallyAcceptance Criteria
osmosisd q ibchooks wasmsender
should support the two extra params