Closed kyriediculous closed 2 years ago
Functions can be declared as external instead of public if they are never called from within the contract itself to save gas.
Correct. This is because external functions read from calldata while public functions copy the arguments to memory. Calldata is cheaper to operate on.
Closed with https://github.com/Tenderize/tender-core/commit/2376391776e34989c46bd261734af503ec457c1b
Functions can be declared as external instead of public if they are never called from within the contract itself to save gas.
Correct. This is because external functions read from calldata while public functions copy the arguments to memory. Calldata is cheaper to operate on.