pyevm¶
If you don’t specify a network in your command line, by default, moccasin
will use a special network called pyevm
.
This is a built-in network that comes with titanoboa, and can be considered the core engine of the whole moccasin
project.
So, when you originally mox init a project, you get a deploy script that looks like this:
from contracts import Counter
from moccasin.boa_tools import VyperContract
def deploy() -> VyperContract:
counter: VyperContract = Counter.deploy()
print("Starting count: ", counter.number())
counter.increment()
print("Ending count: ", counter.number())
return counter
def moccasin_main() -> VyperContract:
return deploy()
We can run this script by running:
mox run deploy
You’ll notice, we didn’t add any network flags. This means that moccasin
will simulate a minimal locally running network with the pyevm
network. This network lasts only for the duration of your script, so if you want to save any output, you’ll have to do that yourself!
pyevm network defaults¶
is_zksync = "false"
prompt_live = "false"
save_to_db = "false"
live_or_staging = "false"
db_path = "None"