completed proxy upgrade history reconstructor #215
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.
Description
Adds the Proxy Upgrade History Reconstructor to the BNBChain Cookbook. The tool reconstructs and visualizes the upgrade history of proxy contracts on BNB Smart Chain (BSC). It detects proxy types (EIP-1967, Beacon, Custom) by reading EIP-1967 storage slots and reconstructs upgrade events by scanning blockchain history. Includes a Web UI and CLI for analyzing upgradeable contracts.
Motivation: Helps developers, auditors, and researchers analyze upgradeable smart contracts, verify upgrade transparency, track contract changes, and perform security audits on proxy patterns.
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
npm test(Jest). Coverage includes:isContract)getStorageSlot) and address extractiongetUpgradeEvents) for various event signaturesreconstructUpgradeHistory)npm run build(TypeScript compiles without errors)bash setup.sh(installs dependencies, creates.envfrom template, builds project, runs tests)npm run server→ openhttp://localhost:3000→ enter proxy address → verify upgrade history displaynpm start <proxy-address> [from-block] [to-block]with known proxy addresses on BSC/api/reconstructendpoint with various proxy addresses and block rangesReproduction steps:
bash setup.sh(orchmod +x setup.sh && ./setup.sh)npm testto verify all tests passnpm run buildto verify TypeScript compilationnpm run serverhttp://localhost:3000and test with a proxy addressnpm start <proxy-address>Checklist: