I am trying to create wallet and trying to get getCounterFactualAddress but I am getting exceptions, I tried with userop.js and with @account-abstraction/sdk both.
userop.js:
const simpleAccount = await Presets.Builder.SimpleAccount.init(
signingKey,
config.rpcUrl,
config.entryPoint,
config.simpleAccountFactory
);
Exception: Error: could not detect network (event="noNetwork", code=NETWORK_ERROR, version=providers/5.7.2)
@account-abstraction/sdk:
const provider = new ethers.providers.JsonRpcProvider(config.rpcUrl);
const owner = new ethers.Wallet(signingKey, provider);
const sw = new SimpleAccountAPI({
provider,
entryPointAddress : config.entryPoint,
owner,
factoryAddress : config.simpleAccountFactory,
paymasterAPI: undefined
});
Exception: TypeError: undefined is not an object (evaluating 'e.errorArgs.sender')