Skip to content
This repository has been archived by the owner on Feb 9, 2024. It is now read-only.

Align Hook Naming #48

Closed
4 tasks done
peetzweg opened this issue Apr 12, 2023 · 5 comments · Fixed by #56
Closed
4 tasks done

Align Hook Naming #48

peetzweg opened this issue Apr 12, 2023 · 5 comments · Fixed by #56
Assignees
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Milestone

Comments

@peetzweg
Copy link
Collaborator

peetzweg commented Apr 12, 2023

useCall vs useContractCall
useTx vs useContractTx
useDryRun vs useContractDryRun

->

  • useCall
  • useTx
  • useEvents
  • useWallet instead of useExtension (extension is just a type of wallet)
@peetzweg peetzweg added documentation Improvements or additions to documentation enhancement New feature or request labels Apr 12, 2023
@peetzweg peetzweg added this to the v1.0 milestone Apr 12, 2023
@peetzweg
Copy link
Collaborator Author

As of now we prefer the simpler version, it could clash with potential substrate/runtime hooks down the line but maybe these are handled differently anyways and are more advanced.

@DoubleOTheven
Copy link
Contributor

We can use other naming conventions such as useChainCall or useRuntimeCall for calling the runtime vs a contract. I like that we can make contract dev-ex as ergonomic as possible.

@DoubleOTheven
Copy link
Contributor

DoubleOTheven commented Apr 16, 2023

I think that useEvents should be the subscription version. Then we add useEventsAt as mentioned here.

@peetzweg
Copy link
Collaborator Author

We can use other naming conventions such as useChainCall or useRuntimeCall for calling the runtime vs a contract. I like that we can make contract dev-ex as ergonomic as possible.

I like that! Maybe even back to useContractCall as well? So I guess useChainCall will be more for generic extrinsics and useContractCall a more opinionated version for convenient use?

@DoubleOTheven
Copy link
Contributor

I like useChainCall(), but useCall is short and sweet. I think we should make contract development first class

@DoubleOTheven DoubleOTheven linked a pull request Apr 24, 2023 that will close this issue
3 tasks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
2 participants