Skip to content

Commit

Permalink
feat(voyager): implements ack/writeack events on evm (#833)
Browse files Browse the repository at this point in the history
  • Loading branch information
hussein-aitlahcen authored Oct 19, 2023
2 parents 9ec5983 + d72539d commit 5716391
Showing 1 changed file with 21 additions and 6 deletions.
27 changes: 21 additions & 6 deletions voyager/src/queue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -607,8 +607,6 @@ impl<Q: Queue> Voyager<Q> {
}),
})
}

// IbcEvent::WriteAcknowledgement(_) => todo!(),
IbcEvent::RecvPacket(packet) => {
LcMsg::<CometblsMinimal>::Event(Identified {
chain_id: event.chain_id,
Expand All @@ -629,9 +627,27 @@ impl<Q: Queue> Voyager<Q> {
}),
})
}
IbcEvent::AcknowledgePacket(_) => todo!(),
IbcEvent::AcknowledgePacket(ack_packet) => {
LcMsg::<CometblsMinimal>::Event(Identified {
chain_id: event.chain_id,
data: Event::Ibc(crate::msg::event::IbcEvent {
block_hash: event.block_hash,
height: event.height,
event: IbcEvent::AcknowledgePacket(ack_packet),
}),
})
}
IbcEvent::WriteAcknowledgement(write_ack) => {
LcMsg::<CometblsMinimal>::Event(Identified {
chain_id: event.chain_id,
data: Event::Ibc(crate::msg::event::IbcEvent {
block_hash: event.block_hash,
height: event.height,
event: IbcEvent::WriteAcknowledgement(write_ack),
}),
})
}
IbcEvent::TimeoutPacket(_) => todo!(),
IbcEvent::WriteAcknowledgement(_) => todo!(),
};

RelayerMsg::Lc(AnyLcMsg::from(event))
Expand Down Expand Up @@ -855,7 +871,6 @@ impl<Q: Queue> Voyager<Q> {
})
}

// IbcEvent::WriteAcknowledgement(_) => todo!(),
IbcEvent::RecvPacket(recv_packet) => {
LcMsg::<EthereumMinimal>::Event(Identified {
chain_id: event.chain_id,
Expand Down Expand Up @@ -886,7 +901,6 @@ impl<Q: Queue> Voyager<Q> {
}),
})
}
IbcEvent::TimeoutPacket(_) => todo!(),
IbcEvent::WriteAcknowledgement(write_ack) => {
LcMsg::<EthereumMinimal>::Event(Identified {
chain_id: event.chain_id,
Expand All @@ -897,6 +911,7 @@ impl<Q: Queue> Voyager<Q> {
}),
})
}
IbcEvent::TimeoutPacket(_) => todo!(),
};

RelayerMsg::Lc(AnyLcMsg::from(event))
Expand Down

0 comments on commit 5716391

Please sign in to comment.