Skip to Content
Solidity Programming Essentials
book

Solidity Programming Essentials

by Ritesh Modi
April 2018
Intermediate to advanced
222 pages
5h 28m
English
Packt Publishing
Content preview from Solidity Programming Essentials

Transaction and message global variables

The following is a list of global variables along with their data types and a description provided as a ready reference:

Variable name

Description

block.coinbase (address)

Same as etherbase. Refers to the miner's address.

block.difficulty (uint)

Difficulty level of current block.

block.gaslimit (uint)

Gas limit for current block.

block.number (uint)

Block number in sequence.

block.timestamp (uint)

Time when block was created.

msg.data (bytes)

Information about the function and its parameters that created the transaction.

msg.gas (uint)

Gas unused after execution of transaction.

msg.sender (address)

Address of caller who invoked the function.

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Solidity Programming Essentials - Second Edition

Solidity Programming Essentials - Second Edition

Ritesh Modi
The Go Programming Language

The Go Programming Language

Alan A. A. Donovan, Brian W. Kernighan
Linux Kernel Programming

Linux Kernel Programming

Kaiwan N. Billimoria
Programming Rust, 2nd Edition

Programming Rust, 2nd Edition

Jim Blandy, Jason Orendorff, Leonora F. S. Tindall

Publisher Resources

ISBN: 9781788831383Supplemental Content