-
Notifications
You must be signed in to change notification settings - Fork 2k
chore: stop supporting legacy console.sol signatures #8910
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
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
579e7d9
feat: stop supporting legacy console.sol signatures
DaniPopes 34cec8a
chore: update console.sol in tests
DaniPopes 863a6db
Merge remote-tracking branch 'origin' into dani/drop-legacy-hhconsole
grandizzy 5c14c2a
Fix test
grandizzy 2b24203
Merge branch 'master' into dani/drop-legacy-hhconsole
grandizzy 78a912c
Merge branch 'master' into dani/drop-legacy-hhconsole
grandizzy e96ec89
Merge branch 'master' into dani/drop-legacy-hhconsole
grandizzy c8b4974
Merge branch 'master' into dani/drop-legacy-hhconsole
grandizzy 7ee6a82
Merge branch 'master' into dani/drop-legacy-hhconsole
grandizzy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
File renamed without changes.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
//! DSTest log interface. | ||
|
||
use super::{format_units_int, format_units_uint}; | ||
use alloy_primitives::hex; | ||
use alloy_sol_types::sol; | ||
use derive_more::Display; | ||
use itertools::Itertools; | ||
|
||
// TODO: Use `UiFmt` | ||
zerosnacks marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
sol! { | ||
#[sol(abi)] | ||
#[derive(Display)] | ||
interface Console { | ||
#[display("{val}")] | ||
event log(string val); | ||
|
||
#[display("{}", hex::encode_prefixed(val))] | ||
event logs(bytes val); | ||
|
||
#[display("{val}")] | ||
event log_address(address val); | ||
|
||
#[display("{val}")] | ||
event log_bytes32(bytes32 val); | ||
|
||
#[display("{val}")] | ||
event log_int(int val); | ||
|
||
#[display("{val}")] | ||
event log_uint(uint val); | ||
|
||
#[display("{}", hex::encode_prefixed(val))] | ||
event log_bytes(bytes val); | ||
|
||
#[display("{val}")] | ||
event log_string(string val); | ||
|
||
#[display("[{}]", val.iter().format(", "))] | ||
event log_array(uint256[] val); | ||
|
||
#[display("[{}]", val.iter().format(", "))] | ||
event log_array(int256[] val); | ||
|
||
#[display("[{}]", val.iter().format(", "))] | ||
event log_array(address[] val); | ||
|
||
#[display("{key}: {val}")] | ||
event log_named_address(string key, address val); | ||
|
||
#[display("{key}: {val}")] | ||
event log_named_bytes32(string key, bytes32 val); | ||
|
||
#[display("{key}: {}", format_units_int(val, decimals))] | ||
event log_named_decimal_int(string key, int val, uint decimals); | ||
|
||
#[display("{key}: {}", format_units_uint(val, decimals))] | ||
event log_named_decimal_uint(string key, uint val, uint decimals); | ||
|
||
#[display("{key}: {val}")] | ||
event log_named_int(string key, int val); | ||
|
||
#[display("{key}: {val}")] | ||
event log_named_uint(string key, uint val); | ||
|
||
#[display("{key}: {}", hex::encode_prefixed(val))] | ||
event log_named_bytes(string key, bytes val); | ||
|
||
#[display("{key}: {val}")] | ||
event log_named_string(string key, string val); | ||
|
||
#[display("{key}: [{}]", val.iter().format(", "))] | ||
event log_named_array(string key, uint256[] val); | ||
|
||
#[display("{key}: [{}]", val.iter().format(", "))] | ||
event log_named_array(string key, int256[] val); | ||
|
||
#[display("{key}: [{}]", val.iter().format(", "))] | ||
event log_named_array(string key, address[] val); | ||
} | ||
} | ||
|
||
pub use Console::*; |
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. thank god |
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
//! Hardhat `console.sol` interface. | ||
|
||
use alloy_sol_types::sol; | ||
use foundry_common_fmt::*; | ||
use foundry_macros::ConsoleFmt; | ||
|
||
sol!( | ||
#[sol(abi)] | ||
#[derive(ConsoleFmt)] | ||
Console, | ||
"src/Console.json" | ||
); | ||
|
||
pub use Console::*; |
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.