Conventions used
There are a number of text conventions used throughout this book.
Code in text
: Indicates code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles. Here is an example: “ You want to put the Vyper files inside the contracts
directory alongside 1_Storage.sol
, 2_Owner.sol
, and 3_Ballot.sol
. Make sure the contracts
directory is selected by right-clicking it.”
A block of code is set as follows:
from ape import accounts, project import os def main(): password = os.environ["MY_PASSWORD"] dev = accounts.load("dev") dev.set_autosign(True, passphrase=password) contract = project.SimpleStorage.deploy(sender=dev) num_value = contract.retrieve.call() print(f"The num value is {num_value}")
Any command-line input or output is written as follows:
(.venv) $ export VOTER_PASSWORD=youraccountpassword (.venv) $ export VOTER_ACCOUNT=voter1 (.venv) $ export PROPOSAL=0
Bold: Indicates a new term, an important word, or words that you see onscreen. For instance, words in menus or dialog boxes appear in bold. Here is an example: “Click contracts under FILE EXPLORER and click 1_Storage.sol.”
Tips or important notes
Appear like this.