solidity学习

contract creation transaction: the target account address is 0. the payload of such transaction is taken to be EVM bytecode and executed.The output of this execution is permanently stored as the code of the contract

each account has its own persistant memory area called storage.

the second memory area is called memory, of which a contract obtains a freshly cleared instance for each message call.

EVM is not a register machine but a stack machine.

Calls are limited to a depth of 1024.

library

use the feature delegatecall: the contract can call the code of target address

fallback function

  1. A contract can have exactly one unnamed function. This function cannot have arguments and cannot return anything. It is executed on a call to the contract if none of the other functions match the given function identifier (or if no data was supplied at all).

  2. Furthermore, this function is executed whenever the contract receives plain Ether (without data). Additionally, in order to receive Ether, the fallback function must be marked payable.

  3. If no such function exists, the contract cannot receive Ether through regular transactions.

  4. Please ensure you test your fallback function thoroughly to ensure the execution cost is less than 2300 gas before deploying a contract.

-------------本文结束感谢您的阅读-------------