Skip to content

Commit 1c20380

Browse files
authored
Updated deployment scripts (#45)
* feat: update deployment process
1 parent 6cc6ad0 commit 1c20380

20 files changed

+270
-140
lines changed

.env.sample

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
HOODI_RPC_URL=
2+
MAINNET_RPC_URL=
3+
ETHERSCAN_API_KEY=
4+
DEPLOYER_PRIVATE_KEY=

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,11 +142,11 @@ These functions verify balances and authorize the caller to retrieve their accum
142142

143143
### How to Deploy
144144

145-
**1)** Run the deployment script `DeployProxy.s.sol` defined in `scripts/`:
145+
**2)** Set the environment variables in the `.env` file.
146146

147-
__`❍ npm run deploy:holesky`__: verification is done automatically.
147+
**1)** Run the deployment script `DeployAllHoodi.s.sol` defined in `script/`:
148148

149-
__`❍ npm run deploy:hoodi`__: verification needs to be done manually for now.
149+
__`❍ npm run deploy:hoodi-stage`__: verification is done automatically.
150150

151151
### How to Update Module Contracts
152152

artifacts/deploy-hoodi-stage.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"addresses": {
3+
"BAppsModule": "0xF2b0c91b5256aD75585438C2722d5E7119666288",
4+
"ProtocolModule": "0x5C08fb73Ba1E8Fd2894e0A3706C1e4CfBEA3F833",
5+
"SSVBasedAppsImpl": "0x7E438E9264B431Fb62fbE2BFa350b9860cf7E8AA",
6+
"SSVBasedAppsProxy": "0x1F3d4e4aEeA5406e3A7119d8daa31C67Ed3B13de",
7+
"StrategyModule": "0x4b4638B067946c395C32CD0DFE5399E0899C7542"
8+
},
9+
"chainInfo": {
10+
"chainId": 560048,
11+
"deploymentBlock": 253405
12+
}
13+
}

foundry.toml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,15 @@ optimizer = true
77
optimizer_runs = 10_000
88
gas_reports = ["*"]
99
gas_reports_ignore = ["ERC20Mock", "BasedAppMock", "BasedAppMock2", "BasedAppMock3", "ERC1967Proxy"]
10+
fs_permissions = [{ access = "read", path = "./script/config/"}, { access = "write", path = "./artifacts/"}]
11+
12+
[rpc_endpoints]
13+
hoodi = "${HOODI_RPC_URL}"
14+
mainnet = "${MAINNET_RPC_URL}"
15+
16+
[etherscan]
17+
hoodi = { key = "${ETHERSCAN_API_KEY}" }
18+
mainnet = { key = "${ETHERSCAN_API_KEY}" }
1019

1120
[fmt]
1221
bracket_spacing = false

lib/openzeppelin-contracts

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,18 @@
2020
"scripts": {
2121
"compile": "forge compile",
2222
"build": "npm run lint:fix && forge clean && forge build",
23-
"deploy:holesky": "npm run build && forge script scripts/DeployProxy.s.sol --rpc-url $HOLESKY_RPC_URL --private-key $PRIVATE_KEY --verify -vvv --broadcast",
24-
"deploy:hoodi": "npm run build && forge script scripts/DeployProxy.s.sol --rpc-url $HOODI_RPC_URL --private-key $PRIVATE_KEY --etherscan-api-key $ETHERSCAN_API_KEY --verify -vvv --broadcast",
25-
"verify:hoodi": "forge verify-contract --rpc-url https://hoodi.cloud.blockscout.com/api/eth-rpc --verifier blockscout --verifier-url 'https://hoodi.cloud.blockscout.com/api/' $IMPLEMENTATION_ADDRESS src/SSVBasedApps.sol:SSVBasedApps",
23+
"deploy:hoodi-stage": "source .env && forge script script/DeployAllHoodi.s.sol false --sig 'run(bool)' --rpc-url $HOODI_RPC_URL --private-key $DEPLOYER_PRIVATE_KEY --verify -vvv --broadcast",
24+
"deploy:hoodi-prod": "source .env && forge script script/DeployAllHoodi.s.sol true --sig 'run(bool)' --rpc-url $HOODI_RPC_URL --private-key $DEPLOYER_PRIVATE_KEY --verify -vvv --broadcast",
25+
"deploy:mainnet": "source .env && forge script script/DeployAllMainnet.s.sol --rpc-url $MAINNET_RPC_URL --private-key $DEPLOYER_PRIVATE_KEY --verify -vvv --broadcast",
2626
"gas-report": "forge test --gas-report",
2727
"generate-docs": "solc --include-path node_modules --base-path . --combined-json userdoc,devdoc src/SSVBasedApps.sol --output-dir ./docs --overwrite",
2828
"prepare": "husky",
2929
"lint:solhint": "solhint './src/**/*.sol'",
3030
"lint:check": "prettier --check **.sol",
3131
"lint:fix": "prettier --write **.sol",
3232
"test": "forge test",
33-
"test-coverage": "forge coverage --no-match-coverage \"(scripts|test)\"",
34-
"test-coverage-report": "forge coverage --no-match-coverage \"(scripts|test)\" --report debug > test.txt"
33+
"test-coverage": "forge coverage --no-match-coverage \"(script|test)\"",
34+
"test-coverage-report": "forge coverage --no-match-coverage \"(script|test)\" --report debug > test.txt"
3535
},
3636
"devDependencies": {
3737
"@openzeppelin/contracts-upgradeable": "^5.3.0",

remappings.txt

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,8 @@
33
@ssv/src/middleware=src/middleware
44
@ssv/lib/=lib/
55
@ssv/test/=test/
6-
@ssv/scripts/=scripts/
7-
@ssv/forge-std/=lib/forge-std/src/
6+
@ssv/script/=script/
87
@ssv/src/core=src/core
98
@ssv/src/core/interfaces=src/core/interfaces
109
@ssv/src/core/libraries=src/core/libraries
11-
@ssv/src/core/modules=src/core/modules
12-
10+
@ssv/src/core/modules=src/core/modules

0 commit comments

Comments
 (0)