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

script for deploying and verifying yneigen #158

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
ac9bca5
added folders
MrDeadCe11 Aug 23, 2024
162d1f9
base deployer, setting up bash script
MrDeadCe11 Aug 23, 2024
da6df02
getting the bash script to start working
MrDeadCe11 Aug 23, 2024
3b036f0
script is setup and base deployer is tested
MrDeadCe11 Aug 23, 2024
3dda0ac
missing files
MrDeadCe11 Aug 23, 2024
1a69d68
script for deploying and verifying yneigen
dan13ram Aug 24, 2024
1a59226
script for deploying and verifying yneigen
dan13ram Aug 24, 2024
22433c7
foundry.toml fix
MrDeadCe11 Aug 24, 2024
22ca977
Merge branch 'feat/YnEigenScript' of https://github.com/raid-guild/yi…
MrDeadCe11 Aug 24, 2024
13b6e54
added cast wallet deployment
MrDeadCe11 Aug 24, 2024
99bf480
missing files
MrDeadCe11 Aug 24, 2024
aa836c0
missing files
MrDeadCe11 Aug 24, 2024
0cd27cb
finished bash script
MrDeadCe11 Aug 24, 2024
a7b2eef
Merge branch 'feat/YnEigen-Deployer' into feat/YnEigenScript
MrDeadCe11 Aug 24, 2024
54cd443
Merge pull request #1 from raid-guild/feat/YnEigenScript
MrDeadCe11 Aug 24, 2024
f6c3bcb
update env sample
MrDeadCe11 Aug 24, 2024
41305a4
Merge branch 'feat/YnEigen-Deployer' of https://github.com/raid-guild…
MrDeadCe11 Aug 24, 2024
89a9d0f
removed private key from the deployment script to use cast wallet
MrDeadCe11 Aug 24, 2024
902f423
added folders
MrDeadCe11 Aug 23, 2024
9057e58
base deployer, setting up bash script
MrDeadCe11 Aug 23, 2024
b21f09d
getting the bash script to start working
MrDeadCe11 Aug 23, 2024
f43667a
script is setup and base deployer is tested
MrDeadCe11 Aug 23, 2024
0241b3f
missing files
MrDeadCe11 Aug 23, 2024
89a3755
foundry.toml fix
MrDeadCe11 Aug 24, 2024
46efb0c
update env sample
MrDeadCe11 Aug 24, 2024
737b3f4
script for deploying and verifying yneigen
dan13ram Aug 24, 2024
4374aa2
added cast wallet deployment
MrDeadCe11 Aug 24, 2024
1632605
missing files
MrDeadCe11 Aug 24, 2024
25f9e96
missing files
MrDeadCe11 Aug 24, 2024
2e225d7
finished bash script
MrDeadCe11 Aug 24, 2024
d8443df
removed private key from the deployment script to use cast wallet
MrDeadCe11 Aug 24, 2024
50c153a
fixed old forge scripts + updated ynEigen make script to not require …
dan13ram Aug 25, 2024
833a55a
updated make script to also broadcast and verify
MrDeadCe11 Aug 26, 2024
d240a94
Merge branch 'feat/YnEigen-Deployer' of https://github.com/raid-guild…
MrDeadCe11 Aug 26, 2024
3ee0768
updated make script to also broadcast and verify
MrDeadCe11 Aug 26, 2024
537ac36
added verify only script to make file
MrDeadCe11 Aug 27, 2024
08134a0
added verify to bash script
MrDeadCe11 Aug 27, 2024
05b5814
rebaned original YnLSDe-17000 to YnLSDe-17000-original.json
MrDeadCe11 Aug 27, 2024
eea4473
fixed bash cases
MrDeadCe11 Aug 27, 2024
8fceacd
working factory but over the size limit
dan13ram Aug 25, 2024
8415a75
refactored scripts
dan13ram Aug 25, 2024
41139e5
refactor ynEigenViewer to support initialization
dan13ram Aug 25, 2024
b6cd0a4
minor fix for ynEigenViewer
dan13ram Aug 25, 2024
bc3da91
read account name from .env
dan13ram Aug 27, 2024
c2dd3fb
Merge pull request #2 from raid-guild/feat/ynEigen-Factory
dan13ram Aug 27, 2024
72b0da4
fixed make file
dan13ram Aug 27, 2024
334c850
Revert "refactor ynEigenViewer to support initialization"
dan13ram Aug 27, 2024
498985f
use generic rpc_url, remove unwanted files
dan13ram Aug 27, 2024
c08e7a4
revert ContractAddresses.sol
dan13ram Aug 27, 2024
6af03e4
fixed assets in inputJson for ynLSDe
MrDeadCe11 Aug 27, 2024
c86dc0c
moved YNEigenStructs and YnEigenFactory to the script/YnEigen folder …
MrDeadCe11 Aug 27, 2024
55aa1d9
added missing files
MrDeadCe11 Aug 27, 2024
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
7 changes: 6 additions & 1 deletion .env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,9 @@ STAKING_ADMIN_ADDRESS=
STAKING_NODES_ADMIN_ADDRESS=
VALIDATOR_MANAGER_ADDRESS=
REWARDS_DISTRIBUTOR_ADDRESS=
PROXY_OWNER
PROXY_OWNER=

# for deploying the contracts
RPC_URL=
# for use with cast wallet. store the deployer private key in the keystore and put the public address here.
DEPLOYER_ADDRESS=
14 changes: 14 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,17 @@ deploy-protocol :; forge script script/DeployYieldNest.s.sol:DeployYieldNest --
# Verify

verify-roles :; forge script script/Verify.s.sol --rpc-url ${rpc}

# to set up cast wallet run: cast wallet import yieldnestDeployerKey --interactive
# then import the private key with which you wish to deploy, create a password and add the public address of that key to the .env under DEPLOYER_ADDRESS.

# make ynEigen path=script/ynEigen/input/lsd-mainnet.json rpc=your-rpc-here deployer=0xYourPublicAddressThatCorrespondsToYourSavedPrivateKeyInyieldnestDeployerKey api=etherscanApiKey
deployerAccountName ?= yieldnestDeployerKey
ynEigen :; forge script script/ynEigen/YnEigenScript.s.sol:YnEigenScript --rpc-url ${rpc} --sig "run(string)" ${path} --account ${deployerAccountName} --sender ${deployer} --broadcast --etherscan-api-key ${api} --verify

# make ynEigen-verify path=script/ynEigen/input/lsd-mainnet.json rpc=your-rpc-here
ynEigen-verify :; forge script script/ynEigen/YnEigenScript.s.sol:YnEigenScript --rpc-url ${rpc} --sig "verify(string)" ${path} --broadcast

# alternative bash script with less inputs
# make ynEigen-bash path=script/ynEigen/input/lsd-mainnet.json
ynEigen-bash :; ./script/ynEigen/bash/deployYnEigen.sh ${path}
10 changes: 7 additions & 3 deletions foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,17 @@ src = 'src'
out = 'out'
libs = ['lib']
test = 'test'
cache_path = 'cache'
cache_path = 'cache'

fs_permissions = [{ access = "read-write", path = "./deployments"}, { access = "read", path = "./"}]
fs_permissions = [
{ access = "read-write", path = "./deployments" },
{ access = "read", path = "./" },
]

optimizer = true
optimizer-runs = 200
evm_version = "cancun"
solc_version = "0.8.24"
prompt_timeout = 120

ignored_error_codes = [5159,2018,5574,3860]
ignored_error_codes = [5159, 2018, 5574, 3860]
2 changes: 1 addition & 1 deletion lib/forge-std
Submodule forge-std updated 2 files
+10 −0 src/Vm.sol
+1 −1 test/Vm.t.sol
14 changes: 13 additions & 1 deletion script/BaseScript.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,15 @@ import {ynETH} from "src/ynETH.sol";
import {Script} from "lib/forge-std/src/Script.sol";
import {Utils} from "script/Utils.sol";
import {ActorAddresses} from "script/Actors.sol";
import {ContractAddresses} from "script/ContractAddresses.sol";
import {console} from "lib/forge-std/src/console.sol";

abstract contract BaseScript is Script, Utils {
using stdJson for string;

ActorAddresses private _actorAddresses = new ActorAddresses();
ContractAddresses private _contractAddresses = new ContractAddresses();

function serializeActors(string memory json) public {
ActorAddresses.Actors memory actors = getActors();
vm.serializeAddress(json, "DEFAULT_SIGNER", address(actors.eoa.DEFAULT_SIGNER));
Expand Down Expand Up @@ -42,6 +46,14 @@ abstract contract BaseScript is Script, Utils {
}

function getActors() public returns (ActorAddresses.Actors memory actors) {
return (new ActorAddresses()).getActors(block.chainid);
return _actorAddresses.getActors(block.chainid);
}

function getChainAddresses() public returns (ContractAddresses.ChainAddresses memory chainAddresses) {
return _contractAddresses.getChainAddresses(block.chainid);
}

function isSupportedChainId(uint256 chainId) public returns (bool) {
return _contractAddresses.isSupportedChainId(chainId);
}
}
4 changes: 4 additions & 0 deletions script/ContractAddresses.sol
Original file line number Diff line number Diff line change
Expand Up @@ -191,4 +191,8 @@ contract ContractAddresses {
function getChainAddresses(uint256 chainId) external view returns (ChainAddresses memory) {
return addresses[chainId];
}

function isSupportedChainId(uint256 chainId) external view returns (bool) {
return chainId == chainIds.mainnet || chainId == chainIds.holeksy;
}
}
Loading