Ape is a framework for Web3 Python applications and smart contracts, with advanced functionality for testing, deployment, and on-chain interactions.

Overview

Ape Framework

Ape is a framework for Web3 Python applications and smart contracts, with advanced functionality for testing, deployment, and on-chain interactions.

Dependencies

  • python3 version 3.7 or greater, python3-dev

Installation

via pip

You can install the latest release via pip:

pip install eth-ape

via setuptools

You can clone the repository and use setuptools for the most up-to-date version:

git clone https://github.com/ApeWorX/ape.git
cd ape
python3 setup.py install

via docker

Please visit our Dockerhub for more details on using Ape with Docker.

example commands:

compiling:

docker run \
--volume $HOME/.ape:/root/.ape \
--volume $HOME/.vvm:/root/.vvm \
--volume $HOME/.solcx:/root/.solcx \
--volume $PWD:/root/project \
--workdir /root/project \
apeworx/ape compile

running the ape console:

docker run -it \
--volume $HOME/.ape:/root/.ape \
--volume $HOME/.vvm:/root/.vvm \
--volume $HOME/.solcx:/root/.solcx \
--volume $PWD:/root/project \
--workdir /root/project \
apeworx/ape console

Quick Usage

Ape is primarily meant to be used as a command line tool. Here are some things you can use ape to do:

# Work with your accounts
$ ape accounts list

# Compile your project's smart contracts
$ ape compile --size

# Run your tests with pytest
$ ape test -k test_only_one_thing --coverage --gas

# Connect an IPython session through your favorite provider
$ ape console --network ethereum:mainnet:infura

# Add new plugins to ape
$ ape plugins add plugin-name

Ape also works as a package. You can use the same networks, accounts, and projects from the ape package as you can in the cli:

# Work with registered networks, providers, and blockchain ecosystems (like Ethereum)
from ape import networks
with networks.ethereum.mainnet.use_provider("infura"):
    ...  # Work with the infura provider here

# Work with test accounts, local accounts, and (WIP) popular hardware wallets
from ape import accounts
a = accounts[0]  # Load by index
a = accounts["example.eth"]  # or load by ENS/address
a = accounts.load("alias") # or load by alias

# Work with contract types
from ape import project
c = a.deploy(project.MyContract, ...)
c.viewThis()  # Make Web3 calls
c.doThat({"from": a})  # Make Web3 transactions
assert c.MyEvent[-1].caller == a  # Search through Web3 events

Development

This project is in early development and should be considered an alpha. Things might not work, breaking changes are likely. Comments, questions, criticisms and pull requests are welcomed.

Documentation

To build docs:

python build_docs.py  # build docs in docs/_build
python build_docs.py --rsync=/tmp/ape  # for serving up docs in development

License

This project is licensed under the Apache 2.0.

Comments
  • feat: added ape cache plugin

    feat: added ape cache plugin

    What I did

    Added CacheQueryProvider to ape cache and created initial database structure and methods to instantiate an sqlite database for caching provider data.

    fixes: #632

    How I did it

    created cli and added init, purge and query functions

    How to verify it

    I used the infura plugin

    ape plugins install infura
    

    Then instantiate the caching database

    ape cache init --network ethereum:mainnet:infura
    ape console --network ethereum:mainnet:infura
    

    Run this multiple times:

    In [1]: chain.blocks.query("number", start_block=0, stop_block=100)
    

    You should see that the query occurs quicker after the first call. This will take a few seconds to grab the data from the provider

    Also run transaction calls multiple times:

    In [2]: chain.blocks[-2].transactions
    

    You should see that the query is quicker after the first call. That block number can change, so you may not see it after the first attempt. But you will have DynamicTransactionAPI datatypes in the return if it comes from the provider. You will just receive a dictionary if it comes from the database.

    Then exit the IPython kernel And run the below commands

    ape cache query --network ethereum:mainnet:infura "SELECT *  FROM blocks"
    ape cache query --network ethereum:mainnet:infura "SELECT * FROM transactions"
    

    Both should return data from the database.

    Also run pytests

    Checklist

    • [x] All changes are completed
    • [x] New test cases have been added
    • [x] Documentation has been updated
    opened by johnson2427 42
  • feat: Add dockerfile for automated builds to dockerhub

    feat: Add dockerfile for automated builds to dockerhub

    What I did

    added dockerfile and updated readme to include information about dockerhub

    fixes: #

    How I did it

    added dockerfile updated readme

    How to verify it

    we will verify it in the integration

    Checklist

    • [x] Passes all linting checks (pre-commit and CI jobs)
    • [x] ~~New test cases have been added and are passing~~
    • [x] Documentation has been updated
    • [x] PR title follows Conventional Commit standard (will be automatically included in the changelog)
    opened by sabotagebeats 31
  • feat!: allow transaction raise on fail

    feat!: allow transaction raise on fail

    What I did

    Begin adding in parameters to facilitate explicitly raising on transaction failure. We'll need transactions that fail to deliberately raise an exception for RevertsContextManager. That functionality is a dependency for the tracing ticket #251.

    How I did it

    Adding raise_on_fail: bool parameter to the following:

    • ReceiptAPI.await_confirmations() (default False)
    • ProviderAPI.get_receipt() (default False)
    • ProviderAPI.send_transaction() (default True)
    • AccountAPI.call() (default True)
    • ImpersonatedAccount.call() (default True)
    • Web3Provider.send_transaction() (default True)
    • ContractTransaction.__call__() (default True)
    • LocalProvider.send_transaction() (default True)

    How to verify it

    Added a test against flipping this parameter when calling the contract function to ensure that the transaction causes an exception rather than just returning a failed receipt

    Checklist

    • [x] All changes are completed
    • [x] New test cases have been added
    • [x] Documentation has been updated
    opened by helloibis 28
  • Docker Startup Error: `AttributeError: module 'rlp' has no attribute 'Serializable'`

    Docker Startup Error: `AttributeError: module 'rlp' has no attribute 'Serializable'`

    Literally followed the instructions for docker installation verbatim, and recieved the error: AttributeError: module 'rlp' has no attribute 'Serializable'. Attached to the tty, and ran the command pip3 install eth-ape[recommended-plugins] AND pip3 install -U eth-ape[recommended-plugins] everything came up installed both times. Looked for more documentation on performing a docker installation, and found the same information contained in the README.md. Kinda lost as to what to do now.

    I will try to remember to return later and provide the full output.

    category: bug size: 3 pieces 
    opened by anoduck 18
  • feat: console extras

    feat: console extras

    What I did

    Added the ability for a user to add a Python script (ape_console_extras.py) to their project directory (or their global .ape directory) to provide often used vars and utilities upon launch of the console.

    How I did it

    Using Python's importlib's SourceFileLoader it loads a module, includes it's non-private symbols in the IPython namespace. If a function named ape_init_extras() exists, it will execute it given the namespace symbols as kwargs created for the console so far.

    How to verify it

    [I'm not sure what this section means]

    Checklist

    • [x] All changes are completed
    • [x] New test cases have been added
    • [x] Documentation has been updated
    opened by mikeshultz 17
  • Caching: Deployment Map

    Caching: Deployment Map

    Overview

    It is a bit of hurdle trying to figure out how to manage and share deployment addresses for projects. This way, we can run automations from team-mate to team-mate.

    Specification

    Similar to this feature in brownie: https://eth-brownie.readthedocs.io/en/stable/deploy.html#the-deployment-map

    For sharing, maybe we could have config items automatically populate the deployment map. (Does brownie do this?)

    Dependencies

    Include links to any open issues that must be resolved before this feature can be implemented.

    category: feature size: 2 pieces 
    opened by unparalleled-js 17
  • CLI_PLUGINS doesn't include accounts

    CLI_PLUGINS doesn't include accounts

    Environment information

    Ubuntu 20.04

    • ape and plugin versions:

    version = '0.1.0a2'

    $ ape --version

    Traceback (most recent call last):
      File "/home/shredder/.v/apeworx/bin/ape", line 8, in <module>
        sys.exit(cli())
      File "/home/shredder/.v/apeworx/lib/python3.10/site-packages/click/core.py", line 1128, in __call__
        return self.main(*args, **kwargs)
      File "/home/shredder/.v/apeworx/lib/python3.10/site-packages/click/core.py", line 1052, in main
        with self.make_context(prog_name, args, **extra) as ctx:
      File "/home/shredder/.v/apeworx/lib/python3.10/site-packages/click/core.py", line 914, in make_context
        self.parse_args(ctx, args)
      File "/home/shredder/.v/apeworx/lib/python3.10/site-packages/click/core.py", line 1615, in parse_args
        rest = super().parse_args(ctx, args)
      File "/home/shredder/.v/apeworx/lib/python3.10/site-packages/click/core.py", line 1370, in parse_args
        value, args = param.handle_parse_result(ctx, opts, args)
      File "/home/shredder/.v/apeworx/lib/python3.10/site-packages/click/core.py", line 2347, in handle_parse_result
        value = self.process_value(ctx, value)
      File "/home/shredder/.v/apeworx/lib/python3.10/site-packages/click/core.py", line 2309, in process_value
        value = self.callback(ctx, self, value)
      File "/home/shredder/.v/apeworx/lib/python3.10/site-packages/click/decorators.py", line 380, in callback
        raise RuntimeError(
    RuntimeError: 'ape' is not installed. Try passing 'package_name' instead.
    

    $ ape plugins list KeyError: 'plugins'

    • Python Version: 3.10.1
    • OS: linux

    What went wrong?

    Please include information like:

    • what command you ran ape accounts list

    How can it be fixed?

    I have inserted a breakpoint just before the failing line this is what comes up when I run dir(CLI_PLUGINS)

    > /home/shredder/.v/apeworx/lib/python3.10/site-packages/ape/_cli/__init__.py(25)get_command()
    -> return CLI_PLUGINS[name]()
    (Pdb) dir(CLI_PLUGINS)
    ['__class__', '__class_getitem__', '__contains__', '__delattr__', '__delitem__', '__dict__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__getitem__', '__gt__', '__hash__', '__init__', '__init_subclass__', '__ior__', '__iter__', '__le__', '__len__', '__lt__', '__ne__', '__new__', '__or__', '__reduce__', '__reduce_ex__', '__repr__', '__reversed__', '__ror__', '__setattr__', '__setitem__', '__sizeof__', '__str__', '__subclasshook__', 'clear', 'copy', 'fromkeys', 'get', 'items', 'keys', 'move_to_end', 'pop', 'popitem', 'setdefault', 'update', 'values']
    

    As can be seen from the above, there is no accounts or plugins or any cli commands for that matter.

    category: bug 
    opened by nazariyv 16
  • fix: `utils.abi.parse_type()` bug

    fix: `utils.abi.parse_type()` bug

    What I did

    Removed the previous parse_type and implemented one that takes the dict form of ABIType to produce the same format output that previous parse_type was producing, but bug free and more reliably.

    fixes: #1122

    How I did it

    Twitter thread.

    How to verify it

    Ape didn't have a proper test for this. There is tests/functional/utils/test_abi.py but it doesn't really test the validity. It more so tests that parse_type simply parses the regex generated type strings. I would be happy to write the tests for this, but my environment is throwing me an error when I try to run python -m pytest .:

    Traceback (most recent call last):
      File "/home/shredder/git/w/ape/venv/bin/ape", line 5, in <module>
        from ape._cli import cli
      File "/home/shredder/git/w/ape/src/ape/__init__.py", line 7, in <module>
        from ape.managers.project import ProjectManager as Project
      File "/home/shredder/git/w/ape/src/ape/managers/__init__.py", line 3, in <module>
        from ape.plugins import PluginManager
      File "/home/shredder/git/w/ape/src/ape/plugins/__init__.py", line 10, in <module>
        from .account import AccountPlugin
      File "/home/shredder/git/w/ape/src/ape/plugins/account.py", line 3, in <module>
        from ape.api.accounts import AccountAPI, AccountContainerAPI
      File "/home/shredder/git/w/ape/src/ape/api/__init__.py", line 1, in <module>
        from .accounts import (
      File "/home/shredder/git/w/ape/src/ape/api/accounts.py", line 8, in <module>
        from ape.api.address import BaseAddress
      File "/home/shredder/git/w/ape/src/ape/api/address.py", line 4, in <module>
        from ape.types import AddressType
      File "/home/shredder/git/w/ape/src/ape/types/__init__.py", line 24, in <module>
        from ape.utils.misc import to_int
      File "/home/shredder/git/w/ape/src/ape/utils/__init__.py", line 20, in <module>
        from ape.utils.github import GithubClient, github_client
      File "/home/shredder/git/w/ape/src/ape/utils/github.py", line 10, in <module>
        import pygit2  # type: ignore
      File "/home/shredder/git/w/ape/venv/lib/python3.10/site-packages/pygit2/__init__.py", line 30, in <module>
        from ._pygit2 import *
    ImportError: libssl-9ad06800.so.1.1.1k: cannot open shared object file: No such file or directory
    

    However, when I run this modified ape on the seaport transaction that was reverting. Everything is fine and it works. Here is the reproducible example of the bug before this fix. Feel free to use it to verify that this PR works.

    #!/usr/bin/env python
    import os
    from ape import networks, Contract
    
    etherscan_api_key = ''
    if not etherscan_api_key:
        raise Exception("you must set ETHERSCAN_API_KEY")
    
    context = networks.parse_network_choice('ethereum:mainnet:geth')
    context.__enter__()
    receipt = networks.provider.get_receipt('0x998f1810cc06f7c0aa3a6094082278e882a53a35a57a4f1094213ec78ca45931')
    receipt.show_trace()
    

    I have not verified this solution on outputs.

    Checklist

    • [ ] All changes are completed
    • [ ] New test cases have been added
    • [ ] Documentation has been updated
    opened by nazariyv 13
  • feat!: support decoding multiple ABIs at the same time, including ds-note library logs

    feat!: support decoding multiple ABIs at the same time, including ds-note library logs

    What I did

    • if no abi is provided to Receipt.decode_logs, it would fetch all contract types that have emitted logs and decode all events. undecoded logs are returned as is.
    • add decoding of ds-note which is commonly found in MakerDAO contracts

    How I did it

    added ds-note decoding to ecosystem api and added a fallback to it in the receipt api. this is very cheap, it can deduce whether it's a note from byte padding in the topic before fetching any contract types. then it finds a function which matches the selector and decodes the data based on the function abi.

    How to verify it

    list(chain.provider.get_transaction('0x460cb2476a7a0e8e1933d935a1c386851d5c007e957dbf9bd2e32a8494b38e9d').decode_logs())
    

    See also my similar pull request in brownie.

    Checklist

    • [x] All changes are completed
    • [x] New test cases have been added
    • [x] Documentation has been updated
    opened by banteg 13
  • Plugins: Add `QueryAPI` plugin types

    Plugins: Add `QueryAPI` plugin types

    Elevator pitch:

    We want to add queries to ape, but need an abstraction for different query engines (e.g. brute force, sqlite, posgres, mongodb, etc.) to perform those queries

    Value:

    Data workflows including Querying: work items

    Dependencies:

    Pydantic Refactor: #126

    Design approach:

    class QueryAPI(APIDefinition):
        chain: ChainManager  # access to `active_provider`, `blocks` and other chain properties for performing queries
        config: ConfigItem  # Including DB connection info
    
        @apimethod
        def can_execute(query: QueryRequest) -> bool:
            """
            Returns True if this plugin can perform the given query.
            """
    
        @apimethod
        def execute(query: QueryRequest) -> QueryResult:
            """
            Run query and return the results
            """
    

    where QueryRequest contains an abstracted query using raw/ape.api/ape.types types (e.g. BlockAPI, TransactionAPI), and QueryResult contains a dataset (using numpy ndarray types, etc.) and query properties (for joining queries, etc.)

    NOTE: QueryResult can perhaps be lazily-generated, so that when merged with other queries to form more complex queries, they can be performed more efficiently than brute force. (Perhaps QueryRequest is a proper subset of QueryResult?)

    NOTE: QueryRequest and QueryResult can use existing Python abstractions around these types of workflows, such as SQLAlchemy, PyTorch, etc. Whatever is the best solution here.

    NOTE: Allow config to specify which QueryAPI classes to use to perform queries

    TODO: Do we need a QueryManager object to manage the plugins?

    Task list:

    • [ ] Research numpy and query libraries like SQLAlchemy, especially in relationship to Pydantic
    • [ ] Implement "brute force" plugin in ape core, which simply performs any relevant queries with calls to active_provider and in-memory handling (will be default for "real-time" queries that might take place over new blocks)
    • [ ] Implement sqlite 2nd party plugin to perform queries using on-disk sqlite db.
    • [ ] Research postgres 2nd party plugin to perform queries using local and/or remote postgres db
    • [ ] Research Vulcanize and/or TrueBlocks 2nd/3rd party plugins

    Estimated completion date:

    Feb 4th, 2021

    Design review:

    Reviewers: @evanblank3 @unparalleled-js

    Do not signoff unless:

      1. agreed the tasks and design approach will achieve acceptance, and
      1. the work can be completed by one person within the SLA. Design reviewers should consider simpler approaches to achieve goals.

    (Please leave a comment to sign off)

    category: feature size: 3 pieces 
    opened by fubuloubu 13
  • Sign: [y/N]: after first signed tx, this message doesn't react on N

    Sign: [y/N]: after first signed tx, this message doesn't react on N

    Environment information

    • OS: macOS
    • Python Version: x.x.x
    • ape and plugin versions: 0.2.1
    $ ape --version
    0.2.1
    
    $ ape plugins list
    ape-infura 0.2.0
    ape-vyper 0.2.0
    ape-etherscan 0.2.0
    
    • Contents of your ape-config.yaml (NOTE: do not post anything private like RPC urls or secrets!):
    $ cat ape-config.yaml
    contracts_folder: contracts
    

    What went wrong?

    Well, I use APE on testnet to generate a bunch of data for my web interface. With old version (I'm not sure what exactly version I have, maybe 1.5 or maybe 1.6) I ran with command ape run deploy_testing --network ethereum:rinkeby:infura I signed the first tx:

    Sign:  [y/N]: y
    Enter passphrase to unlock 'trader03' []: 
    Leave 'trader03' unlocked? [y/N]: y
    

    After that I just leave unlocked account and wait when script will done.

    Well, I decided to rewrite some test from Brownie to APE and check how it will going. I installed ape-hardhat through PyCharm Python Interpreter. As I understood APE updated too automatically.

    If the script has:

        owner = accounts.load("trader03")
        owner.set_autosign(True)
    

    I hasn't any problems. But if delete these strings and continue to Sign Tx with hands when the next message appear:

    Sign: [y/N]: 
    

    it will react only positive, so if I type y,Y,n,N, or tap on ENTER, the result will be always Yes.

    How to reproduce:

    token: https://github.com/vyperlang/vyper/blob/master/examples/tokens/ERC20.vy

    deploy_testing.py:

    from ape import project
    from ape import accounts
    
    class InitToken(object):
    
        def load_accs(self, type):
            acc = accounts.load("trader03")
    
            if type > 0:
              acc.set_autosign(True)
    
            return acc1
    
        def create_token(self, name, symbol, decimals, supply,  owner):
            token = owner.deploy(project.Token, name, symbol, decimals, supply)
            return token
    
        def token_approve(self, token, receiver, amount, sender):
            return token.approve(receiver, int(amount), sender=sender)
    
    random_addr = 0xDf032Bc4B9dC2782Bb09352007D4C57B75160B15
    ### works fine with set_autosign
    deploy = InitToken()
    
    main_account = deploy.load_accs(1)
    main_token = start_deploy.create_token("NAME", "SMBL", main_account)
    deploy.token_approve(main_token, random_addr, 1e18, main_account)
    
    
    ### check Sing Tx without set_autosign and type N
    deploy = InitToken()
    main_account = deploy.load_accs(0)
    main_token = start_deploy.create_token("NAME", "SMBL", main_account)
    deploy.token_approve(main_token, random_addr, 1e18, main_account)
    deploy.token_approve(main_token, random_addr, 1e18, main_account)
    deploy.token_approve(main_token, random_addr, 1e18, main_account)
    
    

    NOTE: First tx I signed and leave account open.

    Sign:  [y/N]: y
    Enter passphrase to unlock 'trader03' []: 
    Leave 'trader03' unlocked? [y/N]: y
    

    if account is locked, then everything works fine.

    Please include information like:

    • what command you ran
    • the code that caused the failure (see this link for help with formatting code)
    • full output of the error you received

    How can it be fixed?

    Fill this in if you have ideas on how the bug could be fixed.

    category: bug status: blocked 
    opened by SwapOperator 12
  • feat: change address arg to addressType

    feat: change address arg to addressType

    What I did

    changed the address arg to an AddressType

    made a test for it

    fixes: #Ape-368

    How I did it

    How to verify it

    Checklist

    • [ ] All changes are completed
    • [ ] New test cases have been added
    • [ ] Documentation has been updated
    opened by Ninjagod1251 0
  • feat: rename account history

    feat: rename account history

    What I did

    changed all account_history to transaction history and passed the OG test

    fixes: #ape-304

    How I did it

    How to verify it

    Checklist

    • [ ] All changes are completed
    • [ ] New test cases have been added
    • [ ] Documentation has been updated
    opened by Ninjagod1251 0
  • feat!: Make OutOfGasError a VirtualMachineError

    feat!: Make OutOfGasError a VirtualMachineError

    What I did

    fixes: Ape-369

    fixes: APE-369 change the base class of outofgas to virtualmachineError

    How I did it

    How to verify it

    Checklist

    • [x] All changes are completed
    • [ ] New test cases have been added
    • [ ] Documentation has been updated
    opened by Ninjagod1251 2
  • fix: except `AttributeError` when checking for account

    fix: except `AttributeError` when checking for account

    What I did

    Noticed a weird bug where if you have accounts and ecosystems in the same plugin and the plugin fails verification, you get an account AttributeError about the ecosystem. A simple fix to except AttributeError. This helps the core tests pass before Starknet is updated in the case where the Starknet plugin is installed locally.

    fixes: #

    How I did it

    Except AttributeError in account checker.

    How to verify it

    tests/functional/test_accounts.py::test_accounts_contains PASSs when the Starknet plugin fails plugin verification and is installed locally.

    Checklist

    • [ ] All changes are completed
    • [ ] New test cases have been added
    • [ ] Documentation has been updated
    opened by unparalleled-js 0
  • Error while installing eth-ape'[recommended plugin]'

    Error while installing eth-ape'[recommended plugin]'

    i ran pip install eth-ape'[recommended plugin]' and i am getting this error

    DEPRECATION: hidapi is being installed using the legacy 'setup.py install' method, because it does not have a 'pyproject.toml' and the 'wheel' package is not installed. pip 23.1 will enforce this behaviour change. A possible replacement is to enable the '--use-pep517' option. Discussion can be found at https://github.com/pypa/pip/issues/8559

    the i used the --use-pep517 flag and i ma still getting this error

    Building wheels for collected packages: hidapi, construct Building wheel for hidapi (pyproject.toml) ... error error: subprocess-exited-with-error

    × Building wheel for hidapi (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [21 lines of output] running bdist_wheel running build running build_ext cythoning hid.pyx to hid.c /tmp/pip-build-env-xtcmw0gv/normal/lib/python3.10/site-packages/Cython/Compiler/Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: /tmp/pip-install-1u_tx7ju/hidapi_1c91bbc490fb47c7af5c83be422ddcb1/hid.pyx tree = Parsing.p_module(s, pxd, full_module_name) cythoning hidraw.pyx to hidraw.c /tmp/pip-build-env-xtcmw0gv/normal/lib/python3.10/site-packages/Cython/Compiler/Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: /tmp/pip-install-1u_tx7ju/hidapi_1c91bbc490fb47c7af5c83be422ddcb1/hidraw.pyx tree = Parsing.p_module(s, pxd, full_module_name) building 'hid' extension creating build creating build/temp.linux-x86_64-cpython-310 creating build/temp.linux-x86_64-cpython-310/hidapi creating build/temp.linux-x86_64-cpython-310/hidapi/libusb x86_64-linux-gnu-gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -Ihidapi/hidapi -I/usr/include/libusb-1.0 -I/home/hp/Desktop/my_projects/My_Ape_Contract/Token_contract/venv/include -I/usr/include/python3.10 -c hid.c -o build/temp.linux-x86_64-cpython-310/hid.o x86_64-linux-gnu-gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -Ihidapi/hidapi -I/usr/include/libusb-1.0 -I/home/hp/Desktop/my_projects/My_Ape_Contract/Token_contract/venv/include -I/usr/include/python3.10 -c hidapi/libusb/hid.c -o build/temp.linux-x86_64-cpython-310/hidapi/libusb/hid.o hidapi/libusb/hid.c:47:10: fatal error: libusb.h: No such file or directory 47 | #include <libusb.h> | ^~~~~~~~~~ compilation terminated. error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1 [end of output]

    note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for hidapi Building wheel for construct (pyproject.toml) ... done Created wheel for construct: filename=construct-2.10.68-py3-none-any.whl size=59224 sha256=d675b26249db3be3aa32c32fd364431099bebbb02f19e171450b1bc3bfccbe08 Stored in directory: /home/hp/.cache/pip/wheels/ec/5e/ca/c78b06ea839091503020b0402a0f03372dd85963072222dd72 Successfully built construct Failed to build hidapi ERROR: Could not build wheels for hidapi, which is required to install pyproject.toml-based projects

    category: bug 
    opened by kenfelix 2
  • Contract using local library are not available in ProjectManager

    Contract using local library are not available in ProjectManager

    Environment information

    • Python Version: 3.8.10

    • OS: linux

    • ape and plugin versions:

    $ ape --version
    0.5.8
    
    $ ape plugins list
    Installed Plugins:
      ganache     0.5.0
      hardhat     0.5.4
      solidity    0.5.3
    
    
    • ape-config.yaml:
    name: ape-test
    

    What went wrong?

    Contract using library generate compilation warning WARNING: Libraries must be deployed and configured separately., does not show up on the bytecode size report (--size) and is not available in project fixture for testing.

    How to reproduce

    Contracts:

    MyContract.sol

    pragma solidity ^0.8.0;
    
    import "./MyLib.sol";
    
    contract MyContract {
    
        uint256 public value;
        function update(uint256 _value) public {
            value = MyLib.calculate(_value);
            //value = _value * _value;
        }
    }
    

    MyLib.sol

    pragma solidity ^0.8.0;
    
    library MyLib {
        function calculate(uint256 x) public pure returns(uint256) {
            return x * x;
        }
    }
    

    NoLibContract.sol

    pragma solidity ^0.8.0;
    
    contract NoLibContract {
    
        uint256 public value;
        function update(uint256 _value) public {
            value = _value + 1;
        }
    }
    
    

    Tests files:

    my_test.py

    import pytest
    
    @pytest.fixture
    def deploy_contract(accounts, project):
        accounts[0].deploy(project.MyLib)
        return accounts[0].deploy(project.MyContract)
    
    def test(deploy_contract, accounts):
        mycontract = deploy_contract
        assert mycontract.value() == 0
        mycontract.update(7, sender=accounts[0])
        assert mycontract.value() == 7 * 7
    

    nolib_test.py

    import pytest
    
    @pytest.fixture
    def deploy_contract(accounts, project):
        return accounts[0].deploy(project.NoLibContract)
    
    def test(deploy_contract, accounts):
        nolibcontract = deploy_contract
        assert nolibcontract.value() == 0
        nolibcontract.update(7, sender=accounts[0])
        assert nolibcontract.value() == 7 + 1
    

    Run ape compile --size -f

    INFO: Compiling 'NoLibContract.sol'.
    INFO: Compiling 'MyContract.sol'.
    INFO: Compiling 'MyLib.sol'.
    WARNING: Libraries must be deployed and configured separately.
    
    ============ Deployment Bytecode Sizes ============
      MyLib          -     277B  (1.13%)
      NoLibContract  -     261B  (1.06%)
    
    
    

    Run ape test -v SUCCESS

    platform linux -- Python 3.8.10, pytest-7.2.0, pluggy-1.0.0
    rootdir: /home/user/ape-test
    plugins: eth-ape-0.5.8, web3-6.0.0b7
    collected 2 items                                                                                                                                                                                                                                                                                                                                                    
    
    tests/my_test.py E                                                                                                                                                                                                                                                                                                                                             
    tests/nolib_test.py . 
    
    SUCCESS: Contract 'MyLib' deployed to: 0x274b028b03A250cA03644E6c578D81f019eE1323
    ERROR tests/my_test.py::test - AttributeError: ProjectManager has no attribute or contract named 'MyContract'.
    
    category: bug 
    opened by 0rtis 3
Releases(v0.5.9)
  • v0.5.9(Jan 5, 2023)

    Changes

    • fix: dependencies of dependencies @unparalleled-js (#1200)
    • chore: update github actions to latest versions @fubuloubu (#1206)
    • docs: update PyPI Links @fubuloubu (#1205)
    • fix: issue where poll_blocks() did not detect chain re-org @unparalleled-js (#1192)
    • docs: readme updates @Ninjagod1251 (#1161)
    • chore: make mdformat run number automatically @unparalleled-js (#1197)
    • fix: use cached path @unparalleled-js (#1196)
    • fix: remove description @NotPeopling2day (#1195)
    • fix: issue where compiled dependencies before their time @unparalleled-js (#1194)
    • chore: prevent multiple CI runs when using pushed branched @unparalleled-js (#1171)
    • docs: fix discord link @unparalleled-js (#1191)
    • docs: auto-formatter for markdown documentation @unparalleled-js (#1190)
    • chore: add stale PR action @NotPeopling2day (#1188)

    Special thanks to: @Ninjagod1251, @NotPeopling2day, @fubuloubu and @unparalleled-js

    Source code(tar.gz)
    Source code(zip)
  • v0.5.8(Dec 13, 2022)

    Changes

    • fix: allow Gnosis Safe style proxies to work with earlier deployments @fubuloubu (#1178)
    • fix: issues with dependencies of dependencies @unparalleled-js (#1183)
    • test: ape init @Ninjagod1251 (#1175)
    • refactor: use callTracer for geth style traces @unparalleled-js (#1177)
    • feat: allow setting balance if current provider supports it @fubuloubu (#1173)
    • fix: gas_limit of "auto" causes failure with unsupported providers @fubuloubu (#1180)
    • fix: send subprocess provider output to devnull when log level above DEBUG @unparalleled-js (#1172)
    • feat: ape accounts export <ALIAS> exports private key @sabotagebeats (#1170)
    • test: added testing for accounts generate seed phrase length @sabotagebeats (#1169)

    Special thanks to: @Ninjagod1251, @fubuloubu, @sabotagebeats and @unparalleled-js

    Source code(tar.gz)
    Source code(zip)
  • v0.5.7(Nov 30, 2022)

    Changes

    • feat: generate with mnemonic @sabotagebeats (#1165)
    • fix: issue where dependency contract type would not compile @unparalleled-js (#1168)
    • chore: changes from pyupgrade @unparalleled-js (#1163)
    • feat: import Account from Mnemonic @sabotagebeats (#1142)
    • feat: support regex in ape.reverts() @helloibis (#1162)
    • feat: Adding in a .gitignore file on ape initialization @Ninjagod1251 (#1159)
    • fix: change to http default in github clone for dependencies @unparalleled-js (#1153)
    • feat: don't compile dependencies @unparalleled-js (#1152)
    • docs: update CONTRIBUTING.md @eltociear (#1156)
    • fix: another issue where editable plugins would not install correctly @unparalleled-js (#1155)
    • fix: issue where directories with compiler extension in name would cause issues @unparalleled-js (#1147)
    • feat: improve error when contract type collision @unparalleled-js (#1150)
    • feat: configure global compiler ignore files @unparalleled-js (#1151)
    • fix: convert block_identifier to hex @gosuto-inzasheru (#1146)
    • test: replace reverts mocks with geth provider @unparalleled-js (#1149)

    Special thanks to: @Ninjagod1251, @eltociear, @gosuto-inzasheru, @helloibis, @sabotagebeats and @unparalleled-js

    Source code(tar.gz)
    Source code(zip)
  • v0.5.6(Nov 22, 2022)

    Changes

    • test: add reverts test documentation @helloibis (#1143)
    • fix: correct method name shown in error multi-event error message @unparalleled-js (#1144)
    • feat: add dev message support in ape.reverts (ape-vyper only) @helloibis (#1125)
    • chore: upgrade mypy to 0.9 range @unparalleled-js (#1139)
    • refactor: replace pygit2 with subprocess calls to git @unparalleled-js (#1141)
    • feat: support integer-type input values for AddressType @unparalleled-js (#1140)
    • fix: correct mypy type shed package @unparalleled-js (#1138)

    Special thanks to: @helloibis and @unparalleled-js

    Source code(tar.gz)
    Source code(zip)
  • v0.5.5(Nov 17, 2022)

    Changes

    • chore: remove pychain banner @NotPeopling2day (#1137)
    • chore: use setuptools types @unparalleled-js (#1135)
    • fix: add BaseTransacrtion.txn_hash type hint @helloibis (#1136)
    • docs: add more detail on interfaces @unparalleled-js (#1134)
    • feat: include view calls in gas report @unparalleled-js (#1131)
    • fix: issue where contract cache allowed non-checksum addresses @unparalleled-js (#1133)
    • chore: upgrade web3py dependency to 6.0.0b7 @unparalleled-js (#1130)
    • feat: Add set_code method to ProviderAPI @sabotagebeats (#1090)
    • perf: only check trace in tests if has a reason to @unparalleled-js (#1128)
    • fix: utils.abi.parse_type() bug @nazariyv (#1123)
    • feat: ability to interact with contracts by method string name @evmBrahmin (#1121)
    • feat: local geth provider _snapshot() and _revert() implementations @unparalleled-js (#1127)
    • test: run geth in tests @unparalleled-js (#1120)
    • fix: pass default contract type to proxy target @jmonteer (#1124)
    • fix: pin mypy to 0.982 @helloibis (#1126)

    Special thanks to: @NotPeopling2day, @evmBrahmin, @helloibis, @jmonteer, @nazariyv, @sabotagebeats and @unparalleled-js

    Source code(tar.gz)
    Source code(zip)
  • v0.5.4(Nov 2, 2022)

    Changes

    • refactor: simplify manager calls in tracer @unparalleled-js (#1117)
    • fix: include memory when using geth to get geth-style traces @unparalleled-js (#1116)
    • fix: issue preventing use of geth with non parity traces @unparalleled-js (#1115)
    • fix: issue with AddressAPI.__dir__() implementation and its base-classes @unparalleled-js (#1114)
    • feat: configure gas report, including skip files @unparalleled-js (#1111)
    • feat: add --watch flag to ape test (and associated options) @fubuloubu (#1105)

    Special thanks to: @fubuloubu and @unparalleled-js

    Source code(tar.gz)
    Source code(zip)
  • v0.5.3(Oct 27, 2022)

    Changes

    • docs: fix contrib doc building @NotPeopling2day (#1110)
    • docs: adding banner for Pychain 2022 conference @miohtama (#1096)
    • docs: fix typos from the developing-plugins guide @omahs (#1109)
    • fix: resolve typing issues found in pre-commit and upgrade lint dependencies @unparalleled-js (#1108)
    • fix: use sourceId rather than contractType name for error message @hhamud (#1107)
    • fix: regression @unparalleled-js (#1106)
    • feat: set local networks to max gas_limit @helloibis (#1097)
    • test: demonstrate transfer with send_everything=True and setting a very high gas @unparalleled-js (#1104)
    • test: isolate tests @unparalleled-js (#1103)
    • fix: issue where revert message missing when specify gas using EthTester @unparalleled-js (#1100)

    Special thanks to: @NotPeopling2day, @helloibis, @hhamud, @miohtama, @omahs and @unparalleled-js

    Source code(tar.gz)
    Source code(zip)
  • v0.5.2(Oct 12, 2022)

    Changes

    • fix: remove ropsten, kovan, and rinkeby @unparalleled-js (#1093)
    • fix: Improve error log when no tracing support during gas profile display in tests @unparalleled-js (#1094)
    • feat: add --gas flag to ape test command to output gas reports after tests @unparalleled-js (#1083)
    • feat: update error message when missing compilers @sabotagebeats (#1087)
    • docs: correct command ape --verbosity DEBUG run @hydroxyphthalimide (#1088)
    • fix: PluginInstallRequest object has no attribute requested_version @sabotagebeats (#1085)
    • fix: update web3 dependency @helloibis (#1082)
    • feat: adds chain.get_receipt() method @unparalleled-js (#1074)
    • feat: recover_signer() utility method in ape.types.signature @sabotagebeats (#1076)
    • fix: use python3 as pre-commit default language @helloibis (#1077)
    • feat: address more trace feedback @unparalleled-js (#1073)
    • feat: Add source_path property to ContractContainer @sabotagebeats (#1054)
    • feat: use minimal box @unparalleled-js (#1070)
    • feat: add supports_tracing() calculated property to ProviderAPI and Web3ProviderAPI @unparalleled-js (#1067)
    • refactor: use is_file() and is_dir() over exists() whenever makes sense @unparalleled-js (#1069)
    • fix: use get_repo cache in GithubClient when calling get_release() @unparalleled-js (#1066)
    • feat: custom exceptions for when block and transaction not found @unparalleled-js (#1065)
    • fix: round floats in gas report @unparalleled-js (#1063)
    • test: verify receiver on get_receipt() call @unparalleled-js (#1064)
    • test: prevent actually cloning repo in tests @unparalleled-js (#1061)
    • fix: strange error when getting logs from multiple addresses when addresses list empty @unparalleled-js (#1060)
    • feat: show gas reports from Ethereum transaction receipts @unparalleled-js (#1050)
    • fix: issues with getting transactions in a block @unparalleled-js (#1058)
    • chore: update gas limit type hints @helloibis (#1053)
    • fix: issue with caching local proxies @unparalleled-js (#837)
    • feat: add gas limit configuration @helloibis (#1009)
    • feat: allow custom plugin specification in Docker file and other Docker / plugin improvements @unparalleled-js (#1029)
    • fix: validate Ape has connected to the right network and client @fubuloubu (#1038)
    • fix: allow ecosystems to still load when default provider or network not found @unparalleled-js (#1049)
    • fix: properly calling receipt transaction objects in tests @johnson2427 (#1043)
    • test: fix flakey tests @unparalleled-js (#1048)
    • fix: broken url @wavey0x (#1047)

    Special thanks to: @fubuloubu, @helloibis, @hydroxyphthalimide, @johnson2427, @sabotagebeats, @unparalleled-js and @wavey0x

    Source code(tar.gz)
    Source code(zip)
  • v0.5.1(Sep 10, 2022)

  • v0.5.0(Sep 8, 2022)

    Breaking Changes

    • feat!: make ProviderAPI.is_connected() abstract @unparalleled-js (#1033) API update

    • refactor!: rename LogInputABICollection.data and .topics to .data_abi_types and .topic_abi_types @unparalleled-js (#1035) Clearer naming for expected return data

    • refactor!: rename ProviderAPI.get_transaction() to get_receipt() @unparalleled-js (#1037) This is to lessen the confusion of the return type being a ReceiptAPI and not a TransactionAPI

    • refactor!: remove python 3.7 range support @unparalleled-js (#1034) Updating to Python 3.8 or later

    • feat!: publish contracts to explorer @unparalleled-js (#1008) Adds new API method publish_contract() to ExplorerAPI and changes the type of contract address from str to AddressType

    • refactor!: optimize ReceiptAPI for better management of transaction data @johnson2427 (#1015) Removed transaction related properties from base ReceiptAPI and added transaction field to link TransactionAPI

    Changes

    • chore: pin evm-trace @NotPeopling2day (#1041)
    • test: ability to run subprocess tests @unparalleled-js (#1002)
    • refactor: Use AddressType instead of str when possible @unparalleled-js (#1039)
    • feat: support default=None for network option @unparalleled-js (#1028)
    • docs: update poll_logs example @fubuloubu (#1027)
    • feat: add return value @fubuloubu (#1018)
    • fix: check sender for already-cached receipt instead of address key @unparalleled-js (#1026)
    • feat: support querying properties of Blocks and Events @fubuloubu (#1017)
    • fix: ignore exceptions when given a contract type during instance_at / Contract @unparalleled-js (#1022)
    • refactor: make stdout-logger only log debug, not info @fubuloubu (#1024)
    • docs: update contracts user guide to include at() method reference @unparalleled-js (#1019)
    • chore: removed unused exception @NotPeopling2day (#1020)
    • fix: bug when cached sources contain deleted references @unparalleled-js (#1021)

    Special thanks to: @NotPeopling2day, @fubuloubu, @johnson2427 and @unparalleled-js

    Source code(tar.gz)
    Source code(zip)
  • v0.4.5(Aug 25, 2022)

    Changes

    • feat: add ape to console namespace @delaaxe (#1012)
    • chore: update draft comment @NotPeopling2day (#1014)
    • fix: handle another strange edition of editable plugin installations not registering @unparalleled-js (#1011)
    • fix: filter sources when passing to compiler methods @unparalleled-js (#1010)
    • chore: add CodeQL Analysis to Repo @fubuloubu (#1003)
    • fix: issue with decoding None block hashes @unparalleled-js (#1007)
    • fix: issue with editable plugins @unparalleled-js (#993)
    • feat: added ape cache plugin @johnson2427 (#680)

    Special thanks to: @NotPeopling2day, @delaaxe, @fubuloubu, @johnson2427 and @unparalleled-js

    Source code(tar.gz)
    Source code(zip)
  • v0.4.4(Aug 17, 2022)

    Changes

    • fix: issue with networks context when networks shared chain ID @unparalleled-js (#980)
    • feat: compiler settings @sabotagebeats (#979)
    • fix: issue where repr on test accounts manager was misleading @unparalleled-js (#981)
    • fix: update copy_on_model_validation expected value @unparalleled-js (#982)
    • feat: support nested array @yuntai (#976)
    • docs: better warning when multiple installation paths @unparalleled-js (#977)
    • fix: issue with editable installs of plugins @unparalleled-js (#978)
    • feat: required param in network option @unparalleled-js (#983)
    • fix: fix a broken link in the docs @folkyatina (#975)
    • test: use x-dist in tests @unparalleled-js (#974)

    Special thanks to: @folkyatina, @sabotagebeats, @unparalleled-js and @yuntai

    Source code(tar.gz)
    Source code(zip)
  • v0.4.3(Aug 12, 2022)

    Changes

    • docs: fix web3 link and doc web3 prop @unparalleled-js (#973)
    • fix: warning from using LegacyVersion @unparalleled-js (#971)
    • fix: bug where plugin config would not update when default was empty dict @unparalleled-js (#972)
    • test: ensure contract log str and repr work @unparalleled-js (#969)
    • fix: handle repr on network API when no connected @unparalleled-js (#968)
    • feat: track deployments @unparalleled-js (#961)
    • docs: document differing web3provider behavior @unparalleled-js (#966)
    • fix: the example scheme for networks @Ninjagod1251 (#963)

    Special thanks to: @Ninjagod1251 and @unparalleled-js

    Source code(tar.gz)
    Source code(zip)
  • v0.4.2(Aug 10, 2022)

  • v0.4.1(Aug 10, 2022)

    Changes

    • fix: issue where setting a config item would remove defaults of the other items @unparalleled-js (#958)
    • feat: add receipt / txn_hash to ContractInstance @unparalleled-js (#955)
    • test: update test_parse_type() regex @helloibis (#954)
    • chore: remove usage of deprecated eth-abi methods @unparalleled-js (#951)
    • fix: resolve pytest collection warning with TestAccountManager @unparalleled-js (#952)
    • refactor: change deployments_map contract type entries to be list of dicts instead of list of addresses @unparalleled-js (#940)
    • fix: issue where web3.py used the wrong chain ID for eth-tester @unparalleled-js (#943)
    • docs: add links to the reference page @challet (#934)
    • fix: add argument conversion to contract estimate gas API @unparalleled-js (#939)
    • fix: issue preventing provider context manager from switching in test fixtures @unparalleled-js (#933)
    • feat: compiler data in manifest @sabotagebeats (#871)
    • docs: remove non-existent CLI flag from README example @fubuloubu (#936)
    • feat: added contract event query to default query provider @johnson2427 (#923)
    • feat: support compiling contract type JSONs @unparalleled-js (#925)
    • test: make tests run better locally @unparalleled-js (#920)
    • fix: log printing and decoding @banteg (#924)
    • fix: prevent unnecessary API call when decoding events from ABI @unparalleled-js (#921)

    Special thanks to: @banteg, @challet, @fubuloubu, @helloibis, @johnson2427, @sabotagebeats and @unparalleled-js

    Source code(tar.gz)
    Source code(zip)
  • v0.4.0(Jul 27, 2022)

    Breaking Changes

    BREAKING CHANGES

    • feat!: support decoding multiple ABIs at the same time, including ds-note library logs @banteg (#757) This required the signature of the EcosystemAPI.decode_logs() method to change.

    • feat!: support per network defaults for txn acceptance timeout @unparalleled-js (#911) The transaction_acceptance_timeout config item was removed and replaced by network-specific configurations.

    • refactor!: change order of parameters in ape.cli.get_user_selected_account() @unparalleled-js (#894) Now, you place the message first instead of the AccountAPI sub-type.

    • refactor!: contract event querying revamp @unparalleled-js (#852) ContractLog objects now require log_index and transaction_index, and the field address was renamed to contract_address. Additionally, the signature to ProviderAPI.get_contract_logs() changed to support a class-based argument instead of individual arguments; this support allows for multiple contract addresses to be queried at once.

    • refactor!: move contract instance and container helper utilities to chain.contracts @unparalleled-js (#898) Before, each base model had methods create_contract() and create_contract_container(). Those have been removed in favor of methods in the ChainManager.contracts.instance_at() and ChainManager.contracts.get_container() instead.

    Changes

    • fix: custom config number of test accounts @NotPeopling2day (#918)
    • feat: adhoc network support @unparalleled-js (#913)
    • fix: issue where parity style traces did not work in ape-geth provider @banteg (#907)
    • test: add test for getting failed receipt @unparalleled-js (#910)
    • fix: handle more array situations @unparalleled-js (#909)
    • fix: fix for docker issue AttributeError: module 'rlp' has no attribute 'Serializable' @sabotagebeats (#891)
    • feat: get multiple contracts method in contract cache @unparalleled-js (#897)
    • test: put type decoding test in test_type module @unparalleled-js (#902)
    • test: ensure support for eip712 @unparalleled-js (#900)
    • feat: estimate fee support for calls @unparalleled-js (#888)
    • feat: support request kwargs in web3 provider API methods @unparalleled-js (#865)
    • fix: better handling of closing stream queues in SubprocessProvider @unparalleled-js (#889)
    • feat: add timeout kwarg on Web3provider.get_transaction in @unparalleled-js (#866)
    • fix: regressions with poll_logs @unparalleled-js (#860)
    • fix: bug where geth provider would not use URI from provider_settings dict @unparalleled-js (#886)
    • feat: stream traces in geth provider @banteg (#885)
    • test: include uncompiled contract types in tests' data directory for reference purposes. @unparalleled-js (#869)
    • feat: strip uri credentials from logs @banteg (#884)
    • fix: disable console history in tests @helloibis (#882)
    • fix: get_virtual_machine_error() message extract @helloibis (#877)
    • fix: grab results list from trace_transaction response @unparalleled-js (#863)
    • fix: issue where account would remain unlocked when disabling auto-sign @unparalleled-js (#859)
    • fix: detect contracts folder automatically when default in local dependencies @unparalleled-js (#861)
    • feat: contract deployment map caching @PatrickAlphaC (#856)
    • refactor: avoid attr dicts when making requests for tracing @unparalleled-js (#858)

    Special thanks to: @NotPeopling2day, @PatrickAlphaC, @banteg, @helloibis, @sabotagebeats and @unparalleled-js

    Source code(tar.gz)
    Source code(zip)
  • v0.3.5(Jul 3, 2022)

    Changes

    • feat: add networks fixture automatically to pytest integration @unparalleled-js (#835)
    • chore: remove empty CHANGELOG.md @helloibis (#851)
    • fix: issue where address values were not 0x prefixed in event query filters @banteg (#845)
    • feat: add set_balance test provider API @unparalleled-js (#823)
    • fix: issue where subprocess provider would crash in the background @unparalleled-js (#847)
    • fix: issue preventing importing local packages in ape console @unparalleled-js (#848)
    • chore: fix .md and small changes to docs @Ninjagod1251 (#815)
    • chore: update testing doc examples @helloibis (#840)
    • feat: support ENS domains when initializing contracts @unparalleled-js (#839)
    • fix: decode string type for events @banteg (#836)
    • fix: prevent TimestampConverter from accepting single integer strings @helloibis (#832)

    Special thanks to: @Ninjagod1251, @banteg, @helloibis and @unparalleled-js

    Source code(tar.gz)
    Source code(zip)
  • v0.3.4(Jun 25, 2022)

    Changes

    • chore: pin pandas-stubs to prevent infinite download issue @fubuloubu (#831)
    • feat: allow relative indexing block numbers in query @fubuloubu (#829)
    • refactor: use query manager for .query @fubuloubu (#830)
    • refactor: don't disconnect from ProviderAPI when using context manager @fubuloubu (#814)
    • feat: make default transaction type a function that can be overridden @pandadefi (#825)

    Special thanks to: @fubuloubu and @pandadefi

    Source code(tar.gz)
    Source code(zip)
  • v0.3.3(Jun 24, 2022)

  • v0.3.2(Jun 24, 2022)

    Changes

    • fix: set number of transactions @fubuloubu (#828)
    • feat: added pandas back to chain @johnson2427 (#824)
    • fix: cache default contract type argument in ape.Contract() @unparalleled-js (#820)

    Special thanks to: @fubuloubu, @johnson2427 and @unparalleled-js

    Source code(tar.gz)
    Source code(zip)
  • v0.3.1(Jun 20, 2022)

    Changes

    • fix: regression when using address converter @unparalleled-js (#819)
    • feat: handle snake_case parent block hash in BlockAPI @unparalleled-js (#817)
    • chore: update chain error message @NotPeopling2day (#812)
    • fix: make txn_hash a property in base API class @unparalleled-js (#816)
    • fix: issue where iterators using @cached_iterator would be shared between classes @unparalleled-js (#811)

    Special thanks to: @NotPeopling2day and @unparalleled-js

    Source code(tar.gz)
    Source code(zip)
  • v0.3.0(Jun 16, 2022)

    Changes

    • refactor: Renamed start and stop to start_block and stop_block respectively in poll_logs to distinguish between range() parameter behavior (#810)
    • refactor: Change -i flag to -I in run command to mimic -I in test command (#810)
    • refactor: Rename sources to source_paths in ProjectManager (#810)
    • chore: upgrade pytest @unparalleled-js (#694)
    • refactor!: BlockAPI and TransactionAPI for caching system @johnson2427 (#705)
    • feat: show_trace() method on ReceiptAPI @unparalleled-js (#746)
    • feat: better estimate fee support @unparalleled-js (#801)
    • feat: Adding packagemeta to config and project manager @sabotagebeats (#802)
    • feat!: add access list transaction type, add transaction api txn_hash, fix block transaction query @banteg (#800)
    • feat!: make get_transactions_by_block an abstractmethod @unparalleled-js (#791)
    • docs: link repair, misc cleanup @marcgarreau (#808)
    • feat: proxy info disk cache @banteg (#805)
    • feat: create API method for getting call tree node @unparalleled-js (#798)
    • feat: support having more than one event with same name @unparalleled-js (#797)
    • feat: custom not implemented exception @unparalleled-js (#795)

    Special thanks to: @banteg, @johnson2427, @marcgarreau, @sabotagebeats and @unparalleled-js

    Source code(tar.gz)
    Source code(zip)
  • v0.2.8(Jun 8, 2022)

    Changes

    • fix: bug where \r characters in contracts causes endless compiling @unparalleled-js (#783)
    • fix: correct type of block ID in abstractmethod @unparalleled-js (#785)
    • fix: issue when awaiting confirmations on a failed transaction @unparalleled-js (#781)
    • refactor: add transaction query support @johnson2427 (#776)
    • fix: ignore all TX errors in proxy detection @unparalleled-js (#784)
    • feat: add 0age proxy detection @banteg (#780)
    • docs: improve error message when multiple events with same name defined @unparalleled-js (#771)
    • fix: issue with error handling during proxy contract detection @unparalleled-js (#775)
    • feat: add docs deployment from ape console @Ninjagod1251 (#768)
    • fix: bug preventing longer contracts_folder paths in dependencies @unparalleled-js (#765)
    • docs: add root level namespace to console guide @unparalleled-js (#770)
    • refactor: removed pandas returns and methods that decoded pandas data… @johnson2427 (#767)
    • refactor: dependencies logic cleanup @unparalleled-js (#764)
    • fix: array struct idempotence issue @unparalleled-js (#762)
    • chore: update labels @fubuloubu (#763)
    • test: add test case for multi-folder dependency and refactor test-cases @unparalleled-js (#756)
    • fix: issue where could not use dependencies with non v-prefixed Github release tags @unparalleled-js (#755)
    • chore: Update CONTRIBUTING.md @abdullathedruid (#761)
    • feat: detect minimal proxies @banteg (#750)
    • docs: fix get_references() @NotPeopling2day (#754)
    • chore: resolve conflict with rich @unparalleled-js (#752)
    • fix: default contracts folder path @NotPeopling2day (#753)
    • fix: correct error code for plugins upgrade command @unparalleled-js (#744)
    • fix: links for testing.md and eth-tester @0xCookedRice (#748)
    • fix: regression where ape.Contract() would not fetch the contract type from the explorer @unparalleled-js (#747)

    Special thanks to: @0xCookedRice, @Ninjagod1251, @NotPeopling2day, @abdullathedruid, @banteg, @fubuloubu, @johnson2427 and @unparalleled-js

    Source code(tar.gz)
    Source code(zip)
  • v0.2.7(May 20, 2022)

  • v0.2.6(May 20, 2022)

    Changes

    • fix: issue when compiling a source where references was None @unparalleled-js (#740)
    • chore: update flake8 @unparalleled-js (#739)

    Special thanks to: @unparalleled-js

    Source code(tar.gz)
    Source code(zip)
  • v0.2.5(May 20, 2022)

    Changes

    • fix: ape compile dependent imports @NotPeopling2day (#730)
    • fix: raise attribute error in EcosystemAPI getattr @unparalleled-js (#735)
    • feat: cache contract types from deploy and explorer @unparalleled-js (#712)
    • fix: transfer send_everything does not work properly @sabotagebeats (#731)
    • feat: add recommended plugins install extra @fubuloubu (#726)
    • fix: issue where addresses were not checksummed when decoding logs @unparalleled-js (#724)
    • feat: support calling transactions @unparalleled-js (#723)
    • feat: add method to handle getting virtual machine error from Provider @unparalleled-js (#722)
    • fix: typo in mainnet-fork @banteg (#718)

    Special thanks to: @NotPeopling2day, @banteg, @fubuloubu, @sabotagebeats and @unparalleled-js

    Source code(tar.gz)
    Source code(zip)
  • v0.2.4(May 13, 2022)

  • v0.2.3(May 13, 2022)

    Changes

    • fix: issue where NetworkManager repr was verbose @unparalleled-js (#715)
    • fix: bug where plugin name showed up in available plugins when it was installed @unparalleled-js (#708)
    • fix: edge case found in hypotheses test @unparalleled-js (#711)
    • feat: extract-manifest in project manager @sabotagebeats (#710)
    • feat: handle structs within tuples and arrays in decode_returndata @unparalleled-js (#706)
    • feat: configure transaction acceptance timeout @unparalleled-js (#707)
    • fix: handle multiple versions of same dependency in project.dependencies @unparalleled-js (#699)
    • feat: support contract namespaces @unparalleled-js (#698)
    • fix: add handling for struct outputs @fubuloubu (#684)
    • fix: ape console in quickstart to not show up in index @Ninjagod1251 (#696)
    • fix: sender contract instance impersonated accounts @sabotagebeats (#619)
    • feat: support forking Ethereum testnets @unparalleled-js (#691)
    • fix: always return chain id from network when using live network @unparalleled-js (#692)
    • fix: bug preventing "no" from working in signing prompt @unparalleled-js (#693)

    Special thanks to: @Ninjagod1251, @fubuloubu, @sabotagebeats and @unparalleled-js

    Source code(tar.gz)
    Source code(zip)
  • v0.2.2(May 3, 2022)

    Changes

    • feat: allow ecosystem-specific kwargs in deploy @unparalleled-js (#689)
    • feat: cache chain ID to make less RPC calls @unparalleled-js (#683)
    • fix: error message when provider not found @unparalleled-js (#681)
    • fix: bug preventing compiling dependencies in a project with no source files @unparalleled-js (#678)
    • fix: issue with -v debug when CLI plugins failed to load @unparalleled-js (#677)
    • fix: dont except errors from first class plugins @unparalleled-js (#676)
    • fix: delete temporary config file for non-ape projects @unparalleled-js (#673)
    • fix: adjust error message when failed to impersonate @unparalleled-js (#675)
    • chore: update mypy @fubuloubu (#674)
    • fix: add default for provider settings @vintrocode (#672)
    • chore: bump ethpm-types @unparalleled-js (#669)

    Special thanks to: @fubuloubu, @unparalleled-js and @vintrocode

    Source code(tar.gz)
    Source code(zip)
  • v0.2.1(Apr 21, 2022)

Django Ninja - Fast Django REST Framework

Django Ninja is a web framework for building APIs with Django and Python 3.6+ type hints.

Vitaliy Kucheryaviy 3.8k Jan 02, 2023
Microservice example with Python, Faust-Streaming and Kafka (Redpanda)

Microservices Orchestration with Python, Faust-Streaming and Kafka (Redpanda) Example project for PythonBenin meetup. It demonstrates how to use Faust

Lé 3 Jun 13, 2022
A simple Tornado based framework designed to accelerate web service development

Toto Toto is a small framework intended to accelerate web service development. It is built on top of Tornado and can currently use MySQL, MongoDB, Pos

Jeremy Olmsted-Thompson 61 Apr 06, 2022
An effective, simple, and async security library for the Sanic framework.

Sanic Security An effective, simple, and async security library for the Sanic framework. Table of Contents About the Project Getting Started Prerequis

Sunset Dev 72 Nov 30, 2022
cirrina is an opinionated asynchronous web framework based on aiohttp

cirrina cirrina is an opinionated asynchronous web framework based on aiohttp. Features: HTTP Server Websocket Server JSON RPC Server Shared sessions

André Roth 32 Mar 05, 2022
A shopping list and kitchen inventory management app.

Flask React Project This is the backend for the Flask React project. Getting started Clone this repository (only this branch) git clone https://github

11 Jun 03, 2022
TinyAPI - 🔹 A fast & easy and lightweight WSGI Framework for Python

TinyAPI - 🔹 A fast & easy and lightweight WSGI Framework for Python

xArty 3 Apr 08, 2022
A framework that let's you compose websites in Python with ease!

Perry Perry = A framework that let's you compose websites in Python with ease! Perry works similar to Qt and Flutter, allowing you to create componen

Linkus 13 Oct 09, 2022
A microservice written in Python detecting nudity in images/videos

py-nudec py-nudec (python nude detector) is a microservice, which scans all the images and videos from the multipart/form-data request payload and sen

Michael Grigoryan 8 Jul 09, 2022
A Flask API REST to access words' definition

A Flask API to access words' definitions

Pablo Emídio S.S 9 Jul 22, 2022
FastAPI framework, high performance, easy to learn, fast to code, ready for production

FastAPI framework, high performance, easy to learn, fast to code, ready for production Documentation: https://fastapi.tiangolo.com Source Code: https:

Sebastián Ramírez 53k Jan 02, 2023
Djask is a web framework for python which stands on the top of Flask and will be as powerful as Django.

Djask is a web framework for python which stands on the top of Flask and will be as powerful as Django.

Andy Zhou 27 Sep 08, 2022
The Modern And Developer Centric Python Web Framework. Be sure to read the documentation and join the Slack channel questions: http://slack.masoniteproject.com

NOTE: Masonite 2.3 is no longer compatible with the masonite-cli tool. Please uninstall that by running pip uninstall masonite-cli. If you do not unin

Masonite 1.9k Jan 04, 2023
bottle.py is a fast and simple micro-framework for python web-applications.

Bottle: Python Web Framework Bottle is a fast, simple and lightweight WSGI micro web-framework for Python. It is distributed as a single file module a

Bottle Micro Web Framework 7.8k Dec 31, 2022
REST API framework designed for human beings

Eve Eve is an open source Python REST API framework designed for human beings. It allows to effortlessly build and deploy highly customizable, fully f

eve 6.6k Jan 07, 2023
Dockerized web application on Starlite, SQLAlchemy1.4, PostgreSQL

Production-ready dockerized async REST API on Starlite with SQLAlchemy and PostgreSQL

Artur Shiriev 10 Jan 03, 2023
Bionic is Python Framework for crafting beautiful, fast user experiences for web and is free and open source

Bionic is fast. It's powered core python without any extra dependencies. Bionic offers stateful hot reload, allowing you to make changes to your code and see the results instantly without restarting

⚓ 0 Mar 05, 2022
Try to create a python mircoservice framework.

Micro current_status: prototype. ... Python microservice framework. More in Document. You should clone this project and run inv docs. Install Not now.

修昊 1 Dec 07, 2021
🔥 Fire up your API with this flamethrower

🔥 Fire up your API. Documentation: https://flama.perdy.io Flama Flama aims to bring a layer on top of Starlette to provide an easy to learn and fast

José Antonio Perdiguero 216 Dec 26, 2022
Restful API framework wrapped around MongoEngine

Flask-MongoRest A Restful API framework wrapped around MongoEngine. Setup from flask import Flask from flask_mongoengine import MongoEngine from flask

Close 525 Jan 01, 2023