Skip to content

Commit

Permalink
chore: add support for token bridge attestation
Browse files Browse the repository at this point in the history
  • Loading branch information
sujithsomraaj committed May 22, 2024
1 parent f1984d4 commit 3d5d8fe
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/wormhole/specialized-relayer/WormholeHelper.sol
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {TypeCasts} from "../../libraries/TypeCasts.sol";

interface IWormholeReceiver {
function receiveMessage(bytes memory encodedMessage) external;
function createWrapped(bytes memory encodedVm) external returns (address token);
}

/// @title WormholeHelper
Expand Down Expand Up @@ -168,7 +169,11 @@ contract WormholeHelper is Test {
);

/// @dev delivers the message by passing the new guardian set to receiver
IWormholeReceiver(dstTarget).receiveMessage(encodedVAA);
try IWormholeReceiver(dstTarget).receiveMessage(encodedVAA) {}
catch {
/// TODO: implement enum for delivery types to support nft and token bridges
IWormholeReceiver(dstTarget).createWrapped(encodedVAA);
}
}
}

Expand Down

0 comments on commit 3d5d8fe

Please sign in to comment.