Skip to content

Commit

Permalink
fix: remove view modifier from ConfigParser functions
Browse files Browse the repository at this point in the history
  • Loading branch information
nadir-akhtar committed Oct 17, 2024
1 parent 27ca312 commit d4cfdd6
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/utils/ConfigParser.sol
Original file line number Diff line number Diff line change
Expand Up @@ -103,15 +103,15 @@ contract ConfigParser is Script, Test {
* READS
*
*/
function _readEnvironment() private view returns (Environment memory) {
function _readEnvironment() private returns (Environment memory) {
return Environment({
chainid: _readUint(".config.environment.chainid"),
name: _readString(".config.environment.name"),
lastUpdated: _readString(".config.environment.lastUpdated")
});
}

function _readParams() private view returns (Params memory) {
function _readParams() private returns (Params memory) {
return Params({
multiSendCallOnly: _readAddress(".config.params.multiSendCallOnly"),
ethPOS: _readAddress(".config.params.ethPOS"),
Expand All @@ -127,7 +127,7 @@ contract ConfigParser is Script, Test {
});
}

function _readAddresses() private view returns (Addresses memory) {
function _readAddresses() private returns (Addresses memory) {
return Addresses({
// Admin
communityMultisig: _readAddress(".deployment.admin.communityMultisig"),
Expand Down Expand Up @@ -158,23 +158,23 @@ contract ConfigParser is Script, Test {
});
}

function _readTUP(string memory jsonLocation) private view returns (TUPInfo memory) {
function _readTUP(string memory jsonLocation) private returns (TUPInfo memory) {
return TUPInfo({
proxy: _readAddress(jsonLocation.concat(".proxy")),
impl: _readAddress(jsonLocation.concat(".impl")),
pendingImpl: _readAddress(jsonLocation.concat(".pendingImpl"))
});
}

function _readBeacon(string memory jsonLocation) private view returns (BeaconInfo memory) {
function _readBeacon(string memory jsonLocation) private returns (BeaconInfo memory) {
return BeaconInfo({
beacon: _readAddress(jsonLocation.concat(".beacon")),
impl: _readAddress(jsonLocation.concat(".impl")),
pendingImpl: _readAddress(jsonLocation.concat(".pendingImpl"))
});
}

function _readStrategies(string memory jsonLocation) private view returns (TUPInfo[] memory) {
function _readStrategies(string memory jsonLocation) private returns (TUPInfo[] memory) {
address[] memory strategyProxies = stdJson.readAddressArray(_configData, jsonLocation.concat(".addrs"));
address strategyImpl = _readAddress(jsonLocation.concat(".impl"));

Expand All @@ -187,7 +187,7 @@ contract ConfigParser is Script, Test {
return strategyInfos;
}

function _readToken(string memory jsonLocation) private view returns (TokenInfo memory) {
function _readToken(string memory jsonLocation) private returns (TokenInfo memory) {
return TokenInfo({
proxy: _readAddress(jsonLocation.concat(".proxy")),
impl: _readAddress(jsonLocation.concat(".impl")),
Expand All @@ -196,15 +196,15 @@ contract ConfigParser is Script, Test {
});
}

function _readAddress(string memory jsonLocation) private view returns (address) {
function _readAddress(string memory jsonLocation) private returns (address) {
return stdJson.readAddress(_configData, jsonLocation);
}

function _readUint(string memory jsonLocation) private view returns (uint256) {
function _readUint(string memory jsonLocation) private returns (uint256) {
return stdJson.readUint(_configData, jsonLocation);
}

function _readString(string memory jsonLocation) private view returns (string memory) {
function _readString(string memory jsonLocation) private returns (string memory) {
return stdJson.readString(_configData, jsonLocation);
}
}

0 comments on commit d4cfdd6

Please sign in to comment.