@evvm/testnet-contracts 3.0.1 → 3.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -74,13 +74,12 @@ library CoreError {
74
74
  /// @dev Thrown when address validation fails in proposals
75
75
  error IncorrectAddressInput();
76
76
 
77
- //░▒▓█ Time-Lock Errors █████████████████████████████████████████████████████▓▒░
78
-
79
- /// @dev Thrown when attempting time-locked action before delay (30d impl, 1d admin)
80
- error TimeLockNotExpired();
81
-
77
+ //░▒▓█ Proposal Errors █████████████████████████████████████████████████████▓▒░
82
78
 
79
+ /// @dev Thrown when accepting before timelock
80
+ error ProposalNotReadyToAccept();
83
81
 
82
+ //░▒▓█ Async/Sync Nonce Errors ██████████████████████████████████████████████▓▒░
84
83
  /// @dev Thrown when async nonce already consumed
85
84
  error AsyncNonceAlreadyUsed();
86
85
 
@@ -102,15 +101,30 @@ library CoreError {
102
101
  /// @dev Thrown when using async nonce reserved by different service
103
102
  error AsyncNonceIsReservedByAnotherService();
104
103
 
105
- /// @dev Thrown when accepting UserValidator proposal before timelock
106
- error ProposalForUserValidatorNotReady();
107
-
108
104
  /// @dev Thrown when validateAndConsumeNonce caller is EOA (contracts only)
109
105
  error MsgSenderIsNotAContract();
110
106
 
111
- /// @dev Thrown when accepting EVVM address proposal before timelock
112
- error ProposalForEvvmAddressNotReady();
113
-
114
107
  /// @dev Thrown when reserving nonce with service == address(0)
115
108
  error InvalidServiceAddress();
109
+
110
+ //░▒▓█ Token List Errors ████████████████████████████████████████████████████▓▒░
111
+ /**
112
+ * @dev Thrown when a token is in
113
+ * - the denylist (if the denylist is active)
114
+ * - not in the allowlist (if the allowlist is active)
115
+ */
116
+ error TokenIsDeniedForExecution();
117
+
118
+ /// @dev Thrown when list status is invalid (not 0x00, 0x01, or 0x02)
119
+ error InvalidListStatus();
120
+
121
+ //░▒▓█ Reward Distribution State ██████████████████████████████████████████████████████▓▒░
122
+
123
+ error RewardFlowDistributionChangeNotAllowed();
124
+
125
+ error BaseRewardIncreaseNotAllowed();
126
+
127
+ //░▒▓█ Total Supply State ██████████████████████████████████████████████████████▓▒░
128
+
129
+ error MaxSupplyDeletionNotAllowed();
116
130
  }
@@ -10,7 +10,7 @@ pragma solidity ^0.8.0;
10
10
  * @dev All operations validated via Core.sol async nonces. Payments via Core.sol.
11
11
  */
12
12
 
13
- abstract contract P2PSwapStructs {
13
+ library P2PSwapStructs {
14
14
  /**
15
15
  * @notice Market metadata for token pair trading
16
16
  * @dev Tracks order slot allocation and active order count.
@@ -68,60 +68,4 @@ abstract contract P2PSwapStructs {
68
68
  uint256 service;
69
69
  uint256 mateStaker;
70
70
  }
71
-
72
- /**
73
- * @notice Metadata for makeOrder operation signature
74
- * @dev Hashed via P2PSwapHashUtils. Validated via Core.sol with async nonce.
75
- * @param nonce Async nonce
76
- * @param tokenA Token offered
77
- * @param tokenB Token requested
78
- * @param amountA Amount offered
79
- * @param amountB Amount requested
80
- */
81
- struct MetadataMakeOrder {
82
- uint256 nonce;
83
- address originExecutor;
84
- address tokenA;
85
- address tokenB;
86
- uint256 amountA;
87
- uint256 amountB;
88
- }
89
-
90
- /**
91
- * @notice Metadata for cancelOrder operation signature
92
- * @dev Hashed via P2PSwapHashUtils. Only order owner can cancel. Async nonce.
93
- * @param nonce Async nonce
94
- * @param tokenA Token A in pair
95
- * @param tokenB Token B in pair
96
- * @param orderId Order ID to cancel
97
- * @param signature EIP-191 signature from seller
98
- */
99
- struct MetadataCancelOrder {
100
- uint256 nonce;
101
- address originExecutor;
102
- address tokenA;
103
- address tokenB;
104
- uint256 orderId;
105
- bytes signature;
106
- }
107
-
108
- /**
109
- * @notice Metadata for dispatchOrder operation signature
110
- * @dev Hashed via P2PSwapHashUtils. Used by both proportional and fixed fee variants. Async nonce.
111
- * @param nonce Async nonce
112
- * @param tokenA Token A in pair
113
- * @param tokenB Token B in pair
114
- * @param orderId Order ID to fill
115
- * @param amountOfTokenBToFill Total tokenB including fees
116
- * @param signature EIP-191 signature from buyer
117
- */
118
- struct MetadataDispatchOrder {
119
- uint256 nonce;
120
- address originExecutor;
121
- address tokenA;
122
- address tokenB;
123
- uint256 orderId;
124
- uint256 amountOfTokenBToFill;
125
- bytes signature;
126
- }
127
71
  }
@@ -46,4 +46,10 @@ library ProposalStructs {
46
46
  bool flag;
47
47
  uint256 timeToAccept;
48
48
  }
49
+
50
+ struct Bytes1TypeProposal {
51
+ bytes1 current;
52
+ bytes1 proposal;
53
+ uint256 timeToAccept;
54
+ }
49
55
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@evvm/testnet-contracts",
3
- "version": "3.0.1",
3
+ "version": "3.0.2",
4
4
  "type": "module",
5
5
  "description": "EVVM Testnet Contracts - Smart contracts and tools for scalable, modular, and cross-chain EVM virtualization",
6
6
  "files": [