Macro frame_support::crate_to_pallet_version [−][src]
crate_to_pallet_version!() { /* proc-macro */ }
Convert the current crate version into a PalletVersion
.
It uses the CARGO_PKG_VERSION_MAJOR
, CARGO_PKG_VERSION_MINOR
and
CARGO_PKG_VERSION_PATCH
environment variables to fetch the crate version.
This means that the PalletVersion
object will correspond to the version of the crate the macro is called in!
Example
const Version: PalletVersion = crate_to_pallet_version!();