-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ABI dir fixes #2003
Merged
Merged
ABI dir fixes #2003
Conversation
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
istankovic
force-pushed
the
config-commands-abi
branch
9 times, most recently
from
July 7, 2023 14:55
d73621e
to
e6298ed
Compare
fredo
reviewed
Jul 10, 2023
bilbeyt
reviewed
Jul 10, 2023
bilbeyt
reviewed
Jul 10, 2023
bilbeyt
reviewed
Jul 10, 2023
bilbeyt
reviewed
Jul 10, 2023
beamer/tests/agent/multiple_processors/test_multiple_event_processors.py
Outdated
Show resolved
Hide resolved
bilbeyt
reviewed
Jul 10, 2023
beamer/tests/agent/multiple_processors/test_multiple_event_processors.py
Outdated
Show resolved
Hide resolved
bilbeyt
reviewed
Jul 10, 2023
bilbeyt
reviewed
Jul 10, 2023
bilbeyt
suggested changes
Jul 10, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally looking really good with some small things.
istankovic
force-pushed
the
config-commands-abi
branch
from
July 10, 2023 11:56
42324eb
to
682c376
Compare
It makes more sense to be there.
This is in preparation for the move of artifacts module outside of beamer.deploy package.
This is paving the way to remove Deployment.obtain_contract and related infrastructure.
And convert to use beamer.contract.obtain.contract.
This provides contract ABI and bytecode in a lazy manner, i.e. it reads each ABI file only once, upon first request, and stores the loaded data in its cache.
This is in preparation to remove load_contract_abi.
This is used to collect all artifacts under the given artifacts dir into a mapping keyed by the chain ID.
Useful to avoid repeating the same computation in several places.
This is in preparation for the move of that function to the util module.
…ailable in the utils module
Instead, move it to the agent, where it belongs.
Also allow for already existing artifacts and ABI dirs.
This code is no longer needed since we switched to the new artifacts and ABI handling API.
Instead use the ABI manager and the newly added helper in beamer.artifacts.
istankovic
force-pushed
the
config-commands-abi
branch
from
July 11, 2023 09:30
682c376
to
1c16f81
Compare
bilbeyt
reviewed
Jul 11, 2023
bilbeyt
approved these changes
Jul 11, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
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 PR fixes the current situation with ABI handling (i.e. not using the specfied ABI dir at all and instead relying on
contracts/.build
). A major change was to movebeamer.deploy.artifacts
one level up, which required extensive preparation itself. This was necessary due to a headache of circular imports betweenbeamer.deploy.artifacts
,beamer.deploy.util
andbeamer.contracts
, the latter being in need of deployment information if it is to do anything useful. Also, it just makes sense on its own because other components need access to artifacts too.Once this was done, things became somewhat easier, especially proceeding with
beamer.contract
changes now. Scripts and commands have been updated to make use of the ABI dir, but also the entire code-base was switched to use the new artifacts APIs. In turn, this allowed us to simplify and remove some of the code inbeamer.contracts
that has now become obsolete.Summary of the changes
ABIManager
API across the codebasebeamer config
,beamer deploy
andbeamer deploy-base
commands handle ABI dir correctlyCloses: #1975