From 7888fc946dcc94f1f3f129c555a81d31a0fd6bfa Mon Sep 17 00:00:00 2001 From: bug-author <48406637+bug-author@users.noreply.github.com> Date: Mon, 25 Mar 2024 05:01:11 +0500 Subject: [PATCH] fix: improved code formatting and timestamp calculation for time based paymasters (#948) --- .../smart-contract-development/paymasters/timebased.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/build/tutorials/smart-contract-development/paymasters/timebased.md b/docs/build/tutorials/smart-contract-development/paymasters/timebased.md index b120eabc0b..dbffb0edae 100644 --- a/docs/build/tutorials/smart-contract-development/paymasters/timebased.md +++ b/docs/build/tutorials/smart-contract-development/paymasters/timebased.md @@ -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,