The global namespace is a set of implicitly declared variables and functions that you can reference and use in your contract code directly.
Global variable | Member | Description |
Block | Blockhash(unit blocknumber) | Hash of given block |
Coinbase | Block’s miner’s address | |
gaslimit | Block’s gas limit | |
number | Block’s number | |
timestamp | Block’s timestamp as UNIX epoch | |
msg | data | Full calldata body |
sender | Message sender (who is performing the current call) | |
gas | Remaining gas | |
value | Amount of Ether sent with the message, in Wei | |
tx | gasprice | Transaction gas price |
origin | Transaction sender (who originated the full call chain) |
Global namespace for exception
require(bool condition): This is used to validate function
input.
assert(bool condition): This is used to validate contract
state or function state.
revert() : the execution and revert the contract state explicitly
selfdestruct (Ether recipient address): remove the current contract instance from the blockchain. This will uninstall the current instance from the blockchain and move the Ether present at the associated account to the specified recipient address
Global namespace for cryptographic hash functions
sha256()(from the SHA-2 family)
keccak256() (from the SHA-3family)
Blockchain Ethereum – Ví dụ về hàm Delegatecall trong solidity
Blockchain Ethereum (P4) – Kết Nối Các Node Sử Dụng Bootnode
Blockchain Ethereum (P3) – Cài Đặt Private Blockchain trên nền tảng Ethereum
Install web3 and nodejs
Sử dụng Virtual Box
Đọc sách 2021