Skip to content
Merged
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
7 changes: 5 additions & 2 deletions src/lib/LibFlow.sol
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,11 @@ library LibFlow {

/// Processes the ERC20 transfers in the flow.
/// Reverts if the `from` address is not either the `msg.sender` or the
/// flow contract. Uses `IERC20.safeTransferFrom` to transfer the tokens to
/// ensure that reverts from the token are respected.
/// flow contract. Uses `IERC20.safeTransferFrom(from, to, amount)` when
/// `from == msg.sender` and `IERC20.safeTransfer(to, amount)` when
/// `from == address(this)` — the self-flow branch must use
/// `safeTransfer` because OZ `transferFrom` consumes allowance even
/// when `from == msg.sender`. Both branches surface token reverts.
/// @param flowTransfer The `FlowTransferV1` to process. Tokens other than
/// ERC20 tokens are ignored.
function flowERC20(FlowTransferV1 memory flowTransfer) internal {
Expand Down
Loading