Closed mpoke closed 1 year ago
Alternative solution (suggested by @crodriguezvega):
Also, instead of calling directly Transfer I think the recommended approach is to route the message through the service router. For example, this is what we do in ICA host when a message is received. The keeper of the host is created with a MessageRouter (see also wiring in app.go). So maybe that could be a way to do it as well in interchain security, and then maybe you can remove the dependency to the transfer keeper. I believe in that case ValidateBasic will trigger for the message.
Problem
Before calling the Transfer method of ICS-20, the message is not being validated. Normally, Transfer is called as a result of submitting a message MsgTransfer to the chain, which calls
ValidateBasic
. However, the validation is skipped in case of calling the method directly.Closing criteria
Validate MsgTransfer before calling Transfer.