Skip to content

Commit

Permalink
feat: implemented recv_packet
Browse files Browse the repository at this point in the history
  • Loading branch information
srdtrk committed Jul 24, 2024
1 parent 8955434 commit 32f27da
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/ICS26Router.sol
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ contract ICS26Router is IICS26Router, IBCStore, Ownable, IICS26RouterErrors, Ree
/// @notice Receives a packet
/// @param msg_ The message for receiving packets
function recvPacket(MsgRecvPacket calldata msg_) external nonReentrant {
// TODO: implement
IIBCApp app = apps[msg_.packet.destPort];

string memory counterpartyId = ics02Client.getCounterparty(msg_.packet.destChannel).clientId;
Expand All @@ -111,10 +110,7 @@ contract ICS26Router is IICS26Router, IBCStore, Ownable, IICS26RouterErrors, Ree
kvPair: ILightClientMsgs.KVPair({ path: commitmentPath, value: abi.encodePacked(commitmentBz) })
});

uint32 proofTimestamp = ics02Client.getClient(msg_.packet.destChannel).verifyMembership(membershipMsg);
if (msg_.packet.timeoutTimestamp <= proofTimestamp) {
revert IBCInvalidTimeoutTimestamp(proofTimestamp, msg_.packet.timeoutTimestamp);
}
ics02Client.getClient(msg_.packet.destChannel).verifyMembership(membershipMsg);
if (msg_.packet.timeoutTimestamp <= block.timestamp) {
revert IBCInvalidTimeoutTimestamp(msg_.packet.timeoutTimestamp, block.timestamp);
}
Expand Down

0 comments on commit 32f27da

Please sign in to comment.