Skip to content

Conversation

@Rihyx
Copy link

@Rihyx Rihyx commented Dec 15, 2025

No description provided.

@Rihyx Rihyx changed the title Riha/call wallet client.write contract instead cotract.write call wallet client.write contract instead cotract.write Dec 15, 2025
@santikaplan santikaplan requested a review from ftheirs December 15, 2025 15:28
@Rihyx Rihyx marked this pull request as ready for review December 16, 2025 08:53
Copy link
Contributor

@ftheirs ftheirs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a description explaining the changes and why this helps with the social login?
Replacing this
return await contract.write.deleteBucket?.(args, txOpts);
with this:

    return await this.walletClient.writeContract({
      account: this.walletClient.account?.address as `0x${string}`,
      address: this.filesystemContractAddress,
      abi: filesystemAbi,
      functionName: "deleteBucket",
      args,
      ...txOpts,
      chain: null
    });

doesn't look good since we are loosing the autocomplete and we have to pay extra attention to the name from the different methods from precompiles.

@Rihyx
Copy link
Author

Rihyx commented Dec 17, 2025

ftheirs

Hi, thank you for point out the type's issue. I have fixed it and now types for args and function names should work properly.

Here is an example:
Screenshot 2025-12-17 at 13 26 41

About the social login and why it is working. Looks like e.g. contract.write.createBucket is trying to get chainId from the wallet client. And because it's Reown's Social Login it is a bit weird and is failing. But if we call the whey I did. It is not getting chainId because chain is null and writeContract and it's calling the current selected chain in WalletClient.

This is what solution I have found, and I don't have any better for now. If you know how we can do it better, please let me know.

@ftheirs ftheirs added D3-trivial👶 PR contains trivial changes that do not require an audit not-breaking Does not need to be mentioned in breaking changes B1-sdknoteworthy Changes should be mentioned in SH SDK related release notes labels Dec 17, 2025
@ftheirs
Copy link
Contributor

ftheirs commented Dec 18, 2025

Hey @Rihyx, thanks for the clarification! The changes looks good, just make the CI ✅

@Rihyx
Copy link
Author

Rihyx commented Dec 19, 2025

Hey @Rihyx, thanks for the clarification! The changes looks good, just make the CI ✅

Hi, thanks. I fixed linter. Is it possible to release some dev or rc version that we can test everything properly?

@ftheirs
Copy link
Contributor

ftheirs commented Dec 19, 2025

Hey @Rihyx, sure! Version 0.3.5-dev.1 was just published!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

B1-sdknoteworthy Changes should be mentioned in SH SDK related release notes D3-trivial👶 PR contains trivial changes that do not require an audit not-breaking Does not need to be mentioned in breaking changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants