@evvm/testnet-contracts 3.0.0 → 3.0.1

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  # EVVM Testnet Contracts
2
2
 
3
- ![Version](https://img.shields.io/badge/version-3.0.0%20%22Ichiban%22-red.svg)
3
+ ![Version](https://img.shields.io/badge/version-3.0.1%20%22Ichiban%22-red.svg)
4
4
  ![Solidity](https://img.shields.io/badge/Solidity-^0.8.0-363636?logo=solidity)
5
5
  ![Foundry](https://img.shields.io/badge/Built%20with-Foundry-FFDB1C?logo=foundry)
6
6
  ![TypeScript](https://img.shields.io/badge/TypeScript-5.0+-3178C6?logo=typescript)
@@ -688,17 +688,15 @@ contract Core is Storage {
688
688
  * - Canceling pending service operations
689
689
  * - Correcting accidental reservations
690
690
  * - Freeing nonces for different services
691
- *
692
- * @param user Address that reserved the nonce
693
691
  * @param nonce The async nonce to revoke reservation for
694
692
  */
695
- function revokeAsyncNonce(address user, uint256 nonce) external {
696
- if (asyncNonce[user][nonce]) revert Error.AsyncNonceAlreadyUsed();
693
+ function revokeAsyncNonce(uint256 nonce) external {
694
+ if (asyncNonce[msg.sender][nonce]) revert Error.AsyncNonceAlreadyUsed();
697
695
 
698
- if (asyncNonceReservedPointers[user][nonce] == address(0))
696
+ if (asyncNonceReservedPointers[msg.sender][nonce] == address(0))
699
697
  revert Error.AsyncNonceNotReserved();
700
698
 
701
- asyncNonceReservedPointers[user][nonce] = address(0);
699
+ asyncNonceReservedPointers[msg.sender][nonce] = address(0);
702
700
  }
703
701
 
704
702
  //░▒▓█ UserValidator Management Functions █████████████████████████████████████▓▒░
@@ -145,7 +145,7 @@ interface ICore {
145
145
  function rejectUpgrade() external;
146
146
  function removeAmountFromUser(address user, address token, uint256 amount) external;
147
147
  function reserveAsyncNonce(uint256 nonce, address serviceAddress) external;
148
- function revokeAsyncNonce(address user, uint256 nonce) external;
148
+ function revokeAsyncNonce(uint256 nonce) external;
149
149
  function setEvvmID(uint256 newEvvmID) external;
150
150
  function setPointStaker(address user, bytes1 answer) external;
151
151
  function validateAndConsumeNonce(
@@ -133,8 +133,6 @@ interface IP2PSwap {
133
133
  function rejectProposeOwner() external;
134
134
  function rejectProposePercentageFee() external;
135
135
  function rejectProposeWithdrawal() external;
136
- function reserveAsyncNonceToService(uint256 nonce) external;
137
- function revokeAsyncNonceToService(address user, uint256 nonce) external;
138
136
  function stake(uint256 amount) external;
139
137
  function unstake(uint256 amount) external;
140
138
  }
@@ -121,25 +121,6 @@ abstract contract CoreExecution {
121
121
  core.disperseCaPay(toData, token, amount);
122
122
  }
123
123
 
124
- /**
125
- * @notice Reserves async nonce for user and this service exclusively
126
- * @dev Calls core.reserveAsyncNonce(user, nonce, address(this)). Nonce can be revoked before use.
127
- * @param nonce Async nonce number to reserve
128
- */
129
- function reserveAsyncNonceToService(uint256 nonce) external {
130
- core.reserveAsyncNonce(nonce, address(this));
131
- }
132
-
133
- /**
134
- * @notice Revokes reserved async nonce before use
135
- * @dev Calls core.revokeAsyncNonce(user, nonce). Cannot revoke consumed nonces.
136
- * @param user User address that reserved nonce
137
- * @param nonce Async nonce number to revoke
138
- */
139
- function revokeAsyncNonceToService(address user, uint256 nonce) external {
140
- core.revokeAsyncNonce(user, nonce);
141
- }
142
-
143
124
  /**
144
125
  * @notice Gets next sequential sync nonce for user
145
126
  * @dev View function returning core.getNextCurrentSyncNonce(user). Auto-increments after each use.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@evvm/testnet-contracts",
3
- "version": "3.0.0",
3
+ "version": "3.0.1",
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": [