我现在的作法是通过
const gasLimit = await provider.estimateGas({from:from,to});
const gasPrice = (await provider.getFeeData()).gasPrice
const gas = gasPrice * gasLimit
const value = balance - gas
然后使用sendTransaction方法 总是报错 insufficient funds for intrinsic transaction cost