diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 532168b..9f64538 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -40,5 +40,8 @@ jobs:
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
+ - name: Install Dependencies
+ run: forge soldeer install
+
- name: Run fork tests
run: forge test -vvv --summary --detailed
diff --git a/.gitignore b/.gitignore
index 4b3bc4a..8a07b5c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -24,6 +24,11 @@ artifacts
# Forge
.gas-snapshot
+dependencies/
+soldeer.lock
+
+# Coverage
+lcov.info*
# Defender Actions
dist
diff --git a/.gitmodules b/.gitmodules
deleted file mode 100644
index 888d42d..0000000
--- a/.gitmodules
+++ /dev/null
@@ -1,3 +0,0 @@
-[submodule "lib/forge-std"]
- path = lib/forge-std
- url = https://github.com/foundry-rs/forge-std
diff --git a/.vscode/settings.json b/.vscode/settings.json
index 5382847..9356b92 100644
--- a/.vscode/settings.json
+++ b/.vscode/settings.json
@@ -8,5 +8,6 @@
"solidity.packageDefaultDependenciesContractsDirectory": "src",
"solidity.packageDefaultDependenciesDirectory": "lib",
"solidity.compileUsingRemoteVersion": "v0.8.23+commit.f704f362",
- "solidity.formatter": "forge"
+ "solidity.formatter": "forge",
+ "cSpell.words": ["traderate"]
}
diff --git a/Makefile b/Makefile
index 69f8604..886fa46 100644
--- a/Makefile
+++ b/Makefile
@@ -9,7 +9,14 @@ default:
# Always keep Forge up to date
install:
foundryup
- forge install
+ forge soldeer install
+ yarn install
+
+clean:
+ @rm -rf broadcast cache out
+
+clean-all:
+ @rm -rf broadcast cache out dependencies node_modules soldeer.lock
gas:
@forge test --gas-report
@@ -19,14 +26,20 @@ snapshot:
@forge snapshot
# Tests
+test-std:
+ forge test --summary --fail-fast --show-progress
+
test:
- @forge test --summary
+ @FOUNDRY_NO_MATCH_CONTRACT=Invariant make test-std
test-f-%:
- @FOUNDRY_MATCH_TEST=$* make test
+ @FOUNDRY_MATCH_TEST=$* make test-std
test-c-%:
- @FOUNDRY_MATCH_CONTRACT=$* make test
+ @FOUNDRY_MATCH_CONTRACT=$* make test-std
+
+test-all:
+ @make test-std
# Coverage
coverage:
@@ -49,20 +62,10 @@ deploy:
@forge script script/deploy/DeployManager.sol --rpc-url $(PROVIDER_URL) --private-key ${DEPLOYER_PRIVATE_KEY} --broadcast --slow --verify -vvvv
deploy-testnet:
- @forge script script/deploy/DeployManager.sol --rpc-url $(TESTNET_URL) --private-key ${DEPLOYER_PRIVATE_KEY} --broadcast --slow -vvvv
+ @forge script script/deploy/DeployManager.sol --rpc-url $(TESTNET_URL) --broadcast --slow --unlocked -vvvv
deploy-holesky:
- @forge script script/deploy/DeployManager.sol --rpc-url $(HOLESKY_URL) --private-key ${DEPLOYER_PRIVATE_KEY} --broadcast --slow --verify -vvvv
-
-# Upgrade scripts
-upgrade:
- @forge script script/002_Upgrade.s.sol --rpc-url $(PROVIDER_URL) --private-key ${DEPLOYER_PRIVATE_KEY} --broadcast --slow --verify -vvvv
-
-upgrade-testnet:
- @forge script script/002_Upgrade.s.sol --rpc-url $(TESTNET_URL) --private-key ${DEPLOYER_PRIVATE_KEY} --broadcast --slow -vvvv
-
-upgrade-holesky:
- @forge script script/002_Upgrade.s.sol --rpc-url $(HOLESKY_URL) --private-key ${DEPLOYER_PRIVATE_KEY} --broadcast --slow --verify -vvvv
+ @forge script script/deploy/DeployManager.sol --rpc-url $(HOLESKY_URL) --private-key ${DEPLOYER_PRIVATE_KEY} --broadcast --slow --verify -vvv
# Override default `test` and `coverage` targets
.PHONY: test coverage
diff --git a/README.md b/README.md
index 9c492bc..571b645 100644
--- a/README.md
+++ b/README.md
@@ -116,14 +116,18 @@ function swapTokensForExactTokens(
### Install
```
-foundryup
-forge install
-forge compile
+make install
cp .env.example .env
```
In the `.env` file, set the environment variables as needed. eg `PROVIDER_URL` for the RPC endpoint.
+### Format and Compile
+
+```
+make
+```
+
### Running tests
Fork and Unit tests run with the same command, as the fork is initiated on the test file itself if needed.
diff --git a/build/deployments-1.json b/build/deployments-1.json
index 50a7d9c..0d4b24f 100644
--- a/build/deployments-1.json
+++ b/build/deployments-1.json
@@ -1,7 +1,16 @@
{
- "executions": { "001_CoreMainnet": 1723685111 },
+ "executions": {
+ "001_CoreMainnet": 1723685111,
+ "002_UpgradeMainnet": 1726812322,
+ "003_UpgradeLidoARMScript": 1729073099
+ },
"contracts": {
+ "LIDO_ARM": "0x85B78AcA6Deae198fBF201c82DAF6Ca21942acc6",
+ "LIDO_ARM_CAP_IMPL": "0x8506486813d025C5935dF481E450e27D2e483dc9",
+ "LIDO_ARM_CAP_MAN": "0xf54ebff575f699d281645c6F14Fe427dFFE629CF",
+ "LIDO_ARM_IMPL": "0x3d724176c8f1F965eF4020CB5DA5ad1a891BEEf1",
+ "LIDO_ARM_ZAPPER": "0x01F30B7358Ba51f637d1aa05D9b4A60f76DAD680",
"OETH_ARM": "0x6bac785889A4127dB0e0CeFEE88E0a9F1Aaf3cC7",
- "OETH_ARM_IMPL": "0xd8fF298eAed581f74ab845Af62C48aCF85B2f05e"
+ "OETH_ARM_IMPL": "0x187FfF686a5f42ACaaF56469FcCF8e6Feca18248"
}
}
diff --git a/docs/CapManagerHierarchy.svg b/docs/CapManagerHierarchy.svg
new file mode 100644
index 0000000..4954d4f
--- /dev/null
+++ b/docs/CapManagerHierarchy.svg
@@ -0,0 +1,46 @@
+
+
+
+
+
diff --git a/docs/CapManagerSquashed.svg b/docs/CapManagerSquashed.svg
new file mode 100644
index 0000000..8fbf96f
--- /dev/null
+++ b/docs/CapManagerSquashed.svg
@@ -0,0 +1,58 @@
+
+
+
+
+
diff --git a/docs/LidoARMHierarchy.svg b/docs/LidoARMHierarchy.svg
new file mode 100644
index 0000000..9a92f7e
--- /dev/null
+++ b/docs/LidoARMHierarchy.svg
@@ -0,0 +1,60 @@
+
+
+
+
+
diff --git a/docs/LidoARMPublicSquashed.svg b/docs/LidoARMPublicSquashed.svg
new file mode 100644
index 0000000..917334b
--- /dev/null
+++ b/docs/LidoARMPublicSquashed.svg
@@ -0,0 +1,94 @@
+
+
+
+
+
diff --git a/docs/LidoARMSquashed.svg b/docs/LidoARMSquashed.svg
new file mode 100644
index 0000000..0d51cac
--- /dev/null
+++ b/docs/LidoARMSquashed.svg
@@ -0,0 +1,120 @@
+
+
+
+
+
diff --git a/docs/OEthARMHierarchy.svg b/docs/OEthARMHierarchy.svg
index ace4558..89dbae3 100644
--- a/docs/OEthARMHierarchy.svg
+++ b/docs/OEthARMHierarchy.svg
@@ -4,123 +4,110 @@
-