Skip to main content

Since January 2026, we are unfortunately unable to actively maintain or develop ink! further.

We have written down the details in a Polkadot Forum post.

Version: v6

Env Function Title Picture

Environment Functions

ink! exposes a number of handy environment functions. A full overview is found here.

In an #[ink(constructor)] use Self::env() to access those, in an #[ink(message)] use self.env(). So Self::env().caller() or self.env().caller().

Some handy functions include: