Skip to content
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

Add console2 log support #126

Merged
merged 3 commits into from
Dec 19, 2023
Merged

Add console2 log support #126

merged 3 commits into from
Dec 19, 2023

Conversation

ferranbt
Copy link
Collaborator

@ferranbt ferranbt commented Dec 11, 2023

📝 Summary

This PR enables console2 support in the Suave off-chain environment. console2.sol is a Solidity library that provides an overloaded log method with many types of inputs. Then, it encodes the inputs as abi and makes a call to a predefined contract 0x000000000000000000636F6e736F6c652e6c6f67.

The PR defines that contract as a precompile and uses the ABI from console2 to figure out what is the type of the input and decode it.

The library is available in forge-std.

📚 References


  • I have seen and agree to CONTRIBUTING.md

@ferranbt ferranbt requested review from Ruteri, dmarzzz and metachris and removed request for Ruteri December 13, 2023 08:16
@ferranbt ferranbt merged commit bd22166 into main Dec 19, 2023
3 checks passed
@ferranbt ferranbt deleted the feature/console-log branch December 19, 2023 17:01
dmarzzz pushed a commit that referenced this pull request Dec 22, 2023
* Add console log support

* Fix lint
dmarzzz added a commit that referenced this pull request Dec 22, 2023
* add signMessage precompile

* precompile implementation

* chore: remove http.port flag in dev mode (#125)

* Fix console cmd for suave devnet (#122)

* err on suave precompile is type ErrExecutionReverted (#129)

* err on suave precompile is type ErrExecutionReverted

* restrict go version to 1.21.1

* Add PeekerReverted error to Suave abi (#130)

* Add PeekerReverted error to Suave abi

* Commit real one

* Add precompile to make remote http calls (#110)

* Add precompile to make remote http calls

* Fix error

* Handle error and integrate other external calls

* Last fixes

* Fix

* Show more diffs

* Fix test

* Validate for duplicated names/addrs in precompile spec (#132)

* bid -> dataRecord (#128)

* bid -> dataRecord

* working renames

* change FetchBid to FetchRecord

* update vm contracts

* update devenv mevshare script

* the last references of bid

* the LAST improper bid reference

* Add format to Solidity

---------

Co-authored-by: Ferran Borreguero <[email protected]>

* Add console2 log support (#126)

* Add console log support

* Fix lint

* [fix] fix bootnode's address (#134)

* add signMessage precompile

* precompile implementation

* update artifacts

* fix bad merge

* cherrypick and update libs

* regen

---------

Co-authored-by: Yash Atreya <[email protected]>
Co-authored-by: Ferran Borreguero <[email protected]>
Co-authored-by: halo3mic <[email protected]>
Co-authored-by: Ferran Borreguero <[email protected]>
Co-authored-by: Anton <[email protected]>
Co-authored-by: Andy Tudhope <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants