Skip to content

Commit 1388a93

Browse files
authored
Add docstrings (#7)
1 parent bd466aa commit 1388a93

File tree

2 files changed

+413
-41
lines changed

2 files changed

+413
-41
lines changed

src/interfaces/IWormholeReceiver.sol

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,21 @@ pragma solidity ^0.8.0;
88
interface IWormholeReceiver {
99
/**
1010
* @notice When a `send` is performed with this contract as the target, this function will be
11-
* invoked.
12-
* To get the address that will invoke this contract, call the `getDeliveryAddress()` function
13-
* on this chain (the target chain)'s WormholeRelayer contract
11+
* invoked by the WormholeRelayer contract
1412
*
15-
* NOTE: This function should be restricted such that only `getDeliveryAddress()` can call it.
13+
* NOTE: This function should be restricted such that only the Wormhole Relayer contract can call it.
1614
*
1715
* We also recommend that this function:
18-
* - Stores all received `deliveryData.deliveryHash`s in a mapping `(bytes32 => bool)`, and
19-
* on every call, checks that deliveryData.deliveryHash has not already been stored in the
16+
* - Stores all received `deliveryHash`s in a mapping `(bytes32 => bool)`, and
17+
* on every call, checks that deliveryHash has not already been stored in the
2018
* map (This is to prevent other users maliciously trying to relay the same message)
21-
* - Checks that `deliveryData.sourceChain` and `deliveryData.sourceAddress` are indeed who
19+
* - Checks that `sourceChain` and `sourceAddress` are indeed who
2220
* you expect to have requested the calling of `send` or `forward` on the source chain
2321
*
2422
* The invocation of this function corresponding to the `send` request will have msg.value equal
2523
* to the receiverValue specified in the send request.
2624
*
27-
* If the invocation of this function reverts or exceeds the gas limit (`maxTransactionFee`)
25+
* If the invocation of this function reverts or exceeds the gas limit
2826
* specified by the send requester, this delivery will result in a `ReceiverFailure`.
2927
*
3028
* @param payload - an arbitrary message which was included in the delivery by the
@@ -48,4 +46,4 @@ interface IWormholeReceiver {
4846
uint16 sourceChain,
4947
bytes32 deliveryHash
5048
) external payable;
51-
}
49+
}

0 commit comments

Comments
 (0)