@@ -50,7 +50,7 @@ func (i IBCHandler) OnChanOpenInit(
5050 if err := ValidateChannelParams (channelID ); err != nil {
5151 return "" , err
5252 }
53- contractAddr , err := i .keeper .ContractFromPortID (portID )
53+ contractAddr , err := i .keeper .ContractFromPortID (ctx , portID )
5454 if err != nil {
5555 return "" , errorsmod .Wrapf (err , "contract port id" )
5656 }
@@ -102,7 +102,7 @@ func (i IBCHandler) OnChanOpenTry(
102102 return "" , err
103103 }
104104
105- contractAddr , err := i .keeper .ContractFromPortID (portID )
105+ contractAddr , err := i .keeper .ContractFromPortID (ctx , portID )
106106 if err != nil {
107107 return "" , errorsmod .Wrapf (err , "contract port id" )
108108 }
@@ -150,7 +150,7 @@ func (i IBCHandler) OnChanOpenAck(
150150 counterpartyChannelID string ,
151151 counterpartyVersion string ,
152152) error {
153- contractAddr , err := i .keeper .ContractFromPortID (portID )
153+ contractAddr , err := i .keeper .ContractFromPortID (ctx , portID )
154154 if err != nil {
155155 return errorsmod .Wrapf (err , "contract port id" )
156156 }
@@ -176,7 +176,7 @@ func (i IBCHandler) OnChanOpenAck(
176176
177177// OnChanOpenConfirm implements the IBCModule interface
178178func (i IBCHandler ) OnChanOpenConfirm (ctx sdk.Context , portID , channelID string ) error {
179- contractAddr , err := i .keeper .ContractFromPortID (portID )
179+ contractAddr , err := i .keeper .ContractFromPortID (ctx , portID )
180180 if err != nil {
181181 return errorsmod .Wrapf (err , "contract port id" )
182182 }
@@ -198,7 +198,7 @@ func (i IBCHandler) OnChanOpenConfirm(ctx sdk.Context, portID, channelID string)
198198
199199// OnChanCloseInit implements the IBCModule interface
200200func (i IBCHandler ) OnChanCloseInit (ctx sdk.Context , portID , channelID string ) error {
201- contractAddr , err := i .keeper .ContractFromPortID (portID )
201+ contractAddr , err := i .keeper .ContractFromPortID (ctx , portID )
202202 if err != nil {
203203 return errorsmod .Wrapf (err , "contract port id" )
204204 }
@@ -226,7 +226,7 @@ func (i IBCHandler) OnChanCloseInit(ctx sdk.Context, portID, channelID string) e
226226// OnChanCloseConfirm implements the IBCModule interface
227227func (i IBCHandler ) OnChanCloseConfirm (ctx sdk.Context , portID , channelID string ) error {
228228 // counterparty has closed the channel
229- contractAddr , err := i .keeper .ContractFromPortID (portID )
229+ contractAddr , err := i .keeper .ContractFromPortID (ctx , portID )
230230 if err != nil {
231231 return errorsmod .Wrapf (err , "contract port id" )
232232 }
@@ -267,7 +267,7 @@ func (i IBCHandler) OnRecvPacket(
267267 packet channeltypes.Packet ,
268268 relayer sdk.AccAddress ,
269269) ibcexported.Acknowledgement {
270- contractAddr , err := i .keeper .ContractFromPortID (packet .DestinationPort )
270+ contractAddr , err := i .keeper .ContractFromPortID (ctx , packet .DestinationPort )
271271 if err != nil {
272272 // this must not happen as ports were registered before
273273 panic (errorsmod .Wrapf (err , "contract port id" ))
@@ -295,7 +295,7 @@ func (i IBCHandler) OnAcknowledgementPacket(
295295 acknowledgement []byte ,
296296 relayer sdk.AccAddress ,
297297) error {
298- contractAddr , err := i .keeper .ContractFromPortID (packet .SourcePort )
298+ contractAddr , err := i .keeper .ContractFromPortID (ctx , packet .SourcePort )
299299 if err != nil {
300300 return errorsmod .Wrapf (err , "contract port id" )
301301 }
@@ -313,7 +313,7 @@ func (i IBCHandler) OnAcknowledgementPacket(
313313
314314// OnTimeoutPacket implements the IBCModule interface
315315func (i IBCHandler ) OnTimeoutPacket (ctx sdk.Context , packet channeltypes.Packet , relayer sdk.AccAddress ) error {
316- contractAddr , err := i .keeper .ContractFromPortID (packet .SourcePort )
316+ contractAddr , err := i .keeper .ContractFromPortID (ctx , packet .SourcePort )
317317 if err != nil {
318318 return errorsmod .Wrapf (err , "contract port id" )
319319 }
0 commit comments