Skip to content

derivedBytecodeHash is unreachable from libraries: move it with DerivedDeploy into LibRainDeploy #419

In review

Description

@thedavidmeister

derivedBytecodeHash(DerivedDeploy, uint256 chainId) (refusing with NotDerivedOnChain) is an internal function on the abstract src/abstract/RainDeployVerifyBase.sol, and DerivedDeploy itself is declared in that abstract's file. A library cannot inherit an abstract contract, so no library can call the lookup: rain.factory had to copy its body word for word into LibRainDeployBeaconResolution.derivedCodeHash (rainlanguage/rain.factory#309).

Fix: move DerivedDeploy, NotDerivedOnChain and the lookup into LibRainDeploy (no library owns DerivedDeploy today), have every caller in rain.deploy call LibRainDeploy.derivedBytecodeHash, and drop the abstract's copy. RainDeployVerifyBase.sol keeps re-exporting the struct and error so existing import paths still resolve.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions