`@view` promises the function only reads state, `@pure` promises it touches no state at all, and `@payable` allows the function to receive ETH via `msg.value`. Functions without `@payable` revert if ETH is sent to them.
@external
@view
def rate() -> uint256:
return self._rate
@external
@payable
def deposit():
self.balances[msg.sender] += msg.valueAs on any EVM chain, a `@view`/`@pure` call made off chain (an `eth_call`) costs the caller no gas because no transaction is mined.