Skip to content

Commit 20bee0f

Browse files
committed
document batch
1 parent 70e1930 commit 20bee0f

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

src/payment-factory.sol

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,12 @@ contract PaymentFactory {
137137
}
138138

139139

140-
/// @dev Calulates the payament address given the following parameters
140+
/// @notice Given the parameters used to generate a payement address, this function will forward the payment to the merchant's address.
141+
/// @param merchant The merchant's address which the funds get sent to
142+
/// @param proof The address that the receipt or the refund will be sent to
143+
/// @param amount The amount the customer is paying
144+
/// @param currency The address of the ERC20 that is being used as payement. If that currency is Ether then use zero address `0x0000000000000000000000000000000000000000`.
145+
/// @param recieptHash The hash of the receipt
141146
function processPayment(
142147
address payable merchant,
143148
address payable proof,
@@ -164,6 +169,12 @@ contract PaymentFactory {
164169
lastPaymentAddress = msg.sender;
165170
}
166171

172+
/// @notice this does a batched call to `processPayment`
173+
/// @param merchant The merchant's address which the funds get sent to
174+
/// @param proof The address that the receipt or the refund will be sent to
175+
/// @param amount The amount the customer is paying
176+
/// @param currency The address of the ERC20 that is being used as payement. If that currency is Ether then use zero address `0x0000000000000000000000000000000000000000`.
177+
/// @param recieptHash The hash of the receipt
167178
function batch(
168179
address payable[] calldata merchants,
169180
address payable[] calldata proofs,

0 commit comments

Comments
 (0)