Skip to content
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

Improve Dart API - use named parameters instead of XXXParameters objects #35

Open
Chralu opened this issue Sep 4, 2024 · 2 comments
Open
Labels
quality Improve code quality

Comments

@Chralu
Copy link
Contributor

Chralu commented Sep 4, 2024

Describe the problem you discovered

I think the action parameters are heavy to use.

For example, I suggest doing :

final getBlockNumberReturnType = await wagmi.Core.getBlockNumber(
  chainId: account!.chain!.id,
  cacheTime: 4000,
);

instead of :

final getBlockNumberReturnType = await wagmi.Core.getBlockNumber(
  wagmi.GetBlockNumberParameters(
    chainId: account!.chain!.id,
    cacheTime: 4000,
  ),
);
@Chralu Chralu added the quality Improve code quality label Sep 4, 2024
@Chralu
Copy link
Contributor Author

Chralu commented Sep 4, 2024

@redDwarf03 @kaumudpa ok with that ?

@kaumudpa
Copy link
Contributor

kaumudpa commented Sep 4, 2024

@Chralu Our current approach is more defined as per the specific params required by different actions. Current approach seems to be ok. The conversion types between different actions also differs at times.

JS VM will use exactly same resources so there is no need to worry abt named parameters being heavy to use.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
quality Improve code quality
Projects
None yet
Development

No branches or pull requests

2 participants