Skip to content

Commit

Permalink
simplify callback
Browse files Browse the repository at this point in the history
  • Loading branch information
mmsqe committed Nov 8, 2023
1 parent 5c4ccfa commit 2497b65
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion integration_tests/contracts/contracts/TestICA.sol
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ contract TestICA {
return statusMap[packetSrcChannel][seq];
}

function onPacketResultCallback(uint64 seq, bool ack, string calldata packetSrcChannel, string calldata packetDstChannel) external payable returns (bool) {
function onPacketResultCallback(string calldata packetSrcChannel, uint64 seq, bool ack) external payable returns (bool) {
// To prevent called by arbitrary user
require(msg.sender == module_address);
Status status = Status.FAIL;
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion x/cronos/events/bindings/src/ICACallback.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
pragma solidity ^0.8.4;

interface IICACallback {
function onPacketResultCallback(uint64 seq, bool ack, string calldata packetSrcChannel, string calldata packetDstChannel) external payable returns (bool);
function onPacketResultCallback(string calldata packetSrcChannel, uint64 seq, bool ack) external payable returns (bool);
}
2 changes: 1 addition & 1 deletion x/cronos/keeper/keeper.go
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ func (k Keeper) onPacketResult(
packetSenderAddress string,
) error {
contractAddr := common.HexToAddress(contractAddress)
data, err := cronosprecompiles.OnPacketResultCallback(packet.Sequence, acknowledgement, packet.SourceChannel, packet.DestinationChannel)
data, err := cronosprecompiles.OnPacketResultCallback(packet.SourceChannel, packet.Sequence, acknowledgement)
if err != nil {
return err
}
Expand Down

0 comments on commit 2497b65

Please sign in to comment.