Skip to content

Commit

Permalink
Add fee getter for ExampleAppV1
Browse files Browse the repository at this point in the history
  • Loading branch information
ChiTimesChi committed Mar 21, 2024
1 parent af7cea7 commit f697db0
Showing 1 changed file with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,20 @@ contract ExampleAppV1 is ICAppV1 {
emit MessageSent(dstChainId, desc.dbNonce, desc.entryIndex, desc.transactionId);
}

/// @notice Returns the fee required to send a message using `sendMessage`.
function getMessageFee(
uint256 dstChainId,
uint256 gasLimit,
uint256 gasAirdrop,
bytes memory message
)
external
view
returns (uint256)
{
return _getMessageFee(dstChainId, OptionsV1({gasLimit: gasLimit, gasAirdrop: gasAirdrop}), message);
}

/// @dev Internal logic for receiving messages. At this point the validity of the message is already checked.
function _receiveMessage(
uint256 srcChainId,
Expand Down

0 comments on commit f697db0

Please sign in to comment.