Skip to content
Merged
Show file tree
Hide file tree
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
3 changes: 3 additions & 0 deletions contracts/HubPool.sol
Original file line number Diff line number Diff line change
Expand Up @@ -481,6 +481,7 @@ contract HubPool is HubPoolInterface, Testable, Lockable, MultiCaller, Ownable {
* and the caller, or "liquidity provider" earns a continuous fee for their credit that they are extending relayers.
* @notice Caller will receive an LP token representing their share of this pool. The LP token's redemption value
* increments from the time that they enter the pool to reflect their accrued fees.
* @notice The caller of this function must approve this contract to spend l1TokenAmount of l1Token.
* @param l1Token Token to deposit into this contract.
* @param l1TokenAmount Amount of liquidity to provide.
*/
Expand Down Expand Up @@ -588,6 +589,7 @@ contract HubPool is HubPoolInterface, Testable, Lockable, MultiCaller, Ownable {
* called; moreover, this method can't be called again until all leafs are executed.
* @param bundleEvaluationBlockNumbers should contain the latest block number for all chains, even if there are no
* relays contained on some of them. The usage of this variable should be defined in an off chain UMIP.
* @notice The caller of this function must approve this contract to spend bondAmount of bondToken.
* @param poolRebalanceLeafCount Number of leaves contained in pool rebalance root. Max is the number of whitelisted chains.
* @param poolRebalanceRoot Pool rebalance root containing leaves that will send tokens from this contract to a SpokePool.
* @param relayerRefundRoot Relayer refund root to publish to SpokePool where a data worker can execute leaves to
Expand Down Expand Up @@ -745,6 +747,7 @@ contract HubPool is HubPoolInterface, Testable, Lockable, MultiCaller, Ownable {
* @notice Caller stakes a bond to dispute the current root bundle proposal assuming it has not passed liveness
* yet. The proposal is deleted, allowing a follow-up proposal to be submitted, and the dispute is sent to the
* optimistic oracle to be adjudicated. Can only be called within the liveness period of the current proposal.
* @notice The caller of this function must approve this contract to spend bondAmount of l1Token.
*/
function disputeRootBundle() public nonReentrant zeroOptimisticOracleApproval {
uint32 currentTime = uint32(getCurrentTime());
Expand Down
1 change: 1 addition & 0 deletions contracts/PolygonTokenBridger.sol
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ contract PolygonTokenBridger is Lockable {

/**
* @notice Called by Polygon SpokePool to send tokens over bridge to contract with the same address as this.
* @notice The caller of this function must approve this contract to spend amount of token.
* @param token Token to bridge.
* @param amount Amount to bridge.
* @param isWrappedMatic True if token is WMATIC.
Expand Down
16 changes: 10 additions & 6 deletions contracts/SpokePool.sol
Original file line number Diff line number Diff line change
Expand Up @@ -710,12 +710,16 @@ abstract contract SpokePool is SpokePoolInterface, Testable, Lockable, MultiCall
}
}

// @notice Caller specifies the max amount of tokens to send to user. Based on this amount and the amount of the
// relay remaining (as stored in the relayFills mapping), pull the amount of tokens from the caller ancillaryData
// and send to the caller.
// @dev relayFills keeps track of pre-fee fill amounts as a convenience to relayers who want to specify round
// numbers for the maxTokensToSend parameter or convenient numbers like 100 (i.e. relayers who will fully
// fill any relay up to 100 tokens, and partial fill with 100 tokens for larger relays).
/**
* @notice Caller specifies the max amount of tokens to send to user. Based on this amount and the amount of the
* relay remaining (as stored in the relayFills mapping), pull the amount of tokens from the caller
* and send to the recipient.
* @dev relayFills keeps track of pre-fee fill amounts as a convenience to relayers who want to specify round
* numbers for the maxTokensToSend parameter or convenient numbers like 100 (i.e. relayers who will fully
* fill any relay up to 100 tokens, and partial fill with 100 tokens for larger relays).
* @dev Caller must approve this contract to transfer up to maxTokensToSend of the relayData.destinationToken.
* The amount to be sent might end up less if there is insufficient relay amount remaining to be sent.
*/
function _fillRelay(
bytes32 relayHash,
RelayData memory relayData,
Expand Down