diff --git a/0x464C71f6c2F760DdA6093dCB91C24c39e5d6e18c b/0x464C71f6c2F760DdA6093dCB91C24c39e5d6e18c deleted file mode 100644 index e69de29..0000000 diff --git a/0x5ba7fd868c40c16f7aDfAe6CF87121E13FC2F7a0 b/0x5ba7fd868c40c16f7aDfAe6CF87121E13FC2F7a0 deleted file mode 100644 index e69de29..0000000 diff --git a/flattened/Collector.sol b/flattened/Collector.sol index 9402789..ae29fcb 100644 --- a/flattened/Collector.sol +++ b/flattened/Collector.sol @@ -1170,3 +1170,27 @@ contract Collector is VersionedInitializable, ICollector, ReentrancyGuard { return true; } } + +// src/CustomCollector.sol + +/** + * @title Collector + * Custom modifications of this implementation: + * - the initialize function manually alters private storage slots via assembly + * - storage slot 51 is reset to 0 + * - storage slot 52 is set to 1 (which is the default state of the reentrancy guard) + * @author BGD Labs + **/ +contract CollectorWithCustomImpl is Collector { + constructor(address aclManager) Collector(aclManager) { + // intentionally left empty + } + + /// @inheritdoc ICollector + function initialize(uint256) external virtual override initializer { + assembly { + sstore(51, 0) // this slot was _status, but is now part of the gap + sstore(52, 1) // this slot was the funds admin, but is now "status" + } + } +} diff --git a/package.json b/package.json index 0bae580..34b0113 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,8 @@ "test": "test" }, "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" + "test": "echo \"Error: no test specified\" && exit 1", + "diff": "bun diff.ts" }, "author": "", "license": "MIT",