Skip to content

Commit

Permalink
Add checks for withdrawer role, updated feeReciever
Browse files Browse the repository at this point in the history
  • Loading branch information
xhad committed Apr 7, 2024
1 parent 71eea1d commit 25af2b9
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
4 changes: 2 additions & 2 deletions script/DeployYieldNest.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ contract DeployYieldNest is BaseScript {
console.log("Current Block Number:", block.number);
console.log("Current Chain ID:", block.chainid);

feeReceiver = payable(_broadcaster); // Casting the default signer address to payable
feeReceiver = payable(actors.FEE_RECEIVER); // Casting the default signer address to payable

ContractAddresses contractAddresses = new ContractAddresses();
ContractAddresses.ChainAddresses memory chainAddresses = contractAddresses.getChainAddresses(block.chainid);
Expand Down Expand Up @@ -146,7 +146,7 @@ contract DeployYieldNest is BaseScript {
admin: actors.ADMIN,
executionLayerReceiver: executionLayerReceiver,
consensusLayerReceiver: consensusLayerReceiver, // Adding consensusLayerReceiver to the initialization
feesReceiver: feeReceiver, // Assuming the contract itself will receive the fees
feesReceiver: feeReceiver, // should be the FEE_RECEIVER role
ynETH: IynETH(address(yneth))
});
rewardsDistributor.initialize(rewardsDistributorInit);
Expand Down
2 changes: 0 additions & 2 deletions script/Upgrade.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ contract Upgrade is BaseScript {
console.log("Upgrading contract with name:", contractName);

uint256 deployerPrivateKey = vm.envUint("PRIVATE_KEY");
address _broadcaster = vm.addr(deployerPrivateKey);
vm.startBroadcast(deployerPrivateKey);

if (keccak256(bytes(contractName)) == keccak256("StakingNode")) {
Expand All @@ -45,7 +44,6 @@ contract Upgrade is BaseScript {
(address proxyAddr, address implAddress) = _deployImplementation(contractName);
vm.stopBroadcast();

ITransparentUpgradeableProxy proxy = ITransparentUpgradeableProxy(proxyAddr);
console.log(string.concat(contractName, " address (proxy):"));
console.log(proxyAddr);
console.log("New implementation address:");
Expand Down
7 changes: 7 additions & 0 deletions script/Verify.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,13 @@ contract Verify is BaseScript {
);
console.log("\u2705 rewardsDistributor: DEFAULT_ADMIN_ROLE");

// FEE_RECEIVER
require(
deployment.rewardsDistributor.feesReceiver() == actors.FEE_RECEIVER,
"rewardsDistributor: FEE_RECEIVER INVALID"
);
console.log("\u2705 rewardsDistributor: FEE_RECEIVER");

//--------------------------------------------------------------------------------------
//------------------ stakingNodesManager roles ---------------------------------------
//--------------------------------------------------------------------------------------
Expand Down

0 comments on commit 25af2b9

Please sign in to comment.