-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 14475b0
Showing
154 changed files
with
27,326 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Sphinx build info version 1 | ||
# This file records the configuration used when building these files. When it is not found, a full rebuild will be done. | ||
config: 15ca4638e32116b40cd74e5885ce8ec4 | ||
tags: 645f666f9bcd5a90fca523b33c5a78b7 |
Empty file.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,111 @@ | ||
All moccasin toml parameters | ||
============================ | ||
|
||
TOML Formatting | ||
--------------- | ||
|
||
In TOML you can think of each section as a giant JSON object. Each of these are essentially identical: | ||
|
||
+----------------------------------+----------------------------------+----------------------------------+ | ||
| TOML (Expanded) | TOML (Compact) | JSON | | ||
+==================================+==================================+==================================+ | ||
| .. code-block:: toml | .. code-block:: bash | .. code-block:: json | | ||
| | | | | ||
| [project] | [project] | { | | ||
| src = "contracts" | src = "contracts" | "project": { | | ||
| | networks = { | "src": "contracts", | | ||
| [project.networks.sepolia] | sepolia = { | "networks": { | | ||
| url = "https://..." | url = "https://...", | "sepolia": { | | ||
| chain_id = 11155111 | chain_id = 11155111 | "url": "https://...", | | ||
| | }, | "chain_id": 11155111 | | ||
| [project.networks.zksync] | zksync = { | }, | | ||
| url = "https://..." | url = "https://...", | "zksync": { | | ||
| chain_id = 324 | chain_id = 324 | "url": "https://...", | | ||
| | } | "chain_id": 324 | | ||
| | } | } | | ||
| | | } | | ||
| | | } | | ||
| | | } | | ||
+----------------------------------+----------------------------------+----------------------------------+ | ||
|
||
|
||
|
||
All possible options | ||
-------------------- | ||
|
||
.. code-block:: toml | ||
# Changes the names and locations of specific directories in your project | ||
[project] | ||
src = "contracts" | ||
out = "build" | ||
script = "scripts" | ||
lib = "dependencies" | ||
# You can have pip-style dependencies and also github-style dependencies | ||
# These are going to be dependencies for your vyper contracts | ||
dependencies = ["snekmate==0.1.0", "pcaversaccio/[email protected]"] | ||
save_abi_path = "abis" # location to save ABIs from the explorer | ||
cov_config = ".coveragerc" # coverage configuration file | ||
dot_env = ".env" # environment variables file | ||
default_network = "pyevm" # default network to use. `pyevm` is the local network. "eravm" is the local ZKSync network | ||
db_path = ".deployments.db" # path to the deployments database | ||
[networks.pyevm] | ||
# The basic EVM local network | ||
# cannot set URL, chain_id, is_fork, is_zksync, prompt_live, explorer_uri, explorer_api_key | ||
default_account_name = "anvil" | ||
[networks.eravm] | ||
# The special ZKSync Era local network | ||
# cannot set URL, chain_id, is_fork, is_zksync, prompt_live, explorer_uri, explorer_api_key | ||
default_account_name = "anvil" | ||
[networks.contracts] | ||
# Default named contract parameters | ||
usdc = {"address" = "0x5fbdb2315678afecb367f032d93f642f64180aa3"} | ||
# Add network settings to easily interact with networks | ||
[networks.sepolia] | ||
url = "https://ethereum-sepolia-rpc.publicnode.com" | ||
chain_id = 11155111 | ||
is_fork = false | ||
is_zksync = false | ||
# This is the name of the account that will be unlocked when running on this network | ||
default_account_name = "anvil" | ||
# If you don't provide a password or private key, moccasin will prompt you to unlock it | ||
# If you do, it will unlock it automatically | ||
# But be careful about storing passwords and private keys! NEVER store them in plain text | ||
unsafe_password_file = "/home/user/.moccasin/password" # Replace with actual path | ||
explorer_uri = "https://api.etherscan.io/api" # path for the supported explorer | ||
explorer_api_key = "your_api_key" # api key for the supported explorer, overrides the main one | ||
explorer_type = "blockscout" # If the explorer URL has "blockscout" or "etherscan" in the name, you don't need this | ||
prompt_live = true # A flag that will prompt you before sending a transaction, it defaults to true for "non-testing" networks | ||
save_to_db = true # A flag that will save the deployment to the database, it defaults to true for "non-testing" networks (not pyevm, eravm, or a fork network) | ||
live_or_staging = true # A flag that will determine if the network is live or staging for the `@pytest.mark.staging` decorator, it defaults to true for non-local, non-forked networks | ||
[networks.sepolia.contracts] | ||
# You can override the default named contract parameters | ||
usdc = {"address" = "0x5fbdb2315678afecb367f032d93f642f64180aa3", abi = "ERC20.vy", force_deploy = false, deployer_script = "script/deploy.py"} | ||
# You can also format a contract like this, for example, this one is "dai" | ||
[networks.sepolia.contracts.dai] | ||
address = "0x6b175474e89094c44da98b954eedeac495271d0f" | ||
abi = "ERC20.vy" | ||
force_deploy = false | ||
[networks.sepolia.extra_data] | ||
my_data = "hi" | ||
# Put whatever else you want in here | ||
[extra_data] | ||
hi = "hello" | ||
Environment Variables | ||
--------------------- | ||
|
||
Additionally, there are a few environment variables that ``moccasin`` will look for, but it's also ok if they are not set. It's important to note, that the `.env` file you set in the config will be ignored for these values. | ||
|
||
.. code-block:: bash | ||
MOCCASIN_DEFAULT_FOLDER = "~/.moccasin" # path to the moccasin folder | ||
MOCCASIN_KEYSTORE_PATH = "~/.moccasin/keystore" # path to the keystore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
``Config`` | ||
########## | ||
|
||
.. autoclass:: moccasin.config.Config | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
``MoccasinAccount`` | ||
################### | ||
|
||
.. autoclass:: moccasin.moccasin_account.MoccasinAccount | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
``NamedContract`` | ||
##################### | ||
|
||
.. autoclass:: moccasin.named_contract.NamedContract | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
``Network`` | ||
########### | ||
|
||
.. autoclass:: moccasin.config.Network | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
``_Networks`` | ||
############# | ||
|
||
.. autoclass:: moccasin.config._Networks | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
Classes Reference | ||
################# | ||
|
||
mox | ||
=== | ||
|
||
You can find API information for all classes in the the ``moccasin`` tool. | ||
|
||
.. toctree:: | ||
:maxdepth: 4 | ||
:glob: | ||
|
||
api_reference/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
CLI Command Reference | ||
##################### | ||
|
||
mox | ||
=== | ||
|
||
.. argparse:: | ||
:module: moccasin_wrapper_for_docs | ||
:func: get_main_parser | ||
:prog: mox | ||
|
||
.. toctree:: | ||
:maxdepth: 3 | ||
:glob: | ||
|
||
cli_reference/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
compile | ||
####### | ||
|
||
.. argparse:: | ||
:module: moccasin_wrapper_for_docs | ||
:func: get_compile | ||
:prog: mox compile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
config | ||
###### | ||
|
||
.. argparse:: | ||
:module: moccasin_wrapper_for_docs | ||
:func: get_config | ||
:prog: mox config |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
console | ||
####### | ||
|
||
.. argparse:: | ||
:module: moccasin_wrapper_for_docs | ||
:func: get_console | ||
:prog: mox console |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
deploy | ||
###### | ||
|
||
.. argparse:: | ||
:module: moccasin_wrapper_for_docs | ||
:func: get_deploy | ||
:prog: mox deploy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
deployments | ||
########### | ||
|
||
.. argparse:: | ||
:module: moccasin_wrapper_for_docs | ||
:func: get_deployments | ||
:prog: mox deployments |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
explorer | ||
######## | ||
|
||
.. argparse:: | ||
:module: moccasin_wrapper_for_docs | ||
:func: get_explorer | ||
:prog: mox explorer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
init | ||
#### | ||
|
||
.. argparse:: | ||
:module: moccasin_wrapper_for_docs | ||
:func: get_init | ||
:prog: mox init |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
inspect | ||
####### | ||
|
||
.. argparse:: | ||
:module: moccasin_wrapper_for_docs | ||
:func: get_inspect | ||
:prog: mox inspect |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
install | ||
####### | ||
|
||
.. argparse:: | ||
:module: moccasin_wrapper_for_docs | ||
:func: get_install | ||
:prog: mox install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
purge | ||
##### | ||
|
||
.. argparse:: | ||
:module: moccasin_wrapper_for_docs | ||
:func: get_purge | ||
:prog: mox purge |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
run | ||
### | ||
|
||
.. argparse:: | ||
:module: moccasin_wrapper_for_docs | ||
:func: get_run | ||
:prog: mox run |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
test | ||
#### | ||
|
||
.. argparse:: | ||
:module: moccasin_wrapper_for_docs | ||
:func: get_test | ||
:prog: mox test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
wallet | ||
###### | ||
|
||
.. argparse:: | ||
:module: moccasin_wrapper_for_docs | ||
:func: get_wallet | ||
:prog: mox wallet |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
Common Errors | ||
============= | ||
|
||
ValueError: <boa.network.NetworkEnv object at 0xXXXXXXXXX>.eoa not defined! | ||
---------------------------------------------------------------------------- | ||
|
||
This is the most common error you'll run into, and it means you'll need to add an account to your ``moccasin.toml``. You can do this by following the :doc:`wallet <core_concepts/wallet>` guide. |
Oops, something went wrong.