Functions and Visibility Flashcards
1
Q
Fuctions
A
take input values, perform operations, and output values
2
Q
default visibility
A
public (need to be specified)
3
Q
external
A
can be called from other contacts and via transactions
4
Q
external functions can’t be called
A
internally using f() but can be called using this.f()
5
Q
internal
A
can only be accessed internally within the contract
6
Q
public
A
can be called either internally or externally
7
Q
private
A
only visible in the contract they are defined, not. available in derived contracts
8
Q
constant or view
A
doesn’t modify states
9
Q
pure
A
10
Q
payable
A
the function is able to receive Ether