-
Notifications
You must be signed in to change notification settings - Fork 23
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
1 parent
dd366fd
commit 2e9efdb
Showing
65 changed files
with
451 additions
and
468 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 |
---|---|---|
|
@@ -14,7 +14,7 @@ wheels/ | |
.pytest_cache/ | ||
.ruff_cache/ | ||
|
||
# Gaboon | ||
# Moccasin | ||
built_docs/ | ||
anvil1 | ||
zkrich1 | ||
|
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
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 |
---|---|---|
@@ -1,6 +1,53 @@ | ||
>[!IMPORTANT] | ||
> *This project has been moved to a new location. Check out https://github.com/cyfrin/moccasin* | ||
> *This repo is a work in progress and is not ready for production use.* | ||
This project has moved to: | ||
# Moccasin | ||
|
||
https://github.com/cyfrin/moccasin | ||
A fast, pythonic, Vyper smart contract testing and development framework. | ||
|
||
[](https://github.com/astral-sh/uv) | ||
|
||
<!-- <p align="center"> | ||
<br /> | ||
<a href="https://cyfrin.io/"> | ||
<img src="./img/moccasin-logo.png" width="250" alt=""/></a> | ||
<br /> | ||
</p> --> | ||
|
||
Fast to install, test, and run python commands on your smart contracts. | ||
|
||
# Quickstart | ||
|
||
Head over to [the moccasin installation documentation](https://cyfrin.github.io/moccasin/installing-moccasin.html) to for other install methodologies and getting stated. | ||
|
||
|
||
```bash | ||
uv tool install moccasin | ||
``` | ||
|
||
# Documentation | ||
|
||
The documentation roughly attempts to follow [Diátaxis](https://diataxis.fr/). | ||
|
||
# Speed Comparisons | ||
|
||
*The following comparisions were done taking the `user` result from running the bash `time` command followed by the appropriote command on an M3 MacOS* | ||
*Compile command tested with a basic vyper counter contract on version 0.4.0 or 0.3.10 depending on compatibility* | ||
|
||
|
||
| Command | Moccasin | Brownie | Hardhat | Foundry | Ape | | ||
| ------- | -------- | ------- | ------- | ------- | ----- | | ||
| help | 0.03s | 0.37s | 0.30s | 0.01s | 2.55s | | ||
| init | 0.04s | 0.37s | xx | 0.20s | 5.08s | | ||
| compile | 0.49s | 0.42s | xx | 0.17s | 2.00s | | ||
|
||
|
||
# Acknowledgements | ||
|
||
- [brownie](https://github.com/eth-brownie/brownie) | ||
- [vyper](https://github.com/vyperlang/vyper) | ||
- [boa](https://github.com/vyperlang/titanoboa) | ||
|
||
## Background | ||
|
||
> Agkistrodon piscivorus is a species of venomous snake, a pit viper in the subfamily Crotalinae of the family Viperidae. The generic name is derived from the Greek words ἄγκιστρον agkistron "fish-hook, hook" and ὀδών odon "tooth", and the specific name comes from the Latin piscis 'fish' and voro '(I) eat greedily, devour'; thus, the scientific name translates to "hook-toothed fish-eater". Common names include cottonmouth, northern cottonmouth, water moccasin, swamp moccasin, black moccasin, and simply viper. |
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
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 |
---|---|---|
@@ -1,8 +1,8 @@ | ||
gab | ||
mox | ||
### | ||
|
||
.. argparse:: | ||
:module: gaboon_wrapper_for_docs | ||
:module: moccasin_wrapper_for_docs | ||
:func: get_main_parser | ||
:prog: gab | ||
:prog: mox | ||
|
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
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
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 |
---|---|---|
@@ -1,10 +1,10 @@ | ||
Console | ||
####### | ||
|
||
You can enter a python shell with the `console` command. This will start a python shell with the `gaboon` module loaded, so you can interact with your contracts directly. | ||
You can enter a python shell with the `console` command. This will start a python shell with the `moccasin` module loaded, so you can interact with your contracts directly. | ||
|
||
.. code-block:: bash | ||
gab console | ||
mox console | ||
Press `q` and hit `ENTER` to exit the 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 |
---|---|---|
|
@@ -2,7 +2,7 @@ Dependencies | |
############ | ||
|
||
|
||
Gaboon allows for working with either: | ||
Moccasin allows for working with either: | ||
|
||
- :ref:`Installing from GitHub repositories <installing_github_dependencies>` | ||
|
||
|
@@ -18,18 +18,18 @@ To install a package from GitHub, you can run the following: | |
|
||
.. code-block:: bash | ||
gab install ORG/REPO[@VERSION] | ||
mox install ORG/REPO[@VERSION] | ||
For example: | ||
|
||
.. code-block:: bash | ||
# Without a version | ||
gab install pcaversaccio/snekmate | ||
mox install pcaversaccio/snekmate | ||
# With a version | ||
gab install pcaversaccio/[email protected] | ||
mox install pcaversaccio/[email protected] | ||
This will create an entry in your `gaboon.toml` file that looks like this: | ||
This will create an entry in your `moccasin.toml` file that looks like this: | ||
|
||
.. code-block:: toml | ||
|
@@ -64,14 +64,14 @@ You can then use these packages in your vyper contracts, for example in an minia | |
Installing pip/PyPI Dependencies | ||
================================ | ||
|
||
Gaboon let's you directly install and work with PyPI packages as you would any other python package. PyPi dependencies in gaboon are by default powered by the `uv <https://docs.astral.sh/uv/>`_ tool. In order to use this, you need to have the `uv` tool installed. However, you can change this setting to `pip` in your `gaboon.tom`. | ||
Moccasin let's you directly install and work with PyPI packages as you would any other python package. PyPi dependencies in moccasin are by default powered by the `uv <https://docs.astral.sh/uv/>`_ tool. In order to use this, you need to have the `uv` tool installed. However, you can change this setting to `pip` in your `moccasin.tom`. | ||
|
||
.. code-block:: toml | ||
[project] | ||
installer = "pip" # change/add this setting | ||
As of today, `gaboon` supports: | ||
As of today, `moccasin` supports: | ||
|
||
- `pip` | ||
|
||
|
@@ -81,19 +81,19 @@ You can also directly install and work with PyPI packages as you would any other | |
|
||
.. code-block:: bash | ||
gab install PACKAGE | ||
mox install PACKAGE | ||
For example: | ||
|
||
.. code-block:: bash | ||
gab install snekmate | ||
mox install snekmate | ||
.. note:: | ||
|
||
Snekmate is both a `pypi <https://pypi.org/project/snekmate/>`_ and a GitHub package. | ||
|
||
This will create an entry in your `gaboon.toml` file that looks like this: | ||
This will create an entry in your `moccasin.toml` file that looks like this: | ||
|
||
.. code-block:: toml | ||
|
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
Oops, something went wrong.