# Global variables

* `msg.sender` — The *msg.sender* is the address that has called or initiated a function or created a transaction
* `msg.data` — The complete `calldata` which is a non-modifiable, non-persistent area where function arguments are stored and behave mostly like `memory`
* `msg.gas` — Returns the available gas remaining for a current transaction (you can learn more about gas in Ethereum [here](https://www.cryptocompare.com/coins/guides/what-is-the-gas-in-ethereum/))
* `msg.sig` — The first four bytes of the calldata for a function that specifies the function to be called (i.e., function selector)
* `msg.value` — The amount of wei sent with a message to a contract (wei is a denomination of ETH)

<figure><img src="https://1628544884-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTgomzlmn9NrxUY0OQ3cD%2Fuploads%2FvzsUjfVg1ICBVPC46RaJ%2Fimage.png?alt=media&#x26;token=babf7edd-7f0f-4a55-8ac7-15f5f9fcd2e0" alt=""><figcaption></figcaption></figure>

### msg.sender vs tx.origin

There are two types of accounts in the Ethereum Chain

1. Externally Owned Accounts (EOA) \[Person]
2. Contracts Accounts \[Contracts on Chain]

Both accounts have addresses.

<figure><img src="https://1628544884-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTgomzlmn9NrxUY0OQ3cD%2Fuploads%2FvPBBgu7u6zaXj3u5ZVZs%2Fimage.png?alt=media&#x26;token=421d0cf5-512f-4fa2-8ad5-42b3488fa29c" alt=""><figcaption></figcaption></figure>

<br>

<br>
