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

Precompile functions usage report #987

Open
natanasow opened this issue Oct 15, 2024 · 1 comment
Open

Precompile functions usage report #987

natanasow opened this issue Oct 15, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@natanasow
Copy link
Contributor

natanasow commented Oct 15, 2024

Problem

We should investigate how many times precompile functions are used in the current mainnet contracts, and how many transactions have interacted with the current contracts.

Solution

Disassemble contracts bytecode to find out calls to the 0x167, fetch the contract results for these contracts, and get the calls generated in the fetched transactions.

First part:

  • fetch all contracts on mainnet
  • disassemble their bytecode, look up for call, staticcall, delegatecall against 0x167 and list how many times each precompile function is used

Second part:

  • fetch all transactions that have interacted with these contracts
  • get their calls via MAPI /contracts/results/<tx_hash>/actions
  • humanize the data and add it to the report

Alternatives

No response

@natanasow natanasow added the enhancement New feature or request label Oct 15, 2024
@natanasow natanasow self-assigned this Oct 15, 2024
@natanasow natanasow added this to the 0.11.0 milestone Oct 15, 2024
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
Status: Done
Development

No branches or pull requests

1 participant