Plugin for Ape Ethereum Framework for compiling Solidity contracts
Project description
Ape Solidity
Compile Solidity contracts.
Dependencies
- python3 version 3.6 or greater, python3-dev
Installation
via pip
You can install the latest release via pip
:
pip install ape-solidity
via setuptools
You can clone the repository and use setuptools
for the most up-to-date version:
git clone https://github.com/ApeWorX/ape-solidity.git
cd ape-solidity
python3 setup.py install
Quick Usage
In your project, make sure you have a contracts/
directory containing Solidity files (.sol
).
Then, while this plugin is installed, compile your contracts:
ape compile
The byte-code and ABI for your contracts should now exist in a __local__.json
file in a .build/
directory.
Dependency Mapping
To configure import remapping, use your project's ape-config.yaml
file:
solidity:
import_remapping:
- "@openzeppelin=path/to/open_zeppelin/contracts"
If you are using the dependencies:
key in your ape-config.yaml
, ape
can automatically
search those dependencies for the path.
dependencies:
open_zeppelin: OpenZeppelin/openzeppelin-contracts@4.4.0
solidity:
import_remapping:
- "@openzeppelin=open_zeppelin/contracts"
Once you have your dependencies configured, you can import packages using your import keys:
import "@openzeppelin/token/ERC721/ERC721.sol";
Development
This project is in development and should be considered a beta. Things might not be in their final state and breaking changes may occur. Comments, questions, criticisms and pull requests are welcomed.
License
This project is licensed under the Apache 2.0.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file ape-solidity-0.1.0b2.tar.gz
.
File metadata
- Download URL: ape-solidity-0.1.0b2.tar.gz
- Upload date:
- Size: 14.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6d004afa0d09c94dc2900499659b6fc8ed0d37e238f96cade6899a01afc9ca9e |
|
MD5 | 2cc4679d5c1a30e672515df71bf1967f |
|
BLAKE2b-256 | 6e7178fac891539049b759b7f345fba1d1c13045b9d964866af00d0e90541d36 |
File details
Details for the file ape_solidity-0.1.0b2-py3-none-any.whl
.
File metadata
- Download URL: ape_solidity-0.1.0b2-py3-none-any.whl
- Upload date:
- Size: 9.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cf8dd0d67dce692f3c69e9d39eeac5e5e094b99914c34890d8b7a26a9dbfad51 |
|
MD5 | f839df673b721a903b3e964bd4f1d646 |
|
BLAKE2b-256 | 1064aad9a545d13c432314e44ac918374bea33d01872af08c8dc9083e1789922 |