Global variables
msg.sender
— The msg.sender is the address that has called or initiated a function or created a transactionmsg.data
— The completecalldata
which is a non-modifiable, non-persistent area where function arguments are stored and behave mostly likememory
msg.gas
— Returns the available gas remaining for a current transaction (you can learn more about gas in Ethereum here)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)
msg.sender vs tx.origin
There are two types of accounts in the Ethereum Chain
Externally Owned Accounts (EOA) [Person]
Contracts Accounts [Contracts on Chain]
Both accounts have addresses.
Last updated