@@ -540,8 +540,9 @@ contract NttManager is INttManager, RateLimiter, ManagerBase {
540540 // push it on the stack again to avoid a stack too deep error
541541 uint64 seq = sequence;
542542
543- TransceiverStructs.NativeTokenTransfer memory ntt =
544- _prepareNativeTokenTransfer (amount, token, recipient, recipientChain, seq, sender);
543+ TransceiverStructs.NativeTokenTransfer memory ntt = _prepareNativeTokenTransfer (
544+ amount, recipient, recipientChain, seq, sender, refundAddress
545+ );
545546
546547 // construct the NttManagerMessage payload
547548 bytes memory encodedNttManagerPayload = TransceiverStructs.encodeNttManagerMessage (
@@ -589,20 +590,20 @@ contract NttManager is INttManager, RateLimiter, ManagerBase {
589590 /// @dev Override this function to provide an additional payload on the NativeTokenTransfer
590591 /// For integrator flexibility, this function is *not* marked pure or view
591592 /// @param amount TrimmedAmount of the transfer
592- /// @param token Address of the token that this NTT Manager is tied to
593593 /// @param recipient The recipient address
594594 /// @param recipientChain The Wormhole chain ID for the destination
595595 /// @param - The sequence number for the manager message (unused, provided for overriding integrators)
596596 /// @param - The sender of the funds (unused, provided for overriding integrators). If releasing
597+ /// @param - The address on the destination chain to which the refund of unused gas will be paid
597598 /// queued transfers, when rate limiting is used, then this value could be different from msg.sender.
598599 /// @return - The TransceiverStructs.NativeTokenTransfer struct
599600 function _prepareNativeTokenTransfer (
600601 TrimmedAmount amount ,
601- address token ,
602602 bytes32 recipient ,
603603 uint16 recipientChain ,
604604 uint64 , // sequence
605- address // sender
605+ address , // sender
606+ bytes32 // refundAddress
606607 ) internal virtual returns (TransceiverStructs.NativeTokenTransfer memory ) {
607608 return TransceiverStructs.NativeTokenTransfer (
608609 amount, toWormholeFormat (token), recipient, recipientChain, ""
0 commit comments