Extensions
Get familiar with the concept of extensions and how to use them in your project.
Understanding Extensions
Learn how to use extensions in your project
Any extension that reads from the blockchain can be used with useReadContract
. The extension function itself be passed as the first argument, and the extension's parameters must be passed as the second argument.
For extensions that write to the blockchain, they work the same way as raw contract calls using useSendTransaction
.
Write extensions always return a Transaction
object that can be passed to useSendTransaction
.
Note that unlike in TypeScript core, useSendTransaction
does not require passing the active Account
, it will used the current active account from the React context.