Skip to content
Closed
Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ broadcast
logs

# Dotenv file
.env
.*

# npm
node_modules
Expand Down
12 changes: 11 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,16 @@ simulate:
forge build
@forge script $(DEPLOY_SCRIPT) --fork-url $(if $(filter sonic,$(NETWORK)),$(SONIC_URL),$(MAINNET_URL)) -vvvv

# ╔══════════════════════════════════════════════════════════════════════════════╗
# ║ GOVERNANCE ║
# ╚══════════════════════════════════════════════════════════════════════════════╝

# Check on-chain governance state and update deployment JSON
# Usage: make update-governance (mainnet) or make update-governance NETWORK=sonic
update-governance:
forge build
@forge script script/deploy/UpdateGovernance.s.sol --fork-url $(if $(filter sonic,$(NETWORK)),$(SONIC_URL),$(MAINNET_URL)) -vvvvv

# ╔══════════════════════════════════════════════════════════════════════════════╗
# ║ VERIFY ║
# ╚══════════════════════════════════════════════════════════════════════════════╝
Expand Down Expand Up @@ -178,4 +188,4 @@ frame:
.PHONY: test test-base test-unit test-fork test-smoke test-invariants \
coverage coverage-html gas snapshot \
deploy-mainnet deploy-local deploy-testnet deploy-holesky deploy-sonic simulate \
match clean clean-crytic clean-all install frame
update-governance match clean clean-crytic clean-all install frame
61 changes: 45 additions & 16 deletions build/deployments-1.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,20 @@
"implementation": "0x90c7ABC962f96de171ee395A242D2Ff794D0a04c",
"name": "MORPHO_MARKET_MEVCAPITAL_IMP"
},
{
"implementation": "0x0ad39D67404aE36Fe476eFDDE1306a5414383544",
"name": "MORPHO_MARKET_ORIGIN"
},
{
"implementation": "0x2ea9D1827973813D77aA8f35BD23cb1F1311A648",
"name": "MORPHO_MARKET_ORIGIN_IMPL"
},
{
"implementation": "0x6bac785889A4127dB0e0CeFEE88E0a9F1Aaf3cC7",
"name": "OETH_ARM"
},
{
"implementation": "0x187FfF686a5f42ACaaF56469FcCF8e6Feca18248",
"implementation": "0x9a2be51e45eec98f75b3e6e1b334246c94663641",
"name": "OETH_ARM_IMPL"
},
{
Expand All @@ -100,63 +108,84 @@
"executions": [
{
"name": "001_CoreMainnet",
"timestamp": 1723685111
"timestampDep": 1723685111,
"timestampGov": 1723685111
},
{
"name": "002_UpgradeMainnet",
"timestamp": 1726812322
"timestampDep": 1726812322,
"timestampGov": 1726812322
},
{
"name": "003_UpgradeLidoARMScript",
"timestamp": 1729073099
"timestampDep": 1729073099,
"timestampGov": 1729073099
},
{
"name": "004_UpdateCrossPriceScript",
"timestamp": 1739872139
"timestampDep": 1739872139,
"timestampGov": 1740476939
},
{
"name": "005_RegisterLidoWithdrawalsScript",
"timestamp": 1743500783
"timestampDep": 1743500783,
"timestampGov": 1744105583
},
{
"name": "006_ChangeFeeCollector",
"timestamp": 1751894483
"timestampDep": 1751894483,
"timestampGov": 1752499283
},
{
"name": "007_UpgradeLidoARMMorphoScript",
"timestamp": 1754407511
"timestampDep": 1754407511,
"timestampGov": 1755012311
},
{
"name": "008_DeployPendleAdaptor",
"timestamp": 1755770279
"timestampDep": 1755770279,
"timestampGov": 1755770279
},
{
"name": "009_UpgradeLidoARMSetBufferScript",
"timestamp": 1755692363
"timestampDep": 1755692363,
"timestampGov": 1756297163
},
{
"name": "010_UpgradeLidoARMAssetScript",
"timestamp": 1764755147
"timestampDep": 1764755147,
"timestampGov": 1765359947
},
{
"name": "011_DeployEtherFiARMScript",
"timestamp": 1761812927
"timestampDep": 1761812927,
"timestampGov": 1761812927
},
{
"name": "012_UpgradeEtherFiARMScript",
"timestamp": 1763557643
"timestampDep": 1763557643,
"timestampGov": 1763557643
},
{
"name": "013_UpgradeOETHARMScript",
"timestampDep": 1765353443,
"timestampGov": 1765958243

},
{
"name": "014_DeployEthenaARMScript",
"timestamp": 1764664655
"timestampDep": 1764664655,
"timestampGov": 1764664655
},
{
"name": "015_UpgradeEthenaARMScript",
"timestamp": 1766319523
"timestampDep": 1766319523,
"timestampGov": 1766319523
},
{
"name": "016_UpgradeLidoARMCrossPriceScript",
"timestamp": 1768078823
"timestampDep": 1768078823,
"timestampGov": 1768683623
}
]
}
15 changes: 10 additions & 5 deletions build/deployments-146.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,23 +44,28 @@
"executions": [
{
"name": "001_DeployOriginARMProxyScript",
"timestamp": 1747110973
"timestampDep": 1747110973,
"timestampGov": 1747110973
},
{
"name": "002_DeployOriginARMScript",
"timestamp": 1747907433
"timestampDep": 1747907433,
"timestampGov": 1747907433
},
{
"name": "003_UpgradeOriginARMScriptScript",
"timestamp": 1748603225
"timestampDep": 1748603225,
"timestampGov": 1748603225
},
{
"name": "004_DeployPendleAdaptor",
"timestamp": 1755780926
"timestampDep": 1755780926,
"timestampGov": 1755780926
},
{
"name": "005_UpgradeOriginARMSetBufferScript",
"timestamp": 1755782543
"timestampDep": 1755782543,
"timestampGov": 1755782543
}
]
}
18 changes: 0 additions & 18 deletions build/deployments-17000.json

This file was deleted.

16 changes: 14 additions & 2 deletions script/deploy/Base.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,10 @@ abstract contract Base {
/// Address is computed as the uint256 hash of "Resolver".
/// Provides:
/// - implementations(name): Get deployed contract address by name
/// - executionExists(name): Check if a script has been run
/// - depTimestamp(name): Get deployment timestamp for a script
/// - govTimestamp(name): Get governance timestamp for a script
/// - addContract(name, addr): Register a deployed contract
/// - addExecution(name, timestamp): Mark a script as executed
/// - addExecution(name, depTs, govTs): Record a script execution
Resolver internal resolver = Resolver(address(uint160(uint256(keccak256("Resolver")))));

// ==================== Logging Configuration ==================== //
Expand Down Expand Up @@ -89,6 +90,17 @@ abstract contract Base {
vm.resumeTracing();
}

// ==================== Helpers ==================== //

/// @notice Extracts script name (without extension) from a full file path.
/// @dev Example: "/path/to/015_UpgradeEthenaARMScript.s.sol" -> "015_UpgradeEthenaARMScript"
/// @param fullPath The full filesystem path to a deployment script file
/// @return The script name without directory prefix or file extension
function _extractScriptName(string memory fullPath) internal view returns (string memory) {
string[] memory segments = vm.split(fullPath, "/");
return vm.split(segments[segments.length - 1], ".")[0];
}

// ==================== Constructor ==================== //

/// @notice Initializes the chain name mappings.
Expand Down
Loading