From 8bfc9ad829a394bf02f729fbd77b31bf051866b7 Mon Sep 17 00:00:00 2001 From: Markus Waas Date: Sun, 23 Jan 2022 08:56:15 +1300 Subject: [PATCH] Add msg.sig to cheatsheet --- docs/cheatsheet.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/cheatsheet.rst b/docs/cheatsheet.rst index 1aa8f24ef..eab1e3d52 100644 --- a/docs/cheatsheet.rst +++ b/docs/cheatsheet.rst @@ -96,6 +96,7 @@ Global Variables - ``gasleft() returns (uint256)``: remaining gas - ``msg.data`` (``bytes``): complete calldata - ``msg.sender`` (``address``): sender of the message (current call) +- ``msg.sig`` (``bytes4``): first four bytes of the calldata (i.e. function identifier) - ``msg.value`` (``uint``): number of wei sent with the message - ``tx.gasprice`` (``uint``): gas price of the transaction - ``tx.origin`` (``address``): sender of the transaction (full call chain)