Skip to content

Commit

Permalink
feat(evm): implement timeoutPacket for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
hussein-aitlahcen committed Sep 15, 2023
1 parent 1914730 commit 23382fd
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
5 changes: 5 additions & 0 deletions evm/tests/src/MockApp.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ contract MockApp is IIBCModule {
address relayer
) external virtual override {}

function onTimeoutPacket(
IbcCoreChannelV1Packet.Data calldata packet,
address relayer
) external virtual override {}

function onChanOpenInit(
IbcCoreChannelV1GlobalEnums.Order,
string[] calldata,
Expand Down
8 changes: 8 additions & 0 deletions evm/tests/src/utils/MockApp.sol
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {Context} from "@openzeppelin/contracts/utils/Context.sol";
contract MockApp is IIBCModule {
event MockPacketRecv();
event MockPacketAck();
event MockPacketTimeout();
event MockChannelOpenInit(string portId, string channelId);
event MockChannelOpenTry();
event MockChannelOpenAck();
Expand All @@ -32,6 +33,13 @@ contract MockApp is IIBCModule {
emit MockPacketAck();
}

function onTimeoutPacket(
Packet.Data calldata packet,
address relayer
) external virtual override {
emit MockPacketTimeout();
}

function onChanOpenInit(
ChannelEnums.Order,
string[] calldata,
Expand Down

0 comments on commit 23382fd

Please sign in to comment.