2.9 KiB
2.9 KiB
Send 20M cUSDT and cUSDC Script
Overview
This script sends 20,000,000 cUSDT and 20,000,000 cUSDC tokens to the specified wallet address.
Recipient Address: 0x4207aA9aC89B8bF4795dbAbBbE17fdd224E7947C
Usage
cd /home/intlc/projects/proxmox/smom-dbis-138
./scripts/send-20m-tokens.sh
How It Works
- Checks Deployer Balance: Verifies if the deployer address has sufficient tokens
- Smart Minting/Transfer:
- If deployer has sufficient balance: Transfers tokens from deployer to recipient
- If deployer has insufficient balance: Mints tokens directly to recipient (requires owner role)
- Verification: Confirms the transfers by checking recipient balances
Token Details
- cUSDT Address:
0x93E66202A11B1772E55407B32B44e5Cd8eda7f22 - cUSDC Address:
0xf22258f57794CC8E06237084b353Ab30fFfa640b - Amount: 20,000,000 tokens each (20000000000000 in base units with 6 decimals)
Prerequisites
-
.envfile must exist in the project root with:PRIVATE_KEY: Private key of the deployer/ownerRPC_URLorRPC_URL_138: RPC endpoint URLCOMPLIANT_USDT_ADDRESS: cUSDT contract address (optional, has defaults)COMPLIANT_USDC_ADDRESS: cUSDC contract address (optional, has defaults)
-
The deployer address must be the owner of both token contracts (for minting)
-
RPC endpoint must be accessible
Expected Output
╔══════════════════════════════════════════════════════════════╗
║ Send 20M cUSDT and cUSDC ║
╚══════════════════════════════════════════════════════════════╝
Deployer Address: 0x...
Recipient Address: 0x4207aA9aC89B8bF4795dbAbBbE17fdd224E7947C
Amount: 20,000,000 tokens (each)
Checking balances...
Deployer cUSDT Balance: X tokens
Deployer cUSDC Balance: X tokens
Minting 20M cUSDT to recipient...
✓ cUSDT mint successful
Transaction Hash: 0x...
Minting 20M cUSDC to recipient...
✓ cUSDC mint successful
Transaction Hash: 0x...
Verifying transfers...
Recipient cUSDT Balance: 20000000.00 tokens
Recipient cUSDC Balance: 20000000.00 tokens
╔══════════════════════════════════════════════════════════════╗
║ Transfers Complete! ║
╚══════════════════════════════════════════════════════════════╝
Notes
- The script uses
castfrom Foundry - Gas price is set to 20 gwei (20000000000)
- Transactions use legacy format
- Script will exit on any error