
0x6080604052...
1655 Followers
Solidity Data Locations - Storage, Memory and Calldata - storage: variable is a state variable (store on blockchain) - memory: variable is in memory and it exists while a function is being called - calldata: special data location that contains function arguments
Error handling in Solidity An error will undo all changes made to the state during a transaction. - require is used to validate inputs and conditions before execution. - revert is similar to require. See the code below for details. - assert is used to check for code that should never be false.
Mapping is a hash table in Solidity that stores data as key-value pairs, where the key can be any of the built-in data types, excluding reference types, and the value of the data type can be any type. Syntax: mapping(key => value) <access specifier> <name>;
Bytecode & Opcode in Solidity Bytecode is a software computer language for instruction-level programming that the Solidity code gets translated into. Opcodes are low-level human-readable instructions of the program that have hexadecimal counterparts. For example, MSTORE is 0x52, etc.