[#wallet-CWalletTx-state-02] = xref:wallet.adoc[wallet]::xref:wallet/CWalletTx.adoc[CWalletTx]::state :relfileprefix: ../../ :mrdocs: Return a pointer to the current state if it is of type T, otherwise nullptr. == Synopses Declared in `<wallet/transaction.h>` Return a pointer to the current state if it is of type T, otherwise nullptr. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<typename T> T const* xref:wallet/CWalletTx/state-07.adoc[state]() const; ---- [.small]#xref:wallet/CWalletTx/state-07.adoc[_» more..._]# Return a pointer to the current state if it is of type T, otherwise nullptr. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<typename T> T* xref:wallet/CWalletTx/state-04.adoc[state](); ---- [.small]#xref:wallet/CWalletTx/state-04.adoc[_» more..._]# == Return Value A pointer to the state if it holds type T, otherwise nullptr. [.small]#Created with https://www.mrdocs.com[MrDocs]#