// 连接钱包示例
import { ethers } from "ethers";
async function connectWallet() {
if (window.ethereum) {
const provider = new ethers.providers.Web3Provider(window.ethereum);
await provider.send("eth_requestAccounts", []);
const signer = provider.getSigner();
return signer.getAddress();
}
}