- Introduced Aggregator.sol for Chainlink-compatible oracle functionality, including round-based updates and access control. - Added OracleWithCCIP.sol to extend Aggregator with CCIP cross-chain messaging capabilities. - Created .gitmodules to include OpenZeppelin contracts as a submodule. - Developed a comprehensive deployment guide in NEXT_STEPS_COMPLETE_GUIDE.md for Phase 2 and smart contract deployment. - Implemented Vite configuration for the orchestration portal, supporting both Vue and React frameworks. - Added server-side logic for the Multi-Cloud Orchestration Portal, including API endpoints for environment management and monitoring. - Created scripts for resource import and usage validation across non-US regions. - Added tests for CCIP error handling and integration to ensure robust functionality. - Included various new files and directories for the orchestration portal and deployment scripts.
6.0 KiB
Admin Address Options
Date: 2025-12-11 Status: Updated - Defender No Longer Available
⚠️ Important Update
OpenZeppelin Defender is no longer offered. The deployment scripts have been updated to use direct admin addresses instead.
🔐 Admin Address Options
Option 1: Multisig Wallet (Recommended)
Best for: Production deployments requiring multiple approvals
Options:
-
Gnosis Safe: https://gnosis-safe.io/
- Most popular multisig solution
- Supports multiple chains
- Web interface for managing transactions
- Configurable threshold (e.g., 2-of-3, 3-of-5)
-
Safe (formerly Gnosis Safe): https://safe.global/
- Updated branding, same functionality
- Enhanced security features
- Mobile app support
Setup:
- Create a Safe wallet on Ethereum Mainnet
- Add signers (e.g., 3-5 trusted addresses)
- Set threshold (e.g., 2-of-3)
- Copy the Safe address
- Set in
.env:TETHER_ADMIN=<safe_wallet_address> MIRROR_ADMIN=<safe_wallet_address> # Can be same or different
Benefits:
- ✅ Multiple approvals required
- ✅ Enhanced security
- ✅ Audit trail
- ✅ Recovery options
- ✅ No single point of failure
Option 2: EOA (Externally Owned Account)
Best for: Development, testing, or simple deployments
Setup:
- Use a secure wallet (hardware wallet recommended)
- Copy the address
- Set in
.env:TETHER_ADMIN=<wallet_address> MIRROR_ADMIN=<wallet_address>
Security Considerations:
- ⚠️ Single point of failure
- ⚠️ Private key must be secured
- ⚠️ Consider using hardware wallet
- ⚠️ Not recommended for production
Option 3: Custom Access Control Contract
Best for: Complex permission requirements
You can deploy a custom access control contract that implements:
- Role-based access control
- Timelock delays
- Multi-signature requirements
- Custom permission logic
Example: Deploy OpenZeppelin's AccessControl or AccessManager and set it as admin.
📋 Current Implementation
Deployment Scripts
Both deployment scripts now use:
TETHER_ADMINfor MainnetTetherMIRROR_ADMINfor TransactionMirror
address admin = vm.envAddress("TETHER_ADMIN");
require(admin != address(0), "TETHER_ADMIN not set in .env");
Contract Pattern
Contracts use simple admin pattern (similar to OpenZeppelin's Ownable):
- Single
adminaddress onlyAdminmodifier for protected functionssetAdmin()function to transfer admin (requires current admin)
🚀 Deployment Steps
1. Choose Admin Address Type
Recommended: Gnosis Safe (multisig)
2. Set Up Admin Address
For Multisig (Gnosis Safe):
- Go to https://safe.global/
- Create a new Safe on Ethereum Mainnet
- Add signers (minimum 2, recommended 3-5)
- Set threshold (e.g., 2-of-3)
- Complete setup and copy Safe address
For EOA:
- Use secure wallet (hardware wallet recommended)
- Copy wallet address
3. Update .env File
# Admin addresses (multisig recommended)
TETHER_ADMIN=0x... # Your admin address (Safe or EOA)
MIRROR_ADMIN=0x... # Can be same as TETHER_ADMIN or different
# Other required variables
PRIVATE_KEY=0x... # Deployer private key
ETH_MAINNET_RPC_URL=https://eth-mainnet.g.alchemy.com/v2/YOUR_API_KEY
ETHERSCAN_API_KEY=...
4. Deploy Contracts
# Deploy MainnetTether
forge script script/DeployMainnetTether.s.sol \
--rpc-url $ETH_MAINNET_RPC_URL \
--private-key $PRIVATE_KEY \
--broadcast \
--verify \
-vvvv
# Deploy TransactionMirror
forge script script/DeployTransactionMirror.s.sol \
--rpc-url $ETH_MAINNET_RPC_URL \
--private-key $PRIVATE_KEY \
--broadcast \
--verify \
--via-ir \
-vvvv
🔒 Security Best Practices
For Production
- Use Multisig: Always use Gnosis Safe or similar for production
- Multiple Signers: Use 3-5 signers with 2-of-3 or 3-of-5 threshold
- Hardware Wallets: Use hardware wallets for signers
- Separate Admin Addresses: Consider different admin addresses for different contracts
- Regular Reviews: Periodically review admin addresses and permissions
For Development/Testing
- Testnet First: Deploy to testnet first
- Secure Storage: Keep private keys secure
- Hardware Wallet: Use hardware wallet even for testing
- Documentation: Document admin addresses and recovery procedures
📝 Post-Deployment
Verify Admin Address
After deployment, verify the admin address:
# Check MainnetTether admin
cast call <MAINNET_TETHER_ADDRESS> "admin()" --rpc-url $ETH_MAINNET_RPC_URL
# Check TransactionMirror admin
cast call <TRANSACTION_MIRROR_ADDRESS> "admin()" --rpc-url $ETH_MAINNET_RPC_URL
Transfer Admin (If Needed)
If you need to transfer admin to a different address:
# Transfer MainnetTether admin
cast send <MAINNET_TETHER_ADDRESS> \
"setAdmin(address)" \
<NEW_ADMIN_ADDRESS> \
--rpc-url $ETH_MAINNET_RPC_URL \
--private-key $CURRENT_ADMIN_PRIVATE_KEY
# Transfer TransactionMirror admin
cast send <TRANSACTION_MIRROR_ADDRESS> \
"setAdmin(address)" \
<NEW_ADMIN_ADDRESS> \
--rpc-url $ETH_MAINNET_RPC_URL \
--private-key $CURRENT_ADMIN_PRIVATE_KEY
Note: For multisig, execute this transaction through the Safe interface.
🔄 Migration from Defender
If you previously used Defender:
- Create New Admin Address: Set up Gnosis Safe or choose EOA
- Update .env: Replace
DEFENDER_ADMINwithTETHER_ADMIN/MIRROR_ADMIN - Deploy New Contracts: Deploy with new admin addresses
- Or Transfer Admin: If contracts already deployed, transfer admin to new address
📚 References
Last Updated: 2025-12-11 Status: Updated - Defender Removed