Skip to content

initial owner, deterministic deploy#2

Merged
andreysobol merged 1 commit into
ltvprotocol:mainfrom
Cycxyz:small_fixes
Apr 15, 2026
Merged

initial owner, deterministic deploy#2
andreysobol merged 1 commit into
ltvprotocol:mainfrom
Cycxyz:small_fixes

Conversation

@Cycxyz
Copy link
Copy Markdown
Contributor

@Cycxyz Cycxyz commented Apr 15, 2026

No description provided.

Copilot AI review requested due to automatic review settings April 15, 2026 09:35
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the Deleverager deployment flow to allow setting an explicit initial owner at construction time, and attempts to make deployments deterministic via CREATE2.

Changes:

  • Extend Deleverager constructor to accept an initialOwner and pass it to Ownable.
  • Update the mainnet fork test to use the new constructor signature.
  • Update the deploy script to set a fixed emergency owner and deploy via CREATE2 (salted deployment).

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
test/Deleverager.t.sol Adjusts test setup to use the new constructor signature.
src/Deleverager.sol Adds initialOwner constructor parameter and wires it into Ownable.
script/DeployDeleverager.s.sol Introduces an emergency owner constant and switches deployment to a salted new (CREATE2).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.


vm.startBroadcast();
Deleverager deleverager = new Deleverager(ltvAddress);
Deleverager deleverager = new Deleverager{salt: ""}(ltvAddress, EMERGENCY_DELEVERAGER);
Comment on lines +8 to +15
address constant EMERGENCY_DELEVERAGER = 0x029B9362b5Ee78A673848eb025b533856dD8DDAA;

contract DeployDeleveragerScript is Script {
function run() external {
address ltvAddress = vm.envAddress("LTV_ADDRESS");

vm.startBroadcast();
Deleverager deleverager = new Deleverager(ltvAddress);
Deleverager deleverager = new Deleverager{salt: ""}(ltvAddress, EMERGENCY_DELEVERAGER);
@andreysobol andreysobol merged commit ad5d223 into ltvprotocol:main Apr 15, 2026
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants