Skip to content

Commit

Permalink
feat: check if channelorder is unordered
Browse files Browse the repository at this point in the history
  • Loading branch information
reednaa committed Mar 22, 2024
1 parent d2c4747 commit bd6726b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/apps/polymer/vIBCEscrow.sol
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import { IbcReceiverBase, IbcReceiver } from "vibc-core-smart-contracts/interfac
contract IncentivizedPolymerEscrow is APolymerEscrow, IbcReceiverBase, IbcReceiver {
error ChannelNotFound();
error UnsupportedVersion();
error UnsupportedChannelOrder();

uint constant POLYMER_SENDER_IDENTIFIER_START = 0;
uint constant POLYMER_SENDER_IDENTIFIER_END = 32;
Expand All @@ -41,11 +42,14 @@ contract IncentivizedPolymerEscrow is APolymerEscrow, IbcReceiverBase, IbcReceiv

function onOpenIbcChannel(
string calldata version,
ChannelOrder /* */,
ChannelOrder order,
bool,
string[] calldata,
CounterParty calldata counterparty
) external view onlyIbcDispatcher returns (string memory selectedVersion) {
// Check that the order is unordered:
if (order != ChannelOrder.NONE) revert UnsupportedChannelOrder();

if (counterparty.channelId == bytes32(0)) {
// ChanOpenInit
if (
Expand Down

0 comments on commit bd6726b

Please sign in to comment.