send() vs transfer()

send()

transfer() (better than send as auto reverts)

call{value: ..., gas: ...}("")

call vs delegatecall vs staticall

Answers the question - what is the difference between call, delegatecall, and transaction?

Feature call delegatecall staticcall
Context Runs in callee's context Runs in caller’s context Like call but no state mutation
Storage affected Callee’s storage Caller’s storage None (read-only)
msg.sender Preserved from original sender Same as caller’s msg.sender Preserved
State change? ✅ Yes ✅ Yes ❌ No
Use cases Regular inter-contract calls Proxy delegation / plugin execution Read-only queries on external contracts

Message calls