Open Nosll opened 7 months ago
const wallet = new ethers.Wallet(privateKey, Provider) const tx = wallet.getTransactionCount()
const wallet2Mnemonic = Wallet.fromMnemonic(mnemonic) const wallet2 = wallet2Mnemonic.connect(Provider) const tx2 = wallet.getTransactionCount()
以上兩種方法皆會返還以下錯誤: TypeError: wallet.getTransactionCount is not a function
需要將 getTransactionCount() 替換成 getNonce()
const wallet = new ethers.Wallet(privateKey, Provider) const tx = wallet.getTransactionCount()
const wallet2Mnemonic = Wallet.fromMnemonic(mnemonic) const wallet2 = wallet2Mnemonic.connect(Provider) const tx2 = wallet.getTransactionCount()
以上兩種方法皆會返還以下錯誤: TypeError: wallet.getTransactionCount is not a function
需要將 getTransactionCount() 替換成 getNonce()