Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/slashing yn eth #220

Open
wants to merge 18 commits into
base: bn-build-fix
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 15 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions deployments/ynETH-17000.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@
"STAKING_NODES_OPERATOR": "0x9Dd8F69b62ddFd990241530F47dcEd0Dad7f7d39",
"STAKING_NODE_CREATOR": "0x9Dd8F69b62ddFd990241530F47dcEd0Dad7f7d39",
"VALIDATOR_MANAGER": "0x9Dd8F69b62ddFd990241530F47dcEd0Dad7f7d39",
"implementation-stakingNodesManager": "0xC9cf6740282617f3B392f900De0449E687Ce05e3",
"implementation-stakingNodesManager": "0x28fD4C04620D95c4BeC9397E2D303937779C41FD",
"implementation-ynETH": "0x090D67d3C97712f6C17a037515CbB8502561EE57",
"implementation-executionLayerReceiver": "0x1fbedf3773418f20b9dfeafcd9d263030eb0e42f",
"implementation-consensusLayerReceiver": "0xe7acc0533c650ad0cc11f57f81c38fa19634b1d7",
"implementation-rewardsDistributor": "0xb6ec4d9f71e437c672147c576f1c70ba5da8d159",
"implementation-withdrawalsProcessor": "0x36a38AA91947DbE6539e19512E6FF26576015Bb2",
"implementation-withdrawalsProcessor": "0x9904c5D441947dB77cee7F401Ed76C9fb3754f2C",
"implementation-withdrawalQueueManager": "0x28732d8061D35B77dC2997926e0449dAdc3Ef3DD",
"implementation-ynETHRedemptionAssetsVault": "0x7eBE6EAC9AD9B5e4D637c8f05191b273b009461a",
"implementation-ynViewer": "0xBf1035e71E4a770a08462B20C95dE14763E1D186",
Expand All @@ -38,5 +38,5 @@
"proxyAdmin-withdrawalQueueManager": "0x26425968beb4bD9c09b02C433996Cd05B1Fd4f07",
"proxyAdmin-ynETHRedemptionAssetsVault": "0xd4d8E80d1c959CdC4601Cc6A0cc1EC18aBeB1888",
"proxyAdmin-ynViewer": "0x3ffa0c3fba4adfe2b6e4d7e2f8e6e6324be5305b",
"stakingNodeImplementation": "0xf07861349Ed0cB4603590B47D2269768Ed6E2821"
"stakingNodeImplementation": "0x29AC770AbfA12B0AB726c5E6EB38124061747b6B"
}
7 changes: 5 additions & 2 deletions script/ContractAddresses.sol
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ contract ContractAddresses {
address STRATEGY_MANAGER_ADDRESS;
address STRATEGY_MANAGER_PAUSER_ADDRESS;
address REWARDS_COORDINATOR_ADDRESS;
address ALLOCATION_MANAGER_ADDRESS;
}

struct LSDAddresses {
Expand Down Expand Up @@ -97,7 +98,8 @@ contract ContractAddresses {
DELEGATION_PAUSER_ADDRESS: 0x369e6F597e22EaB55fFb173C6d9cD234BD699111, // TODO: remove this if unused
STRATEGY_MANAGER_ADDRESS: 0x858646372CC42E1A627fcE94aa7A7033e7CF075A,
STRATEGY_MANAGER_PAUSER_ADDRESS: 0xBE1685C81aA44FF9FB319dD389addd9374383e90,
REWARDS_COORDINATOR_ADDRESS: 0x7750d328b314EfFa365A0402CcfD489B80B0adda
REWARDS_COORDINATOR_ADDRESS: 0x7750d328b314EfFa365A0402CcfD489B80B0adda,
ALLOCATION_MANAGER_ADDRESS: 0x0000000000000000000000000000000000000000 // TODO: Update this with correct address after mainnet deployment
}),
lsd: LSDAddresses({
SFRXETH_ADDRESS: 0xac3E018457B222d93114458476f3E3416Abbe38F,
Expand Down Expand Up @@ -158,7 +160,8 @@ contract ContractAddresses {
DELEGATION_PAUSER_ADDRESS: 0x28Ade60640fdBDb2609D8d8734D1b5cBeFc0C348, // Placeholder address, replaced with address(1) for holesky
STRATEGY_MANAGER_ADDRESS: 0xdfB5f6CE42aAA7830E94ECFCcAd411beF4d4D5b6, // Placeholder address, replaced with address(1) for holesky
STRATEGY_MANAGER_PAUSER_ADDRESS: 0x28Ade60640fdBDb2609D8d8734D1b5cBeFc0C348,
REWARDS_COORDINATOR_ADDRESS: 0xAcc1fb458a1317E886dB376Fc8141540537E68fE
REWARDS_COORDINATOR_ADDRESS: 0xAcc1fb458a1317E886dB376Fc8141540537E68fE,
ALLOCATION_MANAGER_ADDRESS: 0x78469728304326CBc65f8f95FA756B0B73164462
}),
lsd: LSDAddresses({
SFRXETH_ADDRESS: 0xa63f56985F9C7F3bc9fFc5685535649e0C1a55f3,
Expand Down
8 changes: 8 additions & 0 deletions script/ynETH/DeployStakingNode.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,11 @@ contract DeployStakingNode is BaseYnETHScript {
// Deployer Public Key: 0x445b64828683ae4B6D5f0542f9E97707d631A847
// Staking Node Implementation: 0x79388c8cc46069c0e3f285f053692D7397e65e1e
// Deployment JSON file written successfully: /Users/parth/Desktop/coding/yieldnest/prod-code-repos/yieldnest-protocol-private/deployments/ynETH-1.json


// HOLESKY DEPLOYMENT
// == Logs ==
// Deployer Public Key: 0x445b64828683ae4B6D5f0542f9E97707d631A847
// Current Block Number: 3375330
// Current Chain ID: 17000
// Staking Node Implementation: 0x29AC770AbfA12B0AB726c5E6EB38124061747b6B
7 changes: 7 additions & 0 deletions script/ynETH/DeployStakingNodesManager.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,10 @@ contract DeployStakingNodesManager is BaseYnETHScript {
// Deployer Public Key: 0x445b64828683ae4B6D5f0542f9E97707d631A847
// StakingNodesManager Implementation: 0x8E0b49B4A4384D812Bc6F55fA6412547524D41Ab
// Deployment JSON file written successfully: /Users/parth/Desktop/coding/yieldnest/prod-code-repos/yieldnest-protocol-private/deployments/ynETH-1.json

// HOLESKY DEPLOYMENT
// == Logs ==
// Deployer Public Key: 0x445b64828683ae4B6D5f0542f9E97707d631A847
// Current Block Number: 3375331
// Current Chain ID: 17000
// StakingNodesManager Implementation: 0x28fD4C04620D95c4BeC9397E2D303937779C41FD
38 changes: 38 additions & 0 deletions script/ynETH/DeployWithdrawalsProcessor.s.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
// SPDX-License-Identifier: BSD 3-Clause License
pragma solidity ^0.8.24;

import {BaseYnETHScript} from "script/ynETH/BaseYnETHScript.s.sol";
import {WithdrawalsProcessor} from "src/WithdrawalsProcessor.sol";
import {console} from "lib/forge-std/src/console.sol";

contract DeployWithdrawalsProcessor is BaseYnETHScript {

function run() external {

uint256 deployerPrivateKey = vm.envUint("PRIVATE_KEY");

address publicKey = vm.addr(deployerPrivateKey);
console.log("Deployer Public Key:", publicKey);

address _broadcaster = vm.addr(deployerPrivateKey);

vm.startBroadcast(deployerPrivateKey);

console.log("Current Block Number:", block.number);
console.log("Current Chain ID:", block.chainid);

WithdrawalsProcessor withdrawalsProcessorImplementation = new WithdrawalsProcessor();

console.log("Withdrawals Processor Implementation:", address(withdrawalsProcessorImplementation));

vm.stopBroadcast();

}
}

// HOLESKY DEPLOYMENT
// == Logs ==
// Deployer Public Key: 0x445b64828683ae4B6D5f0542f9E97707d631A847
// Current Block Number: 3375332
// Current Chain ID: 17000
// Withdrawals Processor Implementation: 0x9904c5D441947dB77cee7F401Ed76C9fb3754f2C
3 changes: 3 additions & 0 deletions script/ynETH/VerifyYnETH.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -639,12 +639,15 @@ contract Verify is BaseYnETHScript {
function veryifySanityChecks() internal view {
// Check that previewDeposit of 1 ETH is less than 1 ether
uint256 previewDepositResult = deployment.ynETH.previewDeposit(1 ether);
console.log("previewDepositResult", previewDepositResult);
require(previewDepositResult < 1 ether, "previewDeposit of 1 ETH should be less than 1 ether");
console.log("\u2705 previewDeposit of 1 ETH is less than 1 ether");

// Check that totalSupply is less than totalAssets
uint256 totalSupply = deployment.ynETH.totalSupply();
uint256 totalAssets = deployment.ynETH.totalAssets();
console.log("totalSupply", totalSupply);
console.log("totalAssets", totalAssets);
require(totalSupply < totalAssets, "totalSupply should be less than totalAssets");
console.log("\u2705 totalSupply is less than totalAssets");

Expand Down
Loading
Loading