Why is it rare to see people using send() to transfer ETH/BNB? Is it because it has some disadvantages?
The send()
function has a gas limit of 2300, making it difficult to execute complex fallback()
or receive()
operations. Moreover, the return value of send()
is a boolean
, means the transfer was successful or not. So, if the transfer fails, it won't auto trigger a revert.
transfer()
will auto trigger a revert if fail.
call()
can execute complex fallback()
or receive()
operations.
1 Like