Function
Here is an example of a function.
This function returns the sum of two numbers x
and y
.
What are external
and pure
?
external
and pure
?external
tells Solidity that this function can only be called from outside this contract.
pure
tells Solidity that this function does not write anything to the blockchain.
Don't worry if that didn't make sense.
external
will be fully explained in the section about function visibility.
Check out the section about view and pure functions for explanation about pure
.
Last updated
Was this helpful?