Skip to content

Commit

Permalink
chore: add burner choice to scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
1kresh committed Oct 31, 2024
1 parent 721f430 commit 6af024d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
9 changes: 5 additions & 4 deletions script/deploy/Vault.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ contract VaultScript is Script {
address vaultConfigurator,
address owner,
address collateral,
address burner,
uint48 epochDuration,
bool depositWhitelist,
uint256 depositLimit,
Expand All @@ -31,8 +32,8 @@ contract VaultScript is Script {

bytes memory vaultParams = abi.encode(
IVault.InitParams({
collateral: address(collateral),
burner: address(0xdEaD),
collateral: collateral,
burner: burner,
epochDuration: epochDuration,
depositWhitelist: depositWhitelist,
isDepositLimit: depositLimit != 0,
Expand Down Expand Up @@ -94,11 +95,11 @@ contract VaultScript is Script {
bytes memory slasherParams;
if (slasherIndex == 0) {
slasherParams =
abi.encode(ISlasher.InitParams({baseParams: IBaseSlasher.BaseParams({isBurnerHook: false})}));
abi.encode(ISlasher.InitParams({baseParams: IBaseSlasher.BaseParams({isBurnerHook: burner != address(0)})}));
} else if (slasherIndex == 1) {
slasherParams = abi.encode(
IVetoSlasher.InitParams({
baseParams: IBaseSlasher.BaseParams({isBurnerHook: false}),
baseParams: IBaseSlasher.BaseParams({isBurnerHook: burner != address(0)}),
vetoDuration: vetoDuration,
resolverSetEpochsDelay: 3
})
Expand Down
9 changes: 5 additions & 4 deletions script/deploy/VaultTokenized.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ contract VaultTokenizedScript is Script {
address vaultConfigurator,
address owner,
address collateral,
address burner,
uint48 epochDuration,
bool depositWhitelist,
uint256 depositLimit,
Expand All @@ -35,8 +36,8 @@ contract VaultTokenizedScript is Script {
bytes memory vaultParams = abi.encode(
IVaultTokenized.InitParamsTokenized({
baseParams: IVault.InitParams({
collateral: address(collateral),
burner: address(0xdEaD),
collateral: collateral,
burner: burner,
epochDuration: epochDuration,
depositWhitelist: depositWhitelist,
isDepositLimit: depositLimit != 0,
Expand Down Expand Up @@ -101,11 +102,11 @@ contract VaultTokenizedScript is Script {
bytes memory slasherParams;
if (slasherIndex == 0) {
slasherParams =
abi.encode(ISlasher.InitParams({baseParams: IBaseSlasher.BaseParams({isBurnerHook: false})}));
abi.encode(ISlasher.InitParams({baseParams: IBaseSlasher.BaseParams({isBurnerHook: burner != address(0)})}));
} else if (slasherIndex == 1) {
slasherParams = abi.encode(
IVetoSlasher.InitParams({
baseParams: IBaseSlasher.BaseParams({isBurnerHook: false}),
baseParams: IBaseSlasher.BaseParams({isBurnerHook: burner != address(0)}),
vetoDuration: vetoDuration,
resolverSetEpochsDelay: 3
})
Expand Down
4 changes: 2 additions & 2 deletions specs/Vault.md
Original file line number Diff line number Diff line change
Expand Up @@ -185,13 +185,13 @@ _Common Vault_
Deployment script: [click](../script/deploy/Vault.s.sol)

```shell
forge script script/deploy/Vault.s.sol:VaultScript 0x0000000000000000000000000000000000000000 0x0000000000000000000000000000000000000000 0x0000000000000000000000000000000000000000 1 false 0 0 false 0 0 --sig "run(address,address,address,uint48,bool,uint256,uint64,bool,uint64,uint48)" --broadcast --rpc-url=$ETH_RPC_URL
forge script script/deploy/Vault.s.sol:VaultScript 0x0000000000000000000000000000000000000000 0x0000000000000000000000000000000000000000 0x0000000000000000000000000000000000000000 0x0000000000000000000000000000000000000000 1 false 0 0 false 0 0 --sig "run(address,address,address,address,uint48,bool,uint256,uint64,bool,uint64,uint48)" --broadcast --rpc-url=$ETH_RPC_URL
```

_Tokenized Vault_

Deployment script: [click](../script/deploy/VaultTokenized.s.sol)

```shell
forge script script/deploy/VaultTokenized.s.sol:VaultTokenizedScript 0x0000000000000000000000000000000000000000 0x0000000000000000000000000000000000000000 0x0000000000000000000000000000000000000000 1 false 0 Test TEST 0 false 0 0 --sig "run(address,address,address,uint48,bool,uint256,string,string,uint64,bool,uint64,uint48)" --broadcast --rpc-url=$ETH_RPC_URL
forge script script/deploy/VaultTokenized.s.sol:VaultTokenizedScript 0x0000000000000000000000000000000000000000 0x0000000000000000000000000000000000000000 0x0000000000000000000000000000000000000000 0x0000000000000000000000000000000000000000 1 false 0 Test TEST 0 false 0 0 --sig "run(address,address,address,address,uint48,bool,uint256,string,string,uint64,bool,uint64,uint48)" --broadcast --rpc-url=$ETH_RPC_URL
```

0 comments on commit 6af024d

Please sign in to comment.