-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
59 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
// SPDX-License-Identifier: AGPL-3.0-only | ||
pragma solidity ^0.8.0; | ||
|
||
import "./Configured.sol"; | ||
|
||
abstract contract ConfiguredEthereumMainnet is Configured { | ||
using ConfigLib for Config; | ||
|
||
address internal ST_ETH; | ||
address internal WST_ETH; | ||
address internal CB_ETH; | ||
address internal R_ETH; | ||
address[] internal allEthereumMainnetAssets; | ||
|
||
function _network() internal view virtual override returns (string memory){ | ||
return "ethereum-mainnet"; | ||
} | ||
|
||
function _loadConfig() internal virtual override { | ||
super._loadConfig(); | ||
|
||
ST_ETH = CONFIG.getAddress("stETH"); | ||
WST_ETH = CONFIG.getAddress("wstETH"); | ||
CB_ETH = CONFIG.getAddress("cbETH"); | ||
R_ETH = CONFIG.getAddress("rETH"); | ||
|
||
allEthereumMainnetAssets = [ST_ETH, WST_ETH, CB_ETH, R_ETH]; | ||
|
||
for (uint256 i; i < allEthereumMainnetAssets.length; ++i) { | ||
allAssets.push(allEthereumMainnetAssets[i]); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// SPDX-License-Identifier: GPL-2.0-or-later | ||
pragma solidity ^0.8.0; | ||
|
||
import "../helpers/ForkTest.sol"; | ||
import "config/ConfiguredEthereumMainnet.sol"; | ||
|
||
contract EthereumTest is ConfiguredEthereumMainnet, ForkTest { | ||
function _network() internal view virtual override(Configured, ConfiguredEthereumMainnet) returns (string memory) { | ||
return ConfiguredEthereumMainnet._network(); | ||
} | ||
|
||
function _loadConfig() internal virtual override(Configured, ConfiguredEthereumMainnet) { | ||
ConfiguredEthereumMainnet._loadConfig(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters