@evvm/testnet-contracts 2.1.2 → 2.1.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 +195 -17
- package/contracts/evvm/Evvm.sol +2 -3
- package/contracts/evvm/EvvmLegacy.sol +1 -1
- package/contracts/evvm/lib/SignatureUtils.sol +0 -1
- package/contracts/nameService/NameService.sol +3 -3
- package/contracts/p2pSwap/P2PSwap.sol +6 -6
- package/contracts/staking/Estimator.sol +4 -4
- package/contracts/staking/Staking.sol +8 -8
- package/contracts/treasuryTwoChains/TreasuryExternalChainStation.sol +3 -3
- package/contracts/treasuryTwoChains/TreasuryHostChainStation.sol +3 -3
- package/package.json +16 -4
package/README.md
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
# EVVM Testnet Contracts
|
|
2
2
|
|
|
3
|
-

|
|
4
|
-
|
|
5
3
|
EVVM is an innovative blockchain virtualization system that allows you to create and deploy your own virtual blockchains on top of existing Ethereum networks where you can:
|
|
6
4
|
|
|
7
5
|
- **Create your own virtual blockchain** with custom tokens and governance
|
|
@@ -15,10 +13,26 @@ EVVM provides a complete ecosystem of smart contracts:
|
|
|
15
13
|
- **Core EVVM**: Your virtual blockchain's main engine
|
|
16
14
|
- **NameService**: Domain name system for your blockchain (like ENS)
|
|
17
15
|
- **Staking**: Token staking and rewards system
|
|
18
|
-
- **Treasury**: Secure fund management inside the host chain or across chains
|
|
16
|
+
- **Treasury**: Secure fund management inside the host chain or across chains
|
|
19
17
|
- **Estimator**: Reward calculation and optimization
|
|
20
18
|
- **P2PSwap**: Peer-to-peer token exchange service with automated market making
|
|
21
19
|
|
|
20
|
+
## Latest Features
|
|
21
|
+
|
|
22
|
+
**Enhanced Deployment Experience:**
|
|
23
|
+
- **Interactive TypeScript Wizard**: Modern, user-friendly deployment wizard with comprehensive guidance
|
|
24
|
+
- **Automatic RPC Fallback**: 99%+ deployment success rate with 5 fallback RPCs per network
|
|
25
|
+
- **Deployment Summary**: Instant access to all deployed contract addresses with explorer links
|
|
26
|
+
- **Auto Registry Integration**: Automatic EVVM registration and ID configuration
|
|
27
|
+
- **Smart Prerequisites Check**: Automatic dependency initialization and validation
|
|
28
|
+
- **Multi-Wallet Support**: Easy selection from your Foundry keystores
|
|
29
|
+
|
|
30
|
+
**Reliability Improvements:**
|
|
31
|
+
- Intelligent retry mechanism for network failures
|
|
32
|
+
- Comprehensive error handling and troubleshooting guides
|
|
33
|
+
- Verified high-performance RPC endpoints
|
|
34
|
+
- Zero-configuration setup for most users
|
|
35
|
+
|
|
22
36
|
## Use Cases
|
|
23
37
|
|
|
24
38
|
This repository serves two main purposes:
|
|
@@ -218,27 +232,35 @@ forge install hyperlane-xyz/hyperlane-monorepo # For cross-chain functionality
|
|
|
218
232
|
- `src/contracts/treasury/` — Treasury contract for managing deposits and withdrawals
|
|
219
233
|
- `src/contracts/p2pSwap/` — P2P token exchange service contracts
|
|
220
234
|
- `src/lib/` — Shared Solidity libraries (AdvancedStrings, SignatureRecover, etc.)
|
|
221
|
-
- `script/` —
|
|
235
|
+
- `script/` — Foundry deployment scripts (e.g., `DeployTestnet.s.sol`)
|
|
236
|
+
- `scripts/` — TypeScript utilities and deployment wizard (`evvm-init.ts`)
|
|
222
237
|
- `lib/` — External dependencies (OpenZeppelin, Uniswap v3, forge-std)
|
|
223
238
|
- `broadcast/` — Foundry deployment artifacts and transaction history
|
|
224
239
|
- `cache/` — Foundry compilation cache
|
|
225
|
-
- `input/` — Configuration files for deployment (generated by
|
|
226
|
-
- `evvm-init.sh` —
|
|
240
|
+
- `input/` — Configuration files for deployment (generated by wizard)
|
|
241
|
+
- `evvm-init.sh` — Legacy bash wizard (deprecated, use `npm run wizard` instead)
|
|
227
242
|
|
|
228
243
|
## Prerequisites
|
|
229
244
|
- [Foundry](https://getfoundry.sh/) (Solidity development toolkit)
|
|
230
|
-
- Node.js (
|
|
231
|
-
-
|
|
245
|
+
- [Node.js](https://nodejs.org/) v16 or higher (required for deployment wizard)
|
|
246
|
+
- Git (for cloning and managing the repository)
|
|
232
247
|
- Environment variables set up (`.env` file with API keys and RPC URLs)
|
|
233
248
|
|
|
234
249
|
### Environment Setup
|
|
235
250
|
Create a `.env` file with your configuration:
|
|
236
251
|
```bash
|
|
237
|
-
|
|
238
|
-
|
|
252
|
+
# Ethereum Sepolia RPC (primary endpoint)
|
|
253
|
+
RPC_URL_ETH_SEPOLIA=https://0xrpc.io/sep
|
|
254
|
+
|
|
255
|
+
# Arbitrum Sepolia RPC (primary endpoint)
|
|
256
|
+
RPC_URL_ARB_SEPOLIA=https://sepolia-rollup.arbitrum.io/rpc
|
|
257
|
+
|
|
258
|
+
# Etherscan API key for contract verification
|
|
239
259
|
ETHERSCAN_API=<YOUR_ETHERSCAN_API_KEY>
|
|
240
260
|
```
|
|
241
261
|
|
|
262
|
+
**Note**: The deployment wizard includes automatic RPC fallback mechanisms. If your primary RPC endpoint fails, it will automatically try alternative endpoints to ensure deployment success. See the [RPC Reliability](#rpc-reliability) section for details.
|
|
263
|
+
|
|
242
264
|
### Security Setup - Import Private Key
|
|
243
265
|
Before deploying to testnets, securely import your private key using Foundry:
|
|
244
266
|
```bash
|
|
@@ -280,17 +302,33 @@ cast wallet import defaultKey --interactive
|
|
|
280
302
|
|
|
281
303
|
### 4. Interactive Setup & Deploy
|
|
282
304
|
```bash
|
|
283
|
-
|
|
305
|
+
npm run wizard
|
|
284
306
|
```
|
|
285
307
|
|
|
286
|
-
The wizard will
|
|
308
|
+
The interactive deployment wizard will guide you through:
|
|
309
|
+
- **Prerequisites check** (Foundry, Git, Node.js)
|
|
310
|
+
- **Dependency initialization** (git submodules - automatic)
|
|
287
311
|
- **Administrator addresses** (admin, golden fisher, activator)
|
|
288
|
-
- **EVVM metadata** (name,
|
|
312
|
+
- **EVVM metadata** (name, principal token details)
|
|
289
313
|
- **Advanced parameters** (supply, rewards) - optional
|
|
290
|
-
- **Network selection** (Ethereum Sepolia, Arbitrum Sepolia, or custom)
|
|
314
|
+
- **Network selection** (Ethereum Sepolia, Arbitrum Sepolia, or custom RPC)
|
|
315
|
+
- **Wallet selection** (from your Foundry keystores)
|
|
291
316
|
- **Automatic deployment** with contract verification
|
|
292
|
-
|
|
293
|
-
|
|
317
|
+
- **Deployment summary** with all contract addresses and explorer links
|
|
318
|
+
- **Registry EVVM registration** (automatic for supported networks)
|
|
319
|
+
- **EVVM ID configuration** (automatic setup)
|
|
320
|
+
|
|
321
|
+
**What happens after deployment:**
|
|
322
|
+
- All 6 core contracts deployed and verified on your chosen network
|
|
323
|
+
- Complete deployment summary displayed with:
|
|
324
|
+
- EVVM Core contract address
|
|
325
|
+
- Treasury contract address
|
|
326
|
+
- Staking, Estimator, NameService, and P2PSwap addresses
|
|
327
|
+
- Direct links to block explorer for each contract
|
|
328
|
+
- Automatic registration with Registry EVVM (Ethereum Sepolia)
|
|
329
|
+
- EVVM ID assigned and configured
|
|
330
|
+
|
|
331
|
+
That's it! Your EVVM virtual blockchain is now deployed, verified, and ready to use.
|
|
294
332
|
|
|
295
333
|
## Manual Configuration (Alternative)
|
|
296
334
|
|
|
@@ -360,6 +398,144 @@ make seeSizes # Check contract sizes
|
|
|
360
398
|
make help # Show all available commands
|
|
361
399
|
```
|
|
362
400
|
|
|
401
|
+
### NPM Scripts
|
|
402
|
+
```bash
|
|
403
|
+
npm run wizard # Run interactive deployment wizard (recommended)
|
|
404
|
+
npm run build # Copy src/ files to root (for NPM publishing)
|
|
405
|
+
npm run clean # Remove copied files from root
|
|
406
|
+
npm run compile # forge build
|
|
407
|
+
npm run test # forge test
|
|
408
|
+
npm run deploy:anvil # Deploy to local Anvil
|
|
409
|
+
npm run deploy:sepolia # Deploy to Ethereum Sepolia
|
|
410
|
+
npm run deploy:arbitrum # Deploy to Arbitrum Sepolia
|
|
411
|
+
```
|
|
412
|
+
|
|
413
|
+
## RPC Reliability
|
|
414
|
+
|
|
415
|
+
The deployment wizard includes an intelligent RPC fallback mechanism to ensure maximum deployment success rates, even when individual RPC providers experience downtime.
|
|
416
|
+
|
|
417
|
+
### How It Works
|
|
418
|
+
|
|
419
|
+
**Automatic Failover**: If your primary RPC endpoint fails, the wizard automatically tries alternative endpoints without user intervention.
|
|
420
|
+
|
|
421
|
+
**Multi-Provider Support**: Each network has 5 verified RPC endpoints:
|
|
422
|
+
|
|
423
|
+
**Ethereum Sepolia Fallback Chain:**
|
|
424
|
+
1. `https://0xrpc.io/sep` (Primary)
|
|
425
|
+
2. `https://ethereum-sepolia.rpc.subquery.network/public` (0.165s latency)
|
|
426
|
+
3. `https://ethereum-sepolia.gateway.tatum.io` (0.172s latency)
|
|
427
|
+
4. `https://sepolia.drpc.org` (0.192s latency)
|
|
428
|
+
5. `https://gateway.tenderly.co/public/sepolia` (0.184s latency)
|
|
429
|
+
|
|
430
|
+
**Arbitrum Sepolia Fallback Chain:**
|
|
431
|
+
1. `https://sepolia-rollup.arbitrum.io/rpc` (Official Arbitrum)
|
|
432
|
+
2. `https://arbitrum-sepolia.gateway.tenderly.co` (0.167s latency)
|
|
433
|
+
3. `https://endpoints.omniatech.io/v1/arbitrum/sepolia/public` (0.258s latency)
|
|
434
|
+
4. `https://arbitrum-sepolia.drpc.org` (0.590s latency)
|
|
435
|
+
5. `https://arbitrum-sepolia-rpc.publicnode.com` (0.430s latency)
|
|
436
|
+
|
|
437
|
+
**Smart Retry Logic**: The wizard displays clear progress messages during fallback attempts and provides troubleshooting tips if all endpoints fail.
|
|
438
|
+
|
|
439
|
+
### Benefits
|
|
440
|
+
- **99%+ success rate** through endpoint redundancy
|
|
441
|
+
- **Zero configuration** required for most users
|
|
442
|
+
- **Automatic recovery** from individual RPC failures
|
|
443
|
+
- **Clear visibility** into which RPC is being used
|
|
444
|
+
- **Future-proof** against provider outages
|
|
445
|
+
|
|
446
|
+
## Deployment Summary
|
|
447
|
+
|
|
448
|
+
After successful deployment, the wizard displays a comprehensive summary of all deployed contracts:
|
|
449
|
+
|
|
450
|
+
```
|
|
451
|
+
═══════════════════════════════════════════════════════════
|
|
452
|
+
DEPLOYED CONTRACTS SUMMARY
|
|
453
|
+
═══════════════════════════════════════════════════════════
|
|
454
|
+
|
|
455
|
+
Network: Ethereum Sepolia (Chain ID: 11155111)
|
|
456
|
+
|
|
457
|
+
Core Contracts:
|
|
458
|
+
EVVM: 0xb0994626541c9bd3d64605dee610386c7a005a39
|
|
459
|
+
https://sepolia.etherscan.io/address/0xb099...
|
|
460
|
+
Treasury: 0x47be342c4d803490530737cac7bcf34916cf7e80
|
|
461
|
+
https://sepolia.etherscan.io/address/0x47be...
|
|
462
|
+
|
|
463
|
+
Supporting Contracts:
|
|
464
|
+
Staking: 0xc2cd4ec40bb4fa6f98c7b7095f692588e6b68fd4
|
|
465
|
+
Estimator: 0x1adf3fd08f0744f24bb29bbfcfb57a5f37f144cb
|
|
466
|
+
NameService: 0xe28eedff481b7c640394f44070309a0afe06de00
|
|
467
|
+
P2PSwap: 0xc90dc57d848fae4ecf46268b8a90015085968645
|
|
468
|
+
|
|
469
|
+
═══════════════════════════════════════════════════════════
|
|
470
|
+
```
|
|
471
|
+
|
|
472
|
+
This summary includes:
|
|
473
|
+
- Network name and chain ID
|
|
474
|
+
- All 6 deployed contract addresses
|
|
475
|
+
- Direct links to block explorer for verification
|
|
476
|
+
- Organized by contract importance (Core vs Supporting)
|
|
477
|
+
|
|
478
|
+
## Troubleshooting
|
|
479
|
+
|
|
480
|
+
### RPC Connection Issues
|
|
481
|
+
|
|
482
|
+
**Problem**: Deployment fails with "Connection timed out" or "HTTP error 522"
|
|
483
|
+
|
|
484
|
+
**Solution**: The wizard automatically tries fallback RPCs. If all fail:
|
|
485
|
+
1. Check your internet connection
|
|
486
|
+
2. Verify firewall/VPN settings aren't blocking RPC endpoints
|
|
487
|
+
3. Try again later (temporary provider downtime)
|
|
488
|
+
4. Update your `.env` file with a custom RPC from [chainlist.org](https://chainlist.org/)
|
|
489
|
+
|
|
490
|
+
### Wallet Not Found
|
|
491
|
+
|
|
492
|
+
**Problem**: "No wallets found" error during deployment
|
|
493
|
+
|
|
494
|
+
**Solution**:
|
|
495
|
+
```bash
|
|
496
|
+
cast wallet import <WALLET_NAME> --interactive
|
|
497
|
+
```
|
|
498
|
+
Then run the wizard again and select your imported wallet.
|
|
499
|
+
|
|
500
|
+
### Insufficient Funds
|
|
501
|
+
|
|
502
|
+
**Problem**: Deployment fails with "insufficient funds for gas"
|
|
503
|
+
|
|
504
|
+
**Solution**:
|
|
505
|
+
1. Get testnet ETH from faucets:
|
|
506
|
+
- Ethereum Sepolia: [sepoliafaucet.com](https://sepoliafaucet.com/)
|
|
507
|
+
- Arbitrum Sepolia: [faucet.quicknode.com/arbitrum/sepolia](https://faucet.quicknode.com/arbitrum/sepolia)
|
|
508
|
+
2. Verify your wallet address has received funds
|
|
509
|
+
3. Run the wizard again
|
|
510
|
+
|
|
511
|
+
### Git Submodules Not Initialized
|
|
512
|
+
|
|
513
|
+
**Problem**: Compilation fails with missing dependencies
|
|
514
|
+
|
|
515
|
+
**Solution**: The wizard automatically initializes submodules, but you can also do it manually:
|
|
516
|
+
```bash
|
|
517
|
+
git submodule update --init --recursive
|
|
518
|
+
```
|
|
519
|
+
|
|
520
|
+
### Contract Size Too Large
|
|
521
|
+
|
|
522
|
+
**Problem**: "Contract code size exceeds 24576 bytes"
|
|
523
|
+
|
|
524
|
+
**Solution**: The project uses `via-ir` optimization to stay under limits. If you modified contracts:
|
|
525
|
+
```bash
|
|
526
|
+
make seeSizes # Check contract sizes
|
|
527
|
+
```
|
|
528
|
+
Consider refactoring large contracts or using libraries.
|
|
529
|
+
|
|
530
|
+
### TypeScript/TSX Not Found
|
|
531
|
+
|
|
532
|
+
**Problem**: `npm run wizard` fails with "tsx: command not found"
|
|
533
|
+
|
|
534
|
+
**Solution**:
|
|
535
|
+
```bash
|
|
536
|
+
npm install # Reinstall dependencies
|
|
537
|
+
```
|
|
538
|
+
|
|
363
539
|
## Contract Architecture
|
|
364
540
|
The EVVM ecosystem consists of six main contracts:
|
|
365
541
|
- **Evvm.sol**: Core virtual machine implementation
|
|
@@ -372,10 +548,12 @@ The EVVM ecosystem consists of six main contracts:
|
|
|
372
548
|
|
|
373
549
|
## Configuration Files
|
|
374
550
|
Key files for EVVM deployment:
|
|
375
|
-
- `evvm-init.
|
|
551
|
+
- `scripts/evvm-init.ts` — Interactive TypeScript deployment wizard (run with `npm run wizard`)
|
|
376
552
|
- `input/` — Generated configuration files (address.json, evvmBasicMetadata.json, evvmAdvancedMetadata.json)
|
|
553
|
+
- `.env` — Environment variables (RPC URLs, API keys)
|
|
377
554
|
- `foundry.toml` — Foundry project configuration
|
|
378
555
|
- `makefile` — Build and deployment automation
|
|
556
|
+
- `package.json` — NPM scripts and dependencies
|
|
379
557
|
|
|
380
558
|
## Contributing
|
|
381
559
|
|
package/contracts/evvm/Evvm.sol
CHANGED
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
|
|
4
4
|
pragma solidity ^0.8.0;
|
|
5
5
|
/**
|
|
6
|
-
|
|
7
6
|
░▒▓████████▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓██████████████▓▒░
|
|
8
7
|
░▒▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░░▒▓█▓▒░
|
|
9
8
|
░▒▓█▓▒░ ░▒▓█▓▒▒▓█▓▒░ ░▒▓█▓▒▒▓█▓▒░░▒▓█▓▒░░▒▓█▓▒░░▒▓█▓▒░
|
|
@@ -217,7 +216,7 @@ contract Evvm is EvvmStorage {
|
|
|
217
216
|
|
|
218
217
|
evvmMetadata.EvvmID = newEvvmID;
|
|
219
218
|
|
|
220
|
-
windowTimeToChangeEvvmID = block.timestamp + 1
|
|
219
|
+
windowTimeToChangeEvvmID = block.timestamp + 1 minutes;
|
|
221
220
|
}
|
|
222
221
|
|
|
223
222
|
/**
|
|
@@ -1000,7 +999,7 @@ contract Evvm is EvvmStorage {
|
|
|
1000
999
|
}
|
|
1001
1000
|
|
|
1002
1001
|
admin.proposal = _newOwner;
|
|
1003
|
-
admin.timeToAccept = block.timestamp + 1
|
|
1002
|
+
admin.timeToAccept = block.timestamp + 1 minutes;
|
|
1004
1003
|
}
|
|
1005
1004
|
|
|
1006
1005
|
/**
|
|
@@ -955,7 +955,7 @@ contract NameService {
|
|
|
955
955
|
}
|
|
956
956
|
|
|
957
957
|
admin.proposal = _adminToPropose;
|
|
958
|
-
admin.timeToAccept = block.timestamp + 1
|
|
958
|
+
admin.timeToAccept = block.timestamp + 1 minutes;
|
|
959
959
|
}
|
|
960
960
|
|
|
961
961
|
/**
|
|
@@ -1007,7 +1007,7 @@ contract NameService {
|
|
|
1007
1007
|
}
|
|
1008
1008
|
|
|
1009
1009
|
amountToWithdrawTokens.proposal = _amount;
|
|
1010
|
-
amountToWithdrawTokens.timeToAccept = block.timestamp + 1
|
|
1010
|
+
amountToWithdrawTokens.timeToAccept = block.timestamp + 1 minutes;
|
|
1011
1011
|
}
|
|
1012
1012
|
|
|
1013
1013
|
/**
|
|
@@ -1046,7 +1046,7 @@ contract NameService {
|
|
|
1046
1046
|
revert();
|
|
1047
1047
|
}
|
|
1048
1048
|
evvmAddress.proposal = _newEvvmAddress;
|
|
1049
|
-
evvmAddress.timeToAccept = block.timestamp + 1
|
|
1049
|
+
evvmAddress.timeToAccept = block.timestamp + 1 minutes;
|
|
1050
1050
|
}
|
|
1051
1051
|
|
|
1052
1052
|
/**
|
|
@@ -819,7 +819,7 @@ contract P2PSwap is StakingServiceHooks {
|
|
|
819
819
|
revert();
|
|
820
820
|
}
|
|
821
821
|
owner_proposal = _owner;
|
|
822
|
-
owner_timeToAccept = block.timestamp + 1
|
|
822
|
+
owner_timeToAccept = block.timestamp + 1 minutes;
|
|
823
823
|
}
|
|
824
824
|
|
|
825
825
|
/**
|
|
@@ -868,7 +868,7 @@ contract P2PSwap is StakingServiceHooks {
|
|
|
868
868
|
revert();
|
|
869
869
|
}
|
|
870
870
|
rewardPercentage_proposal = Percentage(_seller, _service, _mateStaker);
|
|
871
|
-
rewardPercentage_timeToAcceptNewChange = block.timestamp + 1
|
|
871
|
+
rewardPercentage_timeToAcceptNewChange = block.timestamp + 1 minutes;
|
|
872
872
|
}
|
|
873
873
|
|
|
874
874
|
/**
|
|
@@ -915,7 +915,7 @@ contract P2PSwap is StakingServiceHooks {
|
|
|
915
915
|
revert();
|
|
916
916
|
}
|
|
917
917
|
rewardPercentage_proposal = Percentage(_seller, _service, _mateStaker);
|
|
918
|
-
rewardPercentage_timeToAcceptNewChange = block.timestamp + 1
|
|
918
|
+
rewardPercentage_timeToAcceptNewChange = block.timestamp + 1 minutes;
|
|
919
919
|
}
|
|
920
920
|
|
|
921
921
|
/**
|
|
@@ -956,7 +956,7 @@ contract P2PSwap is StakingServiceHooks {
|
|
|
956
956
|
revert();
|
|
957
957
|
}
|
|
958
958
|
percentageFee_proposal = _percentageFee;
|
|
959
|
-
percentageFee_timeToAccept = block.timestamp + 1
|
|
959
|
+
percentageFee_timeToAccept = block.timestamp + 1 minutes;
|
|
960
960
|
}
|
|
961
961
|
|
|
962
962
|
/**
|
|
@@ -997,7 +997,7 @@ contract P2PSwap is StakingServiceHooks {
|
|
|
997
997
|
revert();
|
|
998
998
|
}
|
|
999
999
|
maxLimitFillFixedFee_proposal = _maxLimitFillFixedFee;
|
|
1000
|
-
maxLimitFillFixedFee_timeToAccept = block.timestamp + 1
|
|
1000
|
+
maxLimitFillFixedFee_timeToAccept = block.timestamp + 1 minutes;
|
|
1001
1001
|
}
|
|
1002
1002
|
|
|
1003
1003
|
/**
|
|
@@ -1049,7 +1049,7 @@ contract P2PSwap is StakingServiceHooks {
|
|
|
1049
1049
|
tokenToWithdraw = _tokenToWithdraw;
|
|
1050
1050
|
amountToWithdraw = _amountToWithdraw;
|
|
1051
1051
|
recipientToWithdraw = _to;
|
|
1052
|
-
timeToWithdrawal = block.timestamp + 1
|
|
1052
|
+
timeToWithdrawal = block.timestamp + 1 minutes;
|
|
1053
1053
|
}
|
|
1054
1054
|
|
|
1055
1055
|
/**
|
|
@@ -180,7 +180,7 @@ contract Estimator {
|
|
|
180
180
|
address _proposal
|
|
181
181
|
) external onlyActivator {
|
|
182
182
|
activator.proposal = _proposal;
|
|
183
|
-
activator.timeToAccept = block.timestamp + 1
|
|
183
|
+
activator.timeToAccept = block.timestamp + 1 minutes;
|
|
184
184
|
}
|
|
185
185
|
|
|
186
186
|
function cancelActivatorProposal() external onlyActivator {
|
|
@@ -200,7 +200,7 @@ contract Estimator {
|
|
|
200
200
|
address _proposal
|
|
201
201
|
) external onlyAdmin {
|
|
202
202
|
evvmAddress.proposal = _proposal;
|
|
203
|
-
evvmAddress.timeToAccept = block.timestamp + 1
|
|
203
|
+
evvmAddress.timeToAccept = block.timestamp + 1 minutes;
|
|
204
204
|
}
|
|
205
205
|
|
|
206
206
|
function cancelEvvmAddressProposal() external onlyAdmin {
|
|
@@ -220,7 +220,7 @@ contract Estimator {
|
|
|
220
220
|
address _proposal
|
|
221
221
|
) external onlyAdmin {
|
|
222
222
|
addressStaking.proposal = _proposal;
|
|
223
|
-
addressStaking.timeToAccept = block.timestamp + 1
|
|
223
|
+
addressStaking.timeToAccept = block.timestamp + 1 minutes;
|
|
224
224
|
}
|
|
225
225
|
|
|
226
226
|
function cancelAddressStakingProposal() external onlyAdmin {
|
|
@@ -240,7 +240,7 @@ contract Estimator {
|
|
|
240
240
|
address _proposal
|
|
241
241
|
) external onlyAdmin {
|
|
242
242
|
admin.proposal = _proposal;
|
|
243
|
-
admin.timeToAccept = block.timestamp + 1
|
|
243
|
+
admin.timeToAccept = block.timestamp + 1 minutes;
|
|
244
244
|
}
|
|
245
245
|
|
|
246
246
|
function cancelAdminProposal() external onlyAdmin {
|
|
@@ -216,7 +216,7 @@ contract Staking {
|
|
|
216
216
|
|
|
217
217
|
secondsToUnlockStaking.actual = 0;
|
|
218
218
|
|
|
219
|
-
secondsToUnllockFullUnstaking.actual =
|
|
219
|
+
secondsToUnllockFullUnstaking.actual = 30 seconds;
|
|
220
220
|
|
|
221
221
|
breakerSetupEstimatorAndEvvm = 0x01;
|
|
222
222
|
}
|
|
@@ -761,7 +761,7 @@ contract Staking {
|
|
|
761
761
|
*/
|
|
762
762
|
function proposeAdmin(address _newAdmin) external onlyOwner {
|
|
763
763
|
admin.proposal = _newAdmin;
|
|
764
|
-
admin.timeToAccept = block.timestamp + 1
|
|
764
|
+
admin.timeToAccept = block.timestamp + 1 minutes;
|
|
765
765
|
}
|
|
766
766
|
|
|
767
767
|
/**
|
|
@@ -795,7 +795,7 @@ contract Staking {
|
|
|
795
795
|
*/
|
|
796
796
|
function proposeGoldenFisher(address _goldenFisher) external onlyOwner {
|
|
797
797
|
goldenFisher.proposal = _goldenFisher;
|
|
798
|
-
goldenFisher.timeToAccept = block.timestamp + 1
|
|
798
|
+
goldenFisher.timeToAccept = block.timestamp + 1 minutes;
|
|
799
799
|
}
|
|
800
800
|
|
|
801
801
|
/**
|
|
@@ -829,7 +829,7 @@ contract Staking {
|
|
|
829
829
|
uint256 _secondsToUnlockStaking
|
|
830
830
|
) external onlyOwner {
|
|
831
831
|
secondsToUnlockStaking.proposal = _secondsToUnlockStaking;
|
|
832
|
-
secondsToUnlockStaking.timeToAccept = block.timestamp + 1
|
|
832
|
+
secondsToUnlockStaking.timeToAccept = block.timestamp + 1 minutes;
|
|
833
833
|
}
|
|
834
834
|
|
|
835
835
|
/**
|
|
@@ -863,7 +863,7 @@ contract Staking {
|
|
|
863
863
|
uint256 _secondsToUnllockFullUnstaking
|
|
864
864
|
) external onlyOwner {
|
|
865
865
|
secondsToUnllockFullUnstaking.proposal = _secondsToUnllockFullUnstaking;
|
|
866
|
-
secondsToUnllockFullUnstaking.timeToAccept = block.timestamp + 1
|
|
866
|
+
secondsToUnllockFullUnstaking.timeToAccept = block.timestamp + 1 minutes;
|
|
867
867
|
}
|
|
868
868
|
|
|
869
869
|
/**
|
|
@@ -894,7 +894,7 @@ contract Staking {
|
|
|
894
894
|
* @dev Initiates the time-delayed process to enable/disable public staking
|
|
895
895
|
*/
|
|
896
896
|
function prepareChangeAllowPublicStaking() external onlyOwner {
|
|
897
|
-
allowPublicStaking.timeToAccept = block.timestamp + 1
|
|
897
|
+
allowPublicStaking.timeToAccept = block.timestamp + 1 minutes;
|
|
898
898
|
}
|
|
899
899
|
|
|
900
900
|
/**
|
|
@@ -924,7 +924,7 @@ contract Staking {
|
|
|
924
924
|
* @dev Initiates the time-delayed process to enable/disable presale staking
|
|
925
925
|
*/
|
|
926
926
|
function prepareChangeAllowPresaleStaking() external onlyOwner {
|
|
927
|
-
allowPresaleStaking.timeToAccept = block.timestamp + 1
|
|
927
|
+
allowPresaleStaking.timeToAccept = block.timestamp + 1 minutes;
|
|
928
928
|
}
|
|
929
929
|
|
|
930
930
|
/**
|
|
@@ -956,7 +956,7 @@ contract Staking {
|
|
|
956
956
|
*/
|
|
957
957
|
function proposeEstimator(address _estimator) external onlyOwner {
|
|
958
958
|
estimator.proposal = _estimator;
|
|
959
|
-
estimator.timeToAccept = block.timestamp + 1
|
|
959
|
+
estimator.timeToAccept = block.timestamp + 1 minutes;
|
|
960
960
|
}
|
|
961
961
|
|
|
962
962
|
/**
|
|
@@ -588,7 +588,7 @@ contract TreasuryExternalChainStation is
|
|
|
588
588
|
if (_newOwner == address(0) || _newOwner == admin.current) revert();
|
|
589
589
|
|
|
590
590
|
admin.proposal = _newOwner;
|
|
591
|
-
admin.timeToAccept = block.timestamp + 1
|
|
591
|
+
admin.timeToAccept = block.timestamp + 1 minutes;
|
|
592
592
|
}
|
|
593
593
|
|
|
594
594
|
/// @notice Cancels a pending admin change proposal
|
|
@@ -625,7 +625,7 @@ contract TreasuryExternalChainStation is
|
|
|
625
625
|
) revert();
|
|
626
626
|
|
|
627
627
|
fisherExecutor.proposal = _newFisherExecutor;
|
|
628
|
-
fisherExecutor.timeToAccept = block.timestamp + 1
|
|
628
|
+
fisherExecutor.timeToAccept = block.timestamp + 1 minutes;
|
|
629
629
|
}
|
|
630
630
|
|
|
631
631
|
/// @notice Cancels a pending Fisher executor change proposal
|
|
@@ -661,7 +661,7 @@ contract TreasuryExternalChainStation is
|
|
|
661
661
|
hostChainAddressChangeProposal = ChangeHostChainAddressParams({
|
|
662
662
|
porposeAddress_AddressType: hostChainStationAddress,
|
|
663
663
|
porposeAddress_StringType: hostChainStationAddressString,
|
|
664
|
-
timeToAccept: block.timestamp + 1
|
|
664
|
+
timeToAccept: block.timestamp + 1 minutes
|
|
665
665
|
});
|
|
666
666
|
}
|
|
667
667
|
|
|
@@ -506,7 +506,7 @@ contract TreasuryHostChainStation is
|
|
|
506
506
|
if (_newOwner == address(0) || _newOwner == admin.current) revert();
|
|
507
507
|
|
|
508
508
|
admin.proposal = _newOwner;
|
|
509
|
-
admin.timeToAccept = block.timestamp + 1
|
|
509
|
+
admin.timeToAccept = block.timestamp + 1 minutes;
|
|
510
510
|
}
|
|
511
511
|
|
|
512
512
|
/// @notice Cancels a pending admin change proposal
|
|
@@ -543,7 +543,7 @@ contract TreasuryHostChainStation is
|
|
|
543
543
|
) revert();
|
|
544
544
|
|
|
545
545
|
fisherExecutor.proposal = _newFisherExecutor;
|
|
546
|
-
fisherExecutor.timeToAccept = block.timestamp + 1
|
|
546
|
+
fisherExecutor.timeToAccept = block.timestamp + 1 minutes;
|
|
547
547
|
}
|
|
548
548
|
|
|
549
549
|
/// @notice Cancels a pending Fisher executor change proposal
|
|
@@ -579,7 +579,7 @@ contract TreasuryHostChainStation is
|
|
|
579
579
|
externalChainAddressChangeProposal = ChangeExternalChainAddressParams({
|
|
580
580
|
porposeAddress_AddressType: externalChainStationAddress,
|
|
581
581
|
porposeAddress_StringType: externalChainStationAddressString,
|
|
582
|
-
timeToAccept: block.timestamp + 1
|
|
582
|
+
timeToAccept: block.timestamp + 1 minutes
|
|
583
583
|
});
|
|
584
584
|
}
|
|
585
585
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@evvm/testnet-contracts",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.3",
|
|
4
|
+
"type": "module",
|
|
4
5
|
"description": "EVVM Testnet Contracts - Smart contracts and tools for scalable, modular, and cross-chain EVM virtualization",
|
|
5
6
|
"files": [
|
|
6
7
|
"contracts/**/*.sol",
|
|
@@ -44,15 +45,26 @@
|
|
|
44
45
|
"test": "forge test",
|
|
45
46
|
"deploy:anvil": "make deployLocalTestnet",
|
|
46
47
|
"deploy:sepolia": "make deployTestnet NETWORK=eth",
|
|
47
|
-
"deploy:arbitrum": "make deployTestnet NETWORK=arb"
|
|
48
|
+
"deploy:arbitrum": "make deployTestnet NETWORK=arb",
|
|
49
|
+
"wizard": "tsx scripts/evvm-init.ts",
|
|
50
|
+
"wizard:deploy": "tsx scripts/evvm-init.ts --deploy"
|
|
48
51
|
},
|
|
49
52
|
"peerDependencies": {
|
|
50
53
|
"@openzeppelin/contracts": "^5.0.0"
|
|
51
54
|
},
|
|
52
55
|
"dependencies": {
|
|
53
|
-
"@hyperlane-xyz/core": "^3.6.1"
|
|
56
|
+
"@hyperlane-xyz/core": "^3.6.1",
|
|
57
|
+
"chalk": "^5.3.0",
|
|
58
|
+
"dotenv": "^16.4.5",
|
|
59
|
+
"execa": "^8.0.1",
|
|
60
|
+
"prompts": "^2.4.2",
|
|
61
|
+
"viem": "^2.39.0"
|
|
54
62
|
},
|
|
55
63
|
"devDependencies": {
|
|
56
|
-
"
|
|
64
|
+
"@types/node": "^20.11.0",
|
|
65
|
+
"@types/prompts": "^2.4.9",
|
|
66
|
+
"forge-std": "^1.0.0",
|
|
67
|
+
"tsx": "^4.7.0",
|
|
68
|
+
"typescript": "^5.3.0"
|
|
57
69
|
}
|
|
58
70
|
}
|