Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Plume M-03] add hook to dispatch and L-03 make quote and dispatch consi… #38

Open
wants to merge 1 commit into
base: jun/hyperlane-teller
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,14 @@ contract MultiChainHyperlaneTellerWithMultiAssetSupport is MultiChainTellerBase
* @param data Bridge data
*/
function _quote(uint256 shareAmount, BridgeData calldata data) internal view override returns (uint256) {
bytes memory _payload = abi.encode(shareAmount, data.destinationChainReceiver);
bytes32 messageId = keccak256(abi.encodePacked(++nonce, address(this), block.chainid));
jpick713 marked this conversation as resolved.
Show resolved Hide resolved

bytes memory _payload = abi.encode(shareAmount, data.destinationChainReceiver, messageId);

bytes32 msgRecipient = _addressToBytes32(selectorToChains[data.chainSelector].targetTeller);

return mailbox.quoteDispatch(
data.chainSelector, msgRecipient, _payload, StandardHookMetadata.overrideGasLimit(data.messageGas)
data.chainSelector, msgRecipient, _payload, StandardHookMetadata.overrideGasLimit(data.messageGas), hook
);
}

Expand Down Expand Up @@ -172,9 +175,9 @@ contract MultiChainHyperlaneTellerWithMultiAssetSupport is MultiChainTellerBase
data.chainSelector, // must be `destinationDomain` on hyperlane
msgRecipient, // must be the teller address left-padded to bytes32
_payload,
StandardHookMetadata.overrideGasLimit(data.messageGas) // Sets the refund address to msg.sender, sets
// `_msgValue`
// to zero
StandardHookMetadata.overrideGasLimit(data.messageGas), // Sets the refund address to msg.sender, sets
// `_msgValue` to zero
hook
);
}

Expand Down
Loading