Skip to content

Commit

Permalink
fix: improved code formatting and timestamp calculation for time base…
Browse files Browse the repository at this point in the history
…d paymasters (#948)
  • Loading branch information
bug-author committed Mar 25, 2024
1 parent 1f07e20 commit 7888fc9
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ The intended objective of the `TimeBasedPaymaster` contract is to permit transac
Include the validation logic in the `validateAndPayForPaymasterTransaction` function in the contract. Insert the following code under the `if(paymasterInputSelector == IPaymasterFlow.general.selector){` condition check:

```solidity
uint256 startTime = (block.timestamp / 86400) * 86400 + 15 hours;
uint256 endTime = startTime + 20 minutes;
uint256 startTime = (block.timestamp / 86400) * 86400 + (15 * 3600); // Adding 15 hours (15 * 3600 seconds)
uint256 endTime = startTime + (20 * 60); // Adding 20 minutes (20 * 60 seconds)
require(
block.timestamp >= startTime && block.timestamp <= endTime,
Expand Down

0 comments on commit 7888fc9

Please sign in to comment.