Functions and Visibility Flashcards

1
Q

Fuctions

A

take input values, perform operations, and output values

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

default visibility

A

public (need to be specified)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

external

A

can be called from other contacts and via transactions

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

external functions can’t be called

A

internally using f() but can be called using this.f()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

internal

A

can only be accessed internally within the contract

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

public

A

can be called either internally or externally

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

private

A

only visible in the contract they are defined, not. available in derived contracts

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

constant or view

A

doesn’t modify states

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

pure

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

payable

A

the function is able to receive Ether

How well did you know this?
1
Not at all
2
3
4
5
Perfectly