Files
smom-dbis-138/docs/deployment/ADMIN_ADDRESS_OPTIONS.md
defiQUG 1fb7266469 Add Oracle Aggregator and CCIP Integration
- 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.
2025-12-12 14:57:48 -08:00

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

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:

  1. Create a Safe wallet on Ethereum Mainnet
  2. Add signers (e.g., 3-5 trusted addresses)
  3. Set threshold (e.g., 2-of-3)
  4. Copy the Safe address
  5. 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:

  1. Use a secure wallet (hardware wallet recommended)
  2. Copy the address
  3. 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_ADMIN for MainnetTether
  • MIRROR_ADMIN for 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 admin address
  • onlyAdmin modifier for protected functions
  • setAdmin() 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):

  1. Go to https://safe.global/
  2. Create a new Safe on Ethereum Mainnet
  3. Add signers (minimum 2, recommended 3-5)
  4. Set threshold (e.g., 2-of-3)
  5. Complete setup and copy Safe address

For EOA:

  1. Use secure wallet (hardware wallet recommended)
  2. 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

  1. Use Multisig: Always use Gnosis Safe or similar for production
  2. Multiple Signers: Use 3-5 signers with 2-of-3 or 3-of-5 threshold
  3. Hardware Wallets: Use hardware wallets for signers
  4. Separate Admin Addresses: Consider different admin addresses for different contracts
  5. Regular Reviews: Periodically review admin addresses and permissions

For Development/Testing

  1. Testnet First: Deploy to testnet first
  2. Secure Storage: Keep private keys secure
  3. Hardware Wallet: Use hardware wallet even for testing
  4. 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:

  1. Create New Admin Address: Set up Gnosis Safe or choose EOA
  2. Update .env: Replace DEFENDER_ADMIN with TETHER_ADMIN/MIRROR_ADMIN
  3. Deploy New Contracts: Deploy with new admin addresses
  4. Or Transfer Admin: If contracts already deployed, transfer admin to new address

📚 References


Last Updated: 2025-12-11 Status: Updated - Defender Removed