@Retention(value=RUNTIME)
@Target(value=METHOD)
public @interface View
View
may access values stored in the persistent contract storage variables,
but may not *modify* those values. Essentially you are only *reading* the blockchain state, and not
modifying it. Because of this View
methods do not require a transaction and consume zero gas.
A View
method may not also be marked as Payable
.
Note that in the context of a View
method the values in the msg variable are meaningless because this
is no actual transaction being made.