Deposit
GET /api/getDepositAddress
Example:
curl -X "GET" "https://app.quote.trade/api/getDepositAddress"
Response:
{
"chain": "polygon_amoy",
"address": "0x3fC499C3a6F0e75E4D854F3B111f6583fB5Af554"
}
Ethereum Mainnet: 0xdac17f958d2ee523a2206206994597c13d831ec7 (USDT_CONTRACT_ADDRESS)
JavaScript Code:
import { ethers } from "ethers"; // (ethers.js version 6.13.5)
// ✅ Configuration: Replace with your actual values
const PRIVATE_KEY = "your_private_key_here"; // ⚠️ Keep this secret!
const DEPOSIT_ADDRESS = "0xDEPOSIT_ADDRESS"; // Replace with the actual recipient
const USDT_CONTRACT_ADDRESS = "0xdac17f958d2ee523a2206206994597c13d831ec7"; // USDT on Ethereum
const RPC_URL = "https://mainnet.infura.io/v3/YOUR_INFURA_API_KEY"; // Replace with your Infura/Alchemy RPC
// ✅ USDT ERC-20 ABI (Minimal for transfer function)
const USDT_ABI = [
"function transfer(address to, uint256 amount) public returns (bool)"
];
// ✅ Initialize ethers.js Provider & Wallet
const provider = new ethers.JsonRpcProvider(RPC_URL);
const wallet = new ethers.Wallet(PRIVATE_KEY, provider);
// ✅ Connect to USDT Smart Contract
const usdtContract = new ethers.Contract(USDT_CONTRACT_ADDRESS, USDT_ABI, wallet);
async function sendUSDT() {
try {
console.log(`🔹 Sending USDT from ${wallet.address} to ${DEPOSIT_ADDRESS}...`);
// ✅ Convert USDT amount (5 USDT = 5 * 10^6 because USDT has 6 decimals)
const amount = ethers.parseUnits("5", 6);
// ✅ Call transfer function
const tx = await usdtContract.transfer(DEPOSIT_ADDRESS, amount);
console.log("📨 Transaction sent! Hash:", tx.hash);
// ✅ Wait for transaction confirmation
await tx.wait();
console.log("✅ Transaction Confirmed:", tx.hash);
} catch (error) {
console.error("❌ Error Sending USDT:", error);
}
}
// ✅ Execute the function
sendUSDT();