[#wallet-CWalletTx-state-04]
= 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&period;

== Synopsis

Declared in `&lt;wallet&sol;transaction&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;typename T&gt;
T*
state();
----

== Return Value

A pointer to the state if it holds type T, otherwise nullptr&period;


[.small]#Created with https://www.mrdocs.com[MrDocs]#
