Browse Source

refactor: 清理暂停机制的冗余代码

- 移除自定义的 whenNotPaused 修饰符,使用 OpenZeppelin Pausable 标准实现
- 移除自定义的 ContractPaused 错误,使用标准暂停错误
- 简化代码结构,减少维护成本
- 提高与 OpenZeppelin 生态系统的兼容性
helium3@sina.com 1 week ago
parent
commit
24ab90fe76
1 changed files with 0 additions and 6 deletions
  1. 0 6
      contracts/Launchpad.sol

+ 0 - 6
contracts/Launchpad.sol

@@ -18,7 +18,6 @@ contract Launchpad is ReentrancyGuard, Pausable {
 	error InsufficientAmount(uint256 required, uint256 provided);
 	error TransferFailed();
 	error SaleNotConfigured();
-	error ContractPaused();
 	
 	// ================================
 	// State Variables
@@ -242,11 +241,6 @@ contract Launchpad is ReentrancyGuard, Pausable {
 		if (block.timestamp < claimStartTime) revert InvalidState("Claiming tokens not started yet");
 		_;
 	}
-	
-	modifier whenNotPaused() {
-		if (paused()) revert ContractPaused();
-		_;
-	}
 
 	// ================================
 	// Owner Functions