@evvm/testnet-contracts 3.0.1 → 3.0.3
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.
- package/README.md +2 -0
- package/contracts/core/Core.sol +323 -127
- package/contracts/core/lib/CoreStorage.sol +60 -24
- package/contracts/p2pSwap/P2PSwap.sol +183 -141
- package/library/EvvmService.sol +2 -2
- package/library/errors/CoreError.sol +25 -11
- package/library/structs/P2PSwapStructs.sol +1 -57
- package/library/utils/governance/ProposalStructs.sol +6 -0
- package/package.json +9 -9
|
@@ -61,23 +61,6 @@ abstract contract CoreStorage {
|
|
|
61
61
|
*/
|
|
62
62
|
address treasuryAddress;
|
|
63
63
|
|
|
64
|
-
//░▒▓█ Token Whitelist Proposal State ██████████████████████████████████████████████▓▒░
|
|
65
|
-
|
|
66
|
-
/**
|
|
67
|
-
* @notice Pending token address to be whitelisted.
|
|
68
|
-
*/
|
|
69
|
-
address whitelistTokenToBeAdded_address;
|
|
70
|
-
|
|
71
|
-
/**
|
|
72
|
-
* @notice Uniswap V3 (or similar) pool address used to verify liquidity for the pending token.
|
|
73
|
-
*/
|
|
74
|
-
address whitelistTokenToBeAdded_pool;
|
|
75
|
-
|
|
76
|
-
/**
|
|
77
|
-
* @notice Timestamp when the pending token whitelist proposal can be accepted.
|
|
78
|
-
*/
|
|
79
|
-
uint256 whitelistTokenToBeAdded_dateToSet;
|
|
80
|
-
|
|
81
64
|
//░▒▓█ Proxy Implementation State ██████████████████████████████████████████████████▓▒░
|
|
82
65
|
|
|
83
66
|
/**
|
|
@@ -96,6 +79,13 @@ abstract contract CoreStorage {
|
|
|
96
79
|
*/
|
|
97
80
|
uint256 timeToAcceptImplementation;
|
|
98
81
|
|
|
82
|
+
//░▒▓█ Total supply ██████████████████████████████████████████████████▓▒░
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* @notice Timestamp after which the maximum supply can be deleted.
|
|
86
|
+
*/
|
|
87
|
+
uint256 timeToDeleteMaxSupply;
|
|
88
|
+
|
|
99
89
|
//░▒▓█ EVVM Configuration State ████████████████████████████████████████████████████▓▒░
|
|
100
90
|
|
|
101
91
|
/**
|
|
@@ -103,6 +93,11 @@ abstract contract CoreStorage {
|
|
|
103
93
|
*/
|
|
104
94
|
uint256 windowTimeToChangeEvvmID;
|
|
105
95
|
|
|
96
|
+
/**
|
|
97
|
+
* @notice Current total supply of the principal token within the EVVM.
|
|
98
|
+
*/
|
|
99
|
+
uint256 currentSupply;
|
|
100
|
+
|
|
106
101
|
/**
|
|
107
102
|
* @notice Metadata configuration for this EVVM instance (ID, token info, rewards).
|
|
108
103
|
* @dev Crucial for EIP-191 signature verification to prevent replay attacks.
|
|
@@ -116,6 +111,29 @@ abstract contract CoreStorage {
|
|
|
116
111
|
*/
|
|
117
112
|
ProposalStructs.AddressTypeProposal admin;
|
|
118
113
|
|
|
114
|
+
//░▒▓█ Reward Distribution State ██████████████████████████████████████████████████████▓▒░
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* @notice This flag can be used to pause or resume the distribution of staking rewards
|
|
118
|
+
* if the 99.99% of the maximum supply has been reached. If true the distribution of rewards
|
|
119
|
+
* is active, if false the distribution of rewards is paused.
|
|
120
|
+
*
|
|
121
|
+
*/
|
|
122
|
+
ProposalStructs.BoolTypeProposal rewardFlowDistribution;
|
|
123
|
+
|
|
124
|
+
uint256 proposalChangeReward;
|
|
125
|
+
uint256 timeToAcceptChangeReward;
|
|
126
|
+
|
|
127
|
+
//░▒▓█ List state ████████████████████████████████████████████████████████▓▒░
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* @notice Indicates if the EVVM nees to check the allowlist or the denylist for token operations.
|
|
131
|
+
* @dev 0x00 = no lists active
|
|
132
|
+
* 0x01 = allowlist active
|
|
133
|
+
* 0x02 = denylist active
|
|
134
|
+
*/
|
|
135
|
+
ProposalStructs.Bytes1TypeProposal listStatus;
|
|
136
|
+
|
|
119
137
|
//░▒▓█ Initialization State ████████████████████████████████████████████████████████▓▒░
|
|
120
138
|
|
|
121
139
|
/**
|
|
@@ -138,13 +156,6 @@ abstract contract CoreStorage {
|
|
|
138
156
|
*/
|
|
139
157
|
mapping(address user => mapping(address token => uint256 quantity)) balances;
|
|
140
158
|
|
|
141
|
-
//░▒▓█ Fisher Bridge State ██████████████████████████████████████████████████████████▓▒░
|
|
142
|
-
|
|
143
|
-
/**
|
|
144
|
-
* @notice Nonce tracking for ordered Fisher Bridge cross-chain deposits.
|
|
145
|
-
*/
|
|
146
|
-
mapping(address user => uint256 nonce) nextFisherDepositNonce;
|
|
147
|
-
|
|
148
159
|
//░▒▓█ Nonce State ██████████████████████████████████████████████████████████▓▒░
|
|
149
160
|
|
|
150
161
|
/**
|
|
@@ -168,4 +179,29 @@ abstract contract CoreStorage {
|
|
|
168
179
|
* @notice tracks the next expected nonce for sequential (synchronous) transactions.
|
|
169
180
|
*/
|
|
170
181
|
mapping(address user => uint256 nonce) nextSyncNonce;
|
|
182
|
+
|
|
183
|
+
//░▒▓█ Token allowlist/denylist ██████████████████████████████████████████████████████████▓▒░
|
|
184
|
+
|
|
185
|
+
/**
|
|
186
|
+
* @notice Tracks what token addresses are denied for use in the EVVM
|
|
187
|
+
* if a token is in the denylist, it cannot:
|
|
188
|
+
* - be deposited to the EVVM
|
|
189
|
+
* - be used for execution payments (transfers between accounts/services)
|
|
190
|
+
* but it can:
|
|
191
|
+
* - be withdrawn from the EVVM (users can get their tokens out, but not back in)
|
|
192
|
+
* by default all the tokens are allowed until they are added to the
|
|
193
|
+
* denyList, if the denyList is active (listStatus = 0x02)
|
|
194
|
+
*/
|
|
195
|
+
mapping(address tokenAdress => bool isDenied) denyList;
|
|
196
|
+
|
|
197
|
+
/**
|
|
198
|
+
* @notice Tracks what token addresses are allowed for use in the EVVM
|
|
199
|
+
* if a token is in the allowList, it can:
|
|
200
|
+
* - be deposited to the EVVM
|
|
201
|
+
* - be used for execution payments (transfers between accounts/services)
|
|
202
|
+
* - can be withdrawn from the EVVM
|
|
203
|
+
* by default all the tokens are denied until they are added to the
|
|
204
|
+
* allowList, if the allowList is active (listStatus = 0x01)
|
|
205
|
+
*/
|
|
206
|
+
mapping(address tokenAdress => bool isAllowed) allowList;
|
|
171
207
|
}
|