-
Notifications
You must be signed in to change notification settings - Fork 115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot read properties of undefined: getAddress
when querying for CounterFactual address
#45
Comments
SolutionThis problem is caused because Wallet Client has no However, const { data: walletClient } = useWalletClient();
let newClient = walletClient.extend((client) => {
return {
getAddress: async function () {
let addresses = await client.getAddresses();
return addresses[0];
},
};
}) The let provider = new SmartAccountProvider(
"[rpc_url]",
ENTRYPOINT_ADDRESS,
sepolia
).connect((rpcClient) => {
return new SimpleSmartContractAccount({
entryPointAddress: ENTRYPOINT_ADDRESS,
chain: sepolia,
factoryAddress: SIMPLE_ACCOUNT_FACTORY_ADDRESS,
rpcClient,
owner: newClient,
});
}); You can also check out my project using this |
@therealharpaljadeja Thanks for this summary! I'm actually going to re-open the issue so that we can add a utility to handle this in the future for others |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs |
docs: update the docs on byosca to use LightAccount
[REQUIRED] Environment
[REQUIRED] Describe the problem
When someone tries to query for the CounterFactual address of the
SimpleSmartContractAccount
then the error Cannot read properties of undefined:getAddress
is thrownHow to reproduce:
The text was updated successfully, but these errors were encountered: