chore(scripts): add deployment config for sepolia

This commit is contained in:
r4bbit
2025-01-20 10:30:13 +01:00
parent 26f76d4376
commit cb43de39b9

View File

@@ -18,11 +18,16 @@ contract DeploymentConfig is Script {
address private deployer;
// solhint-disable-next-line var-name-mixedcase
address internal SNT_ADDRESS_SEPOLIA = 0xE452027cdEF746c7Cd3DB31CB700428b16cD8E51;
constructor(address _broadcaster) {
if (_broadcaster == address(0)) revert DeploymentConfig_InvalidDeployerAddress();
deployer = _broadcaster;
if (block.chainid == 31_337) {
activeNetworkConfig = getOrCreateAnvilEthConfig();
} else if (block.chainid == 11_155_111) {
activeNetworkConfig = getSepoliaConfig();
} else {
revert DeploymentConfig_NoConfigForChain(block.chainid);
}
@@ -33,6 +38,10 @@ contract DeploymentConfig is Script {
return NetworkConfig({ deployer: deployer, stakingToken: address(stakingToken) });
}
function getSepoliaConfig() public view returns (NetworkConfig memory) {
return NetworkConfig({ deployer: deployer, stakingToken: SNT_ADDRESS_SEPOLIA });
}
// This function is a hack to have it excluded by `forge coverage` until
// https://github.com/foundry-rs/foundry/issues/2988 is fixed.
// See: https://github.com/foundry-rs/foundry/issues/2988#issuecomment-1437784542