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

Display source line for items #42

Open
zemse opened this issue Apr 26, 2023 · 1 comment
Open

Display source line for items #42

zemse opened this issue Apr 26, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@zemse
Copy link
Owner

zemse commented Apr 26, 2023

#15 (comment)

@zemse zemse added the enhancement New feature or request label Apr 26, 2023
@HarryR
Copy link

HarryR commented Apr 26, 2023

Was thinking of including storage I/O profiling too, so e.g. via hre.tracer.storageProfile(true) (argument true resets collection to zero).

I agree with your comment on the other issue, it already prints a fair amount, and it would probably have to take into account multiple contracts so output could get complicated / verbose fairly quickly, but this kind of thing is super useful and I can't find it as easy to use in any other tool.

I will have a look into how to get the line numbers etc. and see if I can get around to adding some notes or hacking on some code.

   [SLOAD]  0xe90b7bceb6e7df5418fb78d8ee546e97c83a08bbccc01a0644d599ccd2a7c2e2 → 0x142115100b
      - gas=2100 file=project/Blah.sol:35
   [SLOAD]  0xe90b7bceb6e7df5418fb78d8ee546e97c83a08bbccc01a0644d599ccd2a7c2e3 → 0x4
      - gas=2100 file=project/Blah.sol:35
   [SSTORE] 0x3f5659f257210b7b89da6db5c873016a4ad9edc95c7b72eda1719e366516c15 ← 0x160d000840003c44cdddb6a900fa2b585dd299e03d12fa4293bc
      - gas=2100 file=project/Blah.sol:35
   [SLOAD]  0x961ec03a078fec1e350bb1ca3bff1afa4bae5fb83d9d8382550c2fd26a7d7527 → 0x3e2
      - gas=2100 file=project/Blah.sol:35

Storage summary:
0xe90b7bceb6e7df5418fb78d8ee546e97c83a08bbccc01a0644d599ccd2a7c2e2
 - new gas:21200 reads=1 hotreads=2 writes=2
 - project/Blah.sol:30 writes=2
 - project/Blah.sol:35 hotreads=3
 - project/Blah.sol:38 writes=1 reads=1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants