added adjuster role to FeeManager

This commit is contained in:
tim
2024-10-22 17:18:20 -04:00
parent c96f429efd
commit d0f4aa721a
6 changed files with 30 additions and 11 deletions

View File

@@ -12,12 +12,13 @@ library FeeManagerLib {
function defaultFeeManager(address payable owner) internal returns (FeeManager) {
return FeeManagerLib.defaultFeeManager(owner, owner, owner, owner);
return FeeManagerLib.defaultFeeManager(owner, owner, owner, owner, owner);
}
function defaultFeeManager(
address admin,
address adjuster,
address payable orderFeeAccount,
address payable gasFeeAccount,
address payable fillFeeAccount
@@ -47,7 +48,7 @@ library FeeManagerLib {
);
FeeManager.ConstructorArgs memory args = FeeManager.ConstructorArgs(
limitChangeNoticeDuration, feeChangeNoticeDuration, maxIncreaseOrderFeePct, maxIncreaseTrancheFeePct,
fees, limits, admin, orderFeeAccount, gasFeeAccount, fillFeeAccount
fees, limits, admin, adjuster, orderFeeAccount, gasFeeAccount, fillFeeAccount
);
return new FeeManager(args);
}
@@ -60,12 +61,13 @@ library FeeManagerLib {
function freeFeeManager(address payable owner) internal returns (FeeManager) {
return FeeManagerLib.freeFeeManager(owner, owner, owner, owner);
return FeeManagerLib.freeFeeManager(owner, owner, owner, owner, owner);
}
function freeFeeManager(
address admin,
address adjuster,
address payable orderFeeAccount,
address payable gasFeeAccount,
address payable fillFeeAccount
@@ -94,7 +96,7 @@ library FeeManagerLib {
);
FeeManager.ConstructorArgs memory args = FeeManager.ConstructorArgs(
limitChangeNoticeDuration, feeChangeNoticeDuration, maxIncreaseOrderFeePct, maxIncreaseTrancheFeePct,
fees, limits, admin, orderFeeAccount, gasFeeAccount, fillFeeAccount
fees, limits, admin, adjuster, orderFeeAccount, gasFeeAccount, fillFeeAccount
);
return new FeeManager(args);
}
@@ -106,12 +108,13 @@ library FeeManagerLib {
function debugFeeManager(address payable owner) internal returns (FeeManager) {
return FeeManagerLib.debugFeeManager(owner, owner, owner, owner);
return FeeManagerLib.debugFeeManager(owner, owner, owner, owner, owner);
}
function debugFeeManager(
address admin,
address adjuster,
address payable orderFeeAccount,
address payable gasFeeAccount,
address payable fillFeeAccount
@@ -143,7 +146,7 @@ library FeeManagerLib {
);
FeeManager.ConstructorArgs memory args = FeeManager.ConstructorArgs(
limitChangeNoticeDuration, feeChangeNoticeDuration, maxIncreaseOrderFeePct, maxIncreaseTrancheFeePct,
fees, limits, admin, orderFeeAccount, gasFeeAccount, fillFeeAccount
fees, limits, admin, adjuster, orderFeeAccount, gasFeeAccount, fillFeeAccount
);
return new FeeManager(args);
}

View File

@@ -6,7 +6,7 @@ import "@forge-std/console2.sol";
library VaultAddress {
// keccak-256 hash of the Vault's bytecode (not the deployed bytecode but the initialization bytecode)
bytes32 public constant VAULT_INIT_CODE_HASH = 0xe5e6257bee9f182ff5b35a3356108ff2bc9bb2ac3017abc40a342f8d338d4d77;
bytes32 public constant VAULT_INIT_CODE_HASH = 0x8b1347850b0b1f2e05548c065af07c78f2c0617f70a2915b3cb7e0ba1bd20630;
// the contract being constructed must not have any constructor arguments or the determinism will be broken.
// instead, use a callback to get construction arguments