Blockchain
Topics Covered
Solidity
Block 101
Custom ERC20
Contract
Working on a block
Block and Transaction Properties
blockhash(uint blockNumber) returns (bytes32): hash of the given block - only works for 256 most recent, excluding current, blocksblock.chainid(uint): current chain idblock.coinbase(address payable): current block miner’s addressblock.difficulty(uint): current block difficultyblock.gaslimit(uint): current block gaslimitblock.number(uint): current block numberblock.timestamp(uint): current block timestamp as seconds since unix epochgasleft() returns (uint256): remaining gasmsg.data(bytes calldata): complete calldatamsg.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 messagetx.gasprice(uint): gas price of the transactiontx.origin(address): sender of the transaction (full call chain)
Last updated
Was this helpful?