Skip to content

Commit

Permalink
chore: bump ape (#75)
Browse files Browse the repository at this point in the history
  • Loading branch information
antazoey authored Sep 9, 2022
1 parent f0c3df9 commit b49909d
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 22 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:

strategy:
matrix:
python-version: [3.7, 3.8, 3.9, '3.10']
python-version: [3.8, 3.9, '3.10']

steps:
- uses: actions/checkout@v2
Expand Down
13 changes: 2 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Ape Solidity
# Quick Start

Compile Solidity contracts.

## Dependencies

* [python3](https://www.python.org/downloads) version 3.7.2 or greater, python3-dev
* [python3](https://www.python.org/downloads) version 3.8 or greater, python3-dev

## Installation

Expand Down Expand Up @@ -85,12 +85,3 @@ for compiler_entry in manifest.compilers:
```

**NOTE**: These are the settings used during contract verification when using the [Etherscan plugin](https://github.com/ApeWorX/ape-etherscan).

## Development

Please see the [contributing guide](CONTRIBUTING.md) to learn more how to contribute to this project.
Comments, questions, criticisms and pull requests are welcomed.

## License

This project is licensed under the [Apache 2.0](LICENSE).
6 changes: 2 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,13 @@
url="https://github.com/ApeWorX/ape-solidity",
include_package_data=True,
install_requires=[
"importlib-metadata ; python_version<'3.8'",
"py-solc-x>=1.1.0,<2",
"eth-ape>=0.4.5,<0.5.0",
"eth-ape>=0.5.0,<0.6",
"ethpm-types", # Use the version ape requires
"packaging", # Use the version ape requires
"requests",
],
python_requires=">=3.7.2,<4",
python_requires=">=3.8,<4",
extras_require=extras_require,
py_modules=["ape_solidity"],
license="Apache-2.0",
Expand All @@ -83,7 +82,6 @@
"Operating System :: MacOS",
"Operating System :: POSIX",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
Expand Down
13 changes: 7 additions & 6 deletions tests/test_compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,20 +189,21 @@ def test_get_version_map_raises_on_non_solidity_sources(compiler, vyper_source_p

def test_compiler_data_in_manifest(project):
manifest = project.extract_manifest()
compilers = manifest.compilers
compilers = [c for c in manifest.compilers if c.name == "solidity"]
latest_version = max(c.version for c in compilers)

compiler_0816 = [c for c in compilers if str(c.version) == "0.8.16+commit.07a7930e"][0]
compiler_latest = [c for c in compilers if str(c.version) == latest_version][0]
compiler_0812 = [c for c in compilers if str(c.version) == "0.8.12+commit.f00d7308"][0]
compiler_0612 = [c for c in compilers if str(c.version) == "0.6.12+commit.27d51765"][0]
compiler_0426 = [c for c in compilers if str(c.version) == "0.4.26+commit.4563c3fc"][0]

# Compiler name test
for compiler in (compiler_0816, compiler_0812, compiler_0612, compiler_0426):
for compiler in (compiler_latest, compiler_0812, compiler_0612, compiler_0426):
assert compiler.name == "solidity"

# Compiler settings test
expected_optimizer = {"enabled": True, "runs": 200}
assert compiler_0816.settings["optimizer"] == expected_optimizer
assert compiler_latest.settings["optimizer"] == expected_optimizer
assert compiler_0812.settings["optimizer"] == expected_optimizer
assert compiler_0612.settings["optimizer"] == expected_optimizer
assert compiler_0426.settings["optimizer"] == expected_optimizer
Expand All @@ -218,7 +219,7 @@ def test_compiler_data_in_manifest(project):
"@brownie=.cache/BrownieDependency/local",
"@dependency_remapping=.cache/TestDependencyOfDependency/local",
}
assert compiler_0816.settings["remappings"] == expected_remappings
assert compiler_latest.settings["remappings"] == expected_remappings
# 0.4.26 should have absolute paths here due to lack of base_path
assert (
f"@remapping/contracts={project.contracts_folder}/{common_suffix}"
Expand Down Expand Up @@ -253,7 +254,7 @@ def test_get_versions(compiler, project):
versions = compiler.get_versions(project.source_paths)
assert versions == {
"0.8.14",
"0.8.16",
"0.8.17",
"0.6.12",
"0.4.26",
"0.5.16",
Expand Down

0 comments on commit b49909d

Please sign in to comment.