Skip to content

Commit 2f649b1

Browse files
authored
fix: [N02] Add docstring (#314)
Signed-off-by: Matt Rice <[email protected]>
1 parent 34d93c2 commit 2f649b1

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

contracts/SpokePoolVerifier.sol

+18
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,24 @@ import "./interfaces/SpokePoolInterface.sol";
1414
contract SpokePoolVerifier {
1515
using Address for address;
1616

17+
/**
18+
* @notice Passthrough function to `deposit()` on the SpokePool contract.
19+
* @dev Protects the caller from losing their ETH (or other native token) by reverting if the SpokePool address
20+
* they intended to call does not exist on this chain. Because this contract can be deployed at the same address
21+
* everywhere callers should be protected even if the transaction is submitted to an unintended network.
22+
* This contract should only be used for native token deposits, as this problem only exists for native tokens.
23+
* @param spokePool Address of the SpokePool contract that the user is intending to call.
24+
* @param recipient Address to receive funds at on destination chain.
25+
* @param originToken Token to lock into this contract to initiate deposit.
26+
* @param amount Amount of tokens to deposit. Will be amount of tokens to receive less fees.
27+
* @param destinationChainId Denotes network where user will receive funds from SpokePool by a relayer.
28+
* @param relayerFeePct % of deposit amount taken out to incentivize a fast relayer.
29+
* @param quoteTimestamp Timestamp used by relayers to compute this deposit's realizedLPFeePct which is paid
30+
* to LP pool on HubPool.
31+
* @param message Arbitrary data that can be used to pass additional information to the recipient along with the tokens.
32+
* Note: this is intended to be used to pass along instructions for how a contract should use or allocate the tokens.
33+
* @param maxCount used to protect the depositor from frontrunning to guarantee their quote remains valid.
34+
*/
1735
function deposit(
1836
SpokePoolInterface spokePool,
1937
address recipient,

0 commit comments

Comments
 (0)