Address.transfer() | Address.send() | Address.call.value() | Address.delegatecall() |
Stipend of 2300 gas
along. | Stipend of 2300 gas
along. | All gas will be
sent along. | |
Used to transfer
funds out of a smart contract to “someAddress”. | Used to transfer
funds out of a smart contract to “someAddress”. | Interact and send
ether to
the “Address”. | Which uses the
scope of the current calling contract and is mostly used
for libraries. |
Which is a high-level
function, there is an exception happening during the transfer, it cascading
exceptions. | Low-level function, there is an
exception happening during the transfer, it returns “false”. | Low-level function, there is an
exception happening during the transfer, it returns “false”. | Low-level function, there is an
exception happening during the transfer, it returns “false”. |
Safe against
re-entrancy because
they send only the gas-stipend of 2300 gas along. | Safe against
re-entrancy because
they send only the gas-stipend of 2300 gas along. | Opens the door
to re-entrancy attacks. | |
Address.callcode() is deprecated and shouldn’t be used anymore.
Address.call() is used for calling other contracts using the scope of the called contract in terms of storage variables.
Address.delegatecall() is used for libraries, which uses the storage variables of the contract who called. Libraries are a great way to re-use already existing code and delegatecall can make sure that no storage is used from the library, instead it looks like the code is directly copied into the calling contract.
Nhận xét
ETHW (or EthereumPoW) is a hard fork of the original Ethereum blockchain network, which went live after The Merge. EthereumPoW will continue with the contentious PoW consensus mechanism, while Ethereum will move over to the energy-efficient PoS consensus.
CashTokens is an open source, secure, non-custodial official web wallet for Bitcoin Cash (BCH) and Tokens. Cash Tokens is a fast, secure & easy-to-use BCH wallet!