-
Notifications
You must be signed in to change notification settings - Fork 31
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
Solidity models of L2 precompiled contracts: ArbSys and ArbTxRetryable #105
Draft
ggrieco-tob
wants to merge
90
commits into
master
Choose a base branch
from
dev-l2-models
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
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
Older versions depend on the deprecated ethereum-* libraries instead of the newer eth-*, which cause a deprecation notice.
Manticore 0.3.6 causes issues when running etheno, see issue #80 for the details.
This is done automatically in Dockerfiles
get.parity.io does not exist anymore
The upstream bug in ganache-cli appears to have been fixed.
This fixes an issue with the dockerfile getting stuck when installing tzdata
Remove manticore integration
Co-authored-by: Emilio López <[email protected]>
…uest object modular Two changes: 1. Removed unused code that was dependent on using integers as the mapping for EventPlugin._transactions mapping and for converting hashes into hex strings 2. Moved get_transaction_receipt_request into etheno.py so that both clients and plugins can use itt.
Used `black` to make code PEP 8 compliant
Fix issue with function call logging and PEP 8 Compliance
There have been a lot of changes that need to be pulled in to make development on this branch much easier.
It is easier to parse and compile individual contracts than to read the entire file and then separate into separate byte arrays for compilation.
1. Added command line argument to enable compilation of ArbSys and ArbRetryableTx 2. Created Precompiler EthenoPlugin that successfully compiles ArbSys.sol 3. Added logic to __main__.py to add Precompiler as an EthenoPlugin if the command-line argument is set to True and Ganache is the RPC Provider
`solc` was complaining that all functions that were inherited from the ArbRetryableTx interface need to have the `override` modifier. Thus, the modifiers were added
Here are the key changes: 1. Made finding the final offset in `precompiler.compile()` more flexible (note that only the last contract in a .sol file is deployed) 2. `etheno.deploy_contract` now returns a hex string instead of an int. The rationale for this is explained in the commend above that return statement. 3. Both ArbSys and ArbRetryableTx are now being deployed via Ganache. 4. Improved error handling for not finding files or unsuccessful compilation
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 introduces two smart contracts in Solidity that provide some basic emulation (e.g. models) of Arbitrum precompiled contracts:
ArbSys
andArbRetryableTx
. The objective is to allow testing of some code deployed in Arbitrum directly from Etheno/Echidna.Etheno should deploy
ArbSysEmulated
in0x0000000000000000000000000000000000000064
andArbRetryableTxEmulated
in0x000000000000000000000000000000000000006E
in order to be used from Echidna.As expected, only some functionality can be emulated from Solidity, but this should be enough for some basic support.
As a future work, the same idea could be replicated with predeployed Optimism contracts