@evvm/testnet-contracts 2.0.4 → 2.1.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
@@ -17,6 +17,7 @@ EVVM provides a complete ecosystem of smart contracts:
17
17
  - **Staking**: Token staking and rewards system
18
18
  - **Treasury**: Secure fund management inside the host chain or across chains
19
19
  - **Estimator**: Reward calculation and optimization
20
+ - **P2PSwap**: Peer-to-peer token exchange service with automated market making
20
21
 
21
22
  ## Use Cases
22
23
 
@@ -111,7 +112,8 @@ remappings = [
111
112
  │ │ ├── staking/Staking.sol # Staking mechanism
112
113
  │ │ ├── staking/Estimator.sol # Rewards estimation
113
114
  │ │ ├── treasury/Treasury.sol # Treasury management
114
- │ │ └── treasuryTwoChains/ # Cross-chain treasury contracts
115
+ │ │ ├── treasuryTwoChains/ # Cross-chain treasury contracts
116
+ │ │ └── p2pSwap/P2PSwap.sol # Peer-to-peer token exchange
115
117
  │ ├── interfaces/ # All contract interfaces
116
118
  │ └── lib/ # Utility libraries
117
119
  ```
@@ -149,6 +151,7 @@ contract MyDApp {
149
151
  - `contracts/staking/Staking.sol` - Token staking and rewards mechanism
150
152
  - `contracts/staking/Estimator.sol` - Staking rewards estimation and calculation
151
153
  - `contracts/treasury/Treasury.sol` - Manages deposits and withdrawals
154
+ - `contracts/p2pSwap/P2PSwap.sol` - Peer-to-peer decentralized token exchange service
152
155
 
153
156
  #### Cross-chain Treasury
154
157
  - `contracts/treasuryTwoChains/TreasuryHostChainStation.sol` - Host chain treasury management
@@ -163,11 +166,13 @@ All contracts have corresponding interfaces in the `interfaces/` directory:
163
166
  - `interfaces/ITreasury.sol`
164
167
  - `interfaces/ITreasuryHostChainStation.sol`
165
168
  - `interfaces/ITreasuryExternalChainStation.sol`
169
+ - `interfaces/IP2PSwap.sol`
166
170
 
167
171
  #### Utility Libraries
168
172
  - `lib/AdvancedStrings.sol` - Advanced string manipulation utilities
169
173
  - `lib/SignatureRecover.sol` - Signature recovery utilities
170
174
  - `lib/Erc191TestBuilder.sol` - ERC-191 signature testing utilities
175
+ - `lib/StakingServiceHooks.sol` - Simplified staking integration for service contracts
171
176
 
172
177
  ### Import Patterns
173
178
 
@@ -211,6 +216,7 @@ forge install hyperlane-xyz/hyperlane-monorepo # For cross-chain functionality
211
216
  - `src/contracts/nameService/` — NameService contracts for domain management
212
217
  - `src/contracts/staking/` — Staking and Estimator contracts
213
218
  - `src/contracts/treasury/` — Treasury contract for managing deposits and withdrawals
219
+ - `src/contracts/p2pSwap/` — P2P token exchange service contracts
214
220
  - `src/lib/` — Shared Solidity libraries (AdvancedStrings, SignatureRecover, etc.)
215
221
  - `script/` — Deployment and automation scripts (e.g., `DeployTestnet.s.sol`)
216
222
  - `lib/` — External dependencies (OpenZeppelin, Uniswap v3, forge-std)
@@ -355,12 +361,14 @@ make help # Show all available commands
355
361
  ```
356
362
 
357
363
  ## Contract Architecture
358
- The EVVM ecosystem consists of five main contracts:
364
+ The EVVM ecosystem consists of six main contracts:
359
365
  - **Evvm.sol**: Core virtual machine implementation
360
366
  - **NameService.sol**: Domain name resolution system
361
367
  - **Staking.sol**: Token staking and rewards mechanism
362
368
  - **Estimator.sol**: Staking rewards estimation and calculation
363
369
  - **Treasury.sol**: Manages deposits and withdrawals of ETH and ERC20 tokens
370
+ - **P2PSwap.sol**: Peer-to-peer decentralized exchange for token trading
371
+
364
372
 
365
373
  ## Configuration Files
366
374
  Key files for EVVM deployment: