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: v4
Attention!You are viewing outdated ink! 4 docs. Click here to view the latest docs.

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 e.g. Self::env().caller() or self.env().caller().

Some handy functions include: