Difficulty -
Medium
Total Plays - 3
Allowed Time - 10 sec
Best time - 10 sec
Why is calldata preferred for router functions?
#A
#B
#C
#D
Explanation:
Calldata avoids copying user inputs into memory, significantly reducing gas usage for large payloads. Router contracts receive untrusted inputs, so avoiding memory expansion is both cheaper and safer. This is why AMMs and DEX routers heavily rely on calldata