Skip to content

Commit

Permalink
Merge pull request #13 from symbioticfi/scripts
Browse files Browse the repository at this point in the history
Add scripts
  • Loading branch information
1kresh authored Jan 24, 2025
2 parents 49b9ec0 + 6adbd25 commit 1af3341
Show file tree
Hide file tree
Showing 15 changed files with 164 additions and 7 deletions.

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion out/FullRestakeResetHook.sol/FullRestakeResetHook.json

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

18 changes: 18 additions & 0 deletions script/deploy/FullRestakeDecreaseHook.s.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.25;

import {Script, console2} from "forge-std/Script.sol";

import {FullRestakeDecreaseHook} from "../../src/contracts/fullRestakeDelegator/FullRestakeDecreaseHook.sol";

contract FullRestakeDecreaseHookScript is Script {
function run() public {
vm.startBroadcast();

address fullRestakeDecreaseHook = address(new FullRestakeDecreaseHook());

console2.log("FullRestakeDecreaseHook: ", fullRestakeDecreaseHook);

vm.stopBroadcast();
}
}
18 changes: 18 additions & 0 deletions script/deploy/FullRestakeResetHook.s.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.25;

import {Script, console2} from "forge-std/Script.sol";

import {FullRestakeResetHook} from "../../src/contracts/fullRestakeDelegator/FullRestakeResetHook.sol";

contract FullRestakeResetHookScript is Script {
function run(uint48 period, uint256 slashCount) public {
vm.startBroadcast();

address fullRestakeResetHook = address(new FullRestakeResetHook(period, slashCount));

console2.log("FullRestakeResetHook: ", fullRestakeResetHook);

vm.stopBroadcast();
}
}
29 changes: 29 additions & 0 deletions script/deploy/Hooks.s.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
// SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.25;

import {Script, console2} from "forge-std/Script.sol";

import {FullRestakeDecreaseHook} from "../../src/contracts/fullRestakeDelegator/FullRestakeDecreaseHook.sol";
import {NetworkRestakeDecreaseHook} from "../../src/contracts/networkRestakeDelegator/NetworkRestakeDecreaseHook.sol";
import {NetworkRestakeRedistributeHook} from
"../../src/contracts/networkRestakeDelegator/NetworkRestakeRedistributeHook.sol";
import {OperatorSpecificDecreaseHook} from
"../../src/contracts/operatorSpecificDelegator/OperatorSpecificDecreaseHook.sol";

contract HooksScript is Script {
function run() public {
vm.startBroadcast();

address fullRestakeDecreaseHook = address(new FullRestakeDecreaseHook());
address networkRestakeDecreaseHook = address(new NetworkRestakeDecreaseHook());
address networkRestakeRedistributeHook = address(new NetworkRestakeRedistributeHook());
address operatorSpecificDecreaseHook = address(new OperatorSpecificDecreaseHook());

console2.log("FullRestakeDecreaseHook: ", fullRestakeDecreaseHook);
console2.log("NetworkRestakeDecreaseHook: ", networkRestakeDecreaseHook);
console2.log("NetworkRestakeRedistributeHook: ", networkRestakeRedistributeHook);
console2.log("OperatorSpecificDecreaseHook: ", operatorSpecificDecreaseHook);

vm.stopBroadcast();
}
}
18 changes: 18 additions & 0 deletions script/deploy/NetworkRestakeDecreaseHook.s.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.25;

import {Script, console2} from "forge-std/Script.sol";

import {NetworkRestakeDecreaseHook} from "../../src/contracts/networkRestakeDelegator/NetworkRestakeDecreaseHook.sol";

contract NetworkRestakeDecreaseHookScript is Script {
function run() public {
vm.startBroadcast();

address networkRestakeDecreaseHook = address(new NetworkRestakeDecreaseHook());

console2.log("NetworkRestakeDecreaseHook: ", networkRestakeDecreaseHook);

vm.stopBroadcast();
}
}
19 changes: 19 additions & 0 deletions script/deploy/NetworkRestakeRedistributeHook.s.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.25;

import {Script, console2} from "forge-std/Script.sol";

import {NetworkRestakeRedistributeHook} from
"../../src/contracts/networkRestakeDelegator/NetworkRestakeRedistributeHook.sol";

contract NetworkRestakeRedistributeHookScript is Script {
function run() public {
vm.startBroadcast();

address networkRestakeRedistributeHook = address(new NetworkRestakeRedistributeHook());

console2.log("NetworkRestakeRedistributeHook: ", networkRestakeRedistributeHook);

vm.stopBroadcast();
}
}
18 changes: 18 additions & 0 deletions script/deploy/NetworkRestakeResetHook.s.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.25;

import {Script, console2} from "forge-std/Script.sol";

import {NetworkRestakeResetHook} from "../../src/contracts/networkRestakeDelegator/NetworkRestakeResetHook.sol";

contract NetworkRestakeResetHookScript is Script {
function run(uint48 period, uint256 slashCount) public {
vm.startBroadcast();

address networkRestakeResetHook = address(new NetworkRestakeResetHook(period, slashCount));

console2.log("NetworkRestakeResetHook: ", networkRestakeResetHook);

vm.stopBroadcast();
}
}
19 changes: 19 additions & 0 deletions script/deploy/OperatorSpecificDecreaseHook.s.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.25;

import {Script, console2} from "forge-std/Script.sol";

import {OperatorSpecificDecreaseHook} from
"../../src/contracts/operatorSpecificDelegator/OperatorSpecificDecreaseHook.sol";

contract OperatorSpecificDecreaseHookScript is Script {
function run() public {
vm.startBroadcast();

address operatorSpecificDecreaseHook = address(new OperatorSpecificDecreaseHook());

console2.log("OperatorSpecificDecreaseHook: ", operatorSpecificDecreaseHook);

vm.stopBroadcast();
}
}
18 changes: 18 additions & 0 deletions script/deploy/OperatorSpecificResetHook.s.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.25;

import {Script, console2} from "forge-std/Script.sol";

import {OperatorSpecificResetHook} from "../../src/contracts/operatorSpecificDelegator/OperatorSpecificResetHook.sol";

contract OperatorSpecificResetHookScript is Script {
function run(uint48 period, uint256 slashCount) public {
vm.startBroadcast();

address operatorSpecificResetHook = address(new OperatorSpecificResetHook(period, slashCount));

console2.log("OperatorSpecificResetHook: ", operatorSpecificResetHook);

vm.stopBroadcast();
}
}

0 comments on commit 1af3341

Please sign in to comment.