Skip to content

feat: add int overload support to console2.sol #3884

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
mds1 opened this issue Dec 13, 2022 · 2 comments · Fixed by #3932
Closed

feat: add int overload support to console2.sol #3884

mds1 opened this issue Dec 13, 2022 · 2 comments · Fixed by #3932
Assignees
Labels
A-cheatcodes Area: cheatcodes C-forge Command: forge T-feature Type: feature

Comments

@mds1
Copy link
Collaborator

mds1 commented Dec 13, 2022

Component

Forge

Describe the feature you would like

@mattsse In foundry-rs/forge-std#253 we started expanding console2.sol to add more overloads, so add a log(int256) and log(string,int256) overload. Do you think you could get a quick PR in to add those both to foundry? (I'm not exactly sure how the abigen + format_hardhat_call stuff, e.g. in HardhatConsoleCalls::Log7(c) => logf1!(c) how do you know what numbers to use there?)

Additional context

No response

@mds1 mds1 added the T-feature Type: feature label Dec 13, 2022
@mds1 mds1 changed the title feat: add int overload support to console.sol feat: add int overload support to console2.sol Dec 13, 2022
@rkrasiuk rkrasiuk added C-forge Command: forge A-cheatcodes Area: cheatcodes labels Dec 22, 2022
@rkrasiuk
Copy link
Collaborator

@mds1 these numbers are coming from macro expansion. since cargo expand would simply flood your terminal, you could use rust-analyzer's command to expand the macro recursively. I can get a quick PR in, are these the only 2 additional methods?
Screenshot 2022-12-22 at 15 27 05
Screenshot 2022-12-22 at 15 27 53

@mds1
Copy link
Collaborator Author

mds1 commented Dec 22, 2022

Ahh I see, thanks! And yes those are currently the only two additional methods, though there may be more in the future, e.g. foundry-rs/forge-std#129

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
A-cheatcodes Area: cheatcodes C-forge Command: forge T-feature Type: feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants