Hey guys, I’m trying to test and understand the sdk but i have some error with a basic smartaccount initialisation
"async function main() {
let provider = new HDWalletProvider(privateKey, rpcUrl);
const walletProvider = new ethers.providers.Web3Provider(provider);
// get EOA address from wallet provider
const eoa = await walletProvider.getSigner().getAddress();
console.log(EOA address: ${eoa}
);
// get SmartAccount address from wallet provider
const wallet = new SmartAccount(walletProvider, { activeNetworkId: ChainId.mumbai, });
const smartAccount = await wallet.init();
const address = await smartAccount.getSmartAccountState();
console.log(SmartAccount address: ${address}
);
process.exit(0);
}"
“SmartAccount address: undefined”
The address of the smart account is undefined, I think the problem come from the wallet.init() function but I don’t know what can I do wrong
I use the same script as Setting Up Smart Account - Biconomy SDK