Conversation
f8e7ca8 to
b7cbd10
Compare
b7cbd10 to
03e1218
Compare
2 tasks
f2e2d15 to
4a170e6
Compare
Triggering the CI for pushes on development branches that haven't been published in a PR results in builds that unnecessarily consume the monthly build quota.
Use the `pyabigen` tool (https://github.com/clearmatics/pyabigen) to generate Autonity contract bindings. Use a Makefile instead of the old shell script because it can track which targets are up-to-date. All contract functions that are marked with `onlyProtocol` and `onlyAutonity` modifiers in the contract code are excluded from the generated bindings with the `--exclude` command line argument.
Execute the Makefile to generate contract bindings for Autonity v0.14.0.
Allow importing contract classes directly from `autonity.contracts` so that imports are shorter in the module users' code.
Add `plum-dispatch` as dependency because the Stabilization contract includes overloaded contract functions, see https://github.com/clearmatics/pyabigen?tab=readme-ov-file#multiple-dispatch Remove `typing-extensions` because it is not needed any more.
Make it easier for users to connect to Autonity networks by including
data on them in the `autonity.networks` module.
This way a connection to Piccadilly Testnet can be established as:
w3 = web3.Web3(autonity.networks.piccadilly.http_provider)
Update the Python code snippet in README.md.
Move mypy from test dependencies to lint dependencies and include it in the lint:check command.
A number of mypy rules were ignored for the "old" autonity module; these can now be put back.
Extend the developer documentation in README.md.
Add a test generator that generates very basic sanity tests that call all contract functions from the generated wrappers that don't have any inputs, using the Piccadilly Testnet RPC. To be replaced later with tests that spin up an Autonity network.
When a protocol contract gets upgraded its address changes. Therefore it should not be hard-coded into the wrapper.
Add factory functions that query the protocol contract addresses from the Autonity contract and ensure that the Autonity contract version matches the supported one.
Instead of specifying the Autonity contract address in the Makefile and copying it into the generated binding, specify the contract address in the factory function where other bindings also get their contract address. Also move the native token symbol from networks module as it's the same in all networks.
There is a good chance that keepers who build with autonity.py would like to inspect events emitted by Autonity protocol contracts. The Web3.py event bindings are already accessible as `wrapper._contract.events.EventName`, however they should be part of the public API.
As Pyright is more widely used than mypy for type checking.
Generate NumPy-style docstrings from NatSpec files.
Address review comments.
The functions to be excluded will be tagged with the @Custom:exclude natspec tag, which are handled by pyabigen.
03e1218 to
d6c6861
Compare
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request should be merged after exclusions are added to Solidity code via
@custom:excludeNatSpec tags.