-
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.
* fix: zksync compile issues, python path oddities, new boa changes * fix: manifest named for when the DB isnt populated, and updated docs * fix: lint
- Loading branch information
1 parent
2d0f529
commit 29214c1
Showing
22 changed files
with
96 additions
and
64 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
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 |
---|---|---|
|
@@ -41,7 +41,7 @@ This will create an entry in your ``moccasin.toml`` file that looks like this: | |
"pcaversaccio/[email protected]", | ||
] | ||
Which follows the same syntax that `pip` and `uv` to do installs from GitHub repositories. This will also download the GitHub repository into your `lib` folder. | ||
Which follows the same syntax that ``pip`` and ``uv`` to do installs from GitHub repositories. This will also download the GitHub repository into your ``lib`` folder. | ||
|
||
You can then use these packages in your vyper contracts, for example in an miniaml ERC20 vyper contract: | ||
|
||
|
@@ -60,7 +60,7 @@ You can then use these packages in your vyper contracts, for example in an minia | |
erc20.__init__("my_token", "MT", 18, "my_token_dapp", "0x02") | ||
ow.__init__() | ||
``moccasin`` is smart enough to know that the `lib/github` and `lib/pypi` folders are part of the search path, but you can also explicitly add your dependencies. | ||
``moccasin`` is smart enough to know that the ``lib/github`` and ``lib/pypi`` folders are part of the search path, but you can also explicitly add your dependencies. | ||
|
||
.. code-block:: python | ||
|
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
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
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
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
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,22 +1,22 @@ | ||
[project] | ||
name = "moccasin" | ||
version = "0.3.4b4" | ||
version = "0.3.4b5" | ||
description = "Pythonic smart contract development framework using Titanoboa" | ||
authors = [ | ||
{ name = "PatrickAlphac", email = "[email protected]" }, | ||
{ name = "charles-cooper", email = "[email protected]" }, | ||
] | ||
dependencies = [ | ||
"titanoboa>=v0.2.5b1", | ||
"titanoboa>=v0.2.5", | ||
"python-dotenv>=1.0.1", | ||
"titanoboa-zksync>=0.2.7", | ||
"titanoboa-zksync>=0.2.8", | ||
"tqdm>=4.66.5", | ||
"tomlkit>=0.13.2", # For preserving comments when writing to toml | ||
"tomlkit>=0.13.2", # For preserving comments when writing to toml | ||
"tomli-w>=1.0.0", | ||
"pytest-cov>=5.0.0", | ||
"uv>=0.4.15", | ||
"pytest-xdist>=3.6.1", | ||
"vyper==0.4.0", # We will want to get rid of this hard-coded dependency in 0.3.4 of moccasin | ||
"vyper==0.4.0", # We will want to get rid of this hard-coded dependency in 0.3.4 of moccasin | ||
] | ||
readme = "README.md" | ||
requires-python = ">= 3.11, <= 3.13" | ||
|
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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import os | ||
import subprocess | ||
from pathlib import Path | ||
|
||
from moccasin.commands.inspect import inspect_contract | ||
|
||
|
||
def test_inspect_layout_imports(mox_path, installation_project_config, installation_temp_path): | ||
current_dir = Path.cwd() | ||
try: | ||
os.chdir(current_dir.joinpath(installation_temp_path)) | ||
result = subprocess.run( | ||
[mox_path, "install"], check=True, capture_output=True, text=True | ||
) | ||
result = inspect_contract("MyToken", "storage_layout", print_out=False) | ||
finally: | ||
os.chdir(current_dir) | ||
layout = result["storage_layout"] | ||
# Spot check | ||
assert layout["ow"]["owner"] == {'type': 'address', 'n_slots': 1, 'slot': 0} | ||
assert layout["erc20"]["balanceOf"] == {'type': 'HashMap[address, uint256]', 'n_slots': 1, 'slot': 1} |
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
Oops, something went wrong.