Skip to content

Commit 8d42467

Browse files
committed
add comment to calculateFee
1 parent bc136a3 commit 8d42467

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

contracts/FlowTransactionScheduler.cdc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1466,7 +1466,9 @@ access(all) contract FlowTransactionScheduler {
14661466
/// Allows users to calculate the fee for a scheduled transaction without having to call the expensive estimate function
14671467
/// @param executionEffort: The execution effort of the transaction
14681468
/// @param priority: The priority of the transaction
1469-
/// @param dataSizeMB: The size of the data that was passed when the transaction was originally scheduled
1469+
/// @param dataSizeMB: The size of the data to be stored with the scheduled transaction
1470+
/// The user must calculate this data size themselves before calling this function
1471+
/// But should be done in a separate script or transaction to avoid the expensive getSizeOfData function
14701472
/// @return UFix64: The fee in Flow tokens that is required to pay for the transaction
14711473
access(all) fun calculateFee(executionEffort: UInt64, priority: Priority, dataSizeMB: UFix64): UFix64 {
14721474
return self.sharedScheduler.borrow()!.calculateFee(executionEffort: executionEffort, priority: priority, dataSizeMB: dataSizeMB)

0 commit comments

Comments
 (0)