feat(dao): launchpool topUpEpoch remediation + impl deploy tooling - #125
Closed
toccata-yy-lista wants to merge 1 commit into
Closed
feat(dao): launchpool topUpEpoch remediation + impl deploy tooling#125toccata-yy-lista wants to merge 1 commit into
toccata-yy-lista wants to merge 1 commit into
Conversation
Replace the plain impl deploy with a linking-aware one: MerkleVerifier is resolved at run time (reused via masked-bytecode comparison against the local build when KNOWN_MERKLE_VERIFIER matches, freshly deployed otherwise) and the implementation is deployed from artifact bytecode with the library placeholder patched in. Impl only — the proxy upgrade is executed separately after the storage layout is reviewed. Chain-id argument guards against broadcasting to the wrong network. Covered by BSC testnet fork tests. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Pull Request ReviewThis PR reworks the Foundry deployment script to deploy only the ClisBNBLaunchPoolDistributor implementation, dynamically deploy or reuse a bytecode-matching MerkleVerifier library, patch the implementation artifact’s link placeholder, and enforce BSC chain-ID checks. It also grants read access to build artifacts and adds BSC testnet fork tests for fresh, reused, and stale library scenarios; the PR description additionally states that an admin-only Sensitive ContentNo sensitive content detected. Security IssuesNo serious security issues detected. Generated by Hashdit Bot. This tool can absolutely NOT replace manual audits. |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
topUpEpoch(audit remediation): addstopUpEpoch(epochId, newTotalAmount)toClisBNBLaunchPoolDistributorso an under-funded epoch (totalAmount set below the sum of merkle leaves, blocking tail claimers) can be raised to the correct total. Admin-only, active-epoch-only (audit M02: rejects not-yet-started epochs), requires the delta to be pre-funded.ListaDao_ClisBNBLaunchPoolDistributor_Update_Audit_Report_Final.pdftoaudits/.scripts/foundry/dao/deploy_ClisBNBLaunchPoolDistributor_impl.sol): replaces the plain deploy with a linking-aware, impl-only script:publiclibrary → delegatecall linking) is resolved at run time: reused whenKNOWN_MERKLE_VERIFIER's on-chain code matches the local build (masked-bytecode comparison), freshly deployed otherwise;--librariesflag or foundry.toml linking needed;--accountkeystore; chain-id argument guards against wrong-network broadcasts.test/dao/DeployClisBNBLaunchPoolDistributorImplScript.t.sol): fresh-library deploy, unchanged-library reuse, and stale-library redeploy paths, all against a BSC testnet fork (skipped whenBSC_TESTNET_RPCis unset).foundry.toml: grants readfs_permissionson./out(the script reads the artifact for linking).Testnet deployment (BSC 97)
0x95d01dd09097196c750f83a9de996c124835737c0x0d1f7f112316d628a7540a484dc5d09a3cf08cbb(foundry-built baseline; pass asKNOWN_MERKLE_VERIFIERfor reuse in future upgrades)0x6b443E62F20Ea572178aE3c1c037eae0823396f8Test plan
forge test --match-path test/dao/DeployClisBNBLaunchPoolDistributorImplScript.t.sol(3 fork tests pass)0x61dEe01c2785E9BE58Ce2CaB215af61703eeA50f, then proxy upgrade by ProxyAdmin owner🤖 Generated with Claude Code