Skip to content

Commit c3d970f

Browse files
committed
pr feedback
1 parent 509e1b8 commit c3d970f

File tree

2 files changed

+16
-18
lines changed

2 files changed

+16
-18
lines changed

src/improvements/script/get-rpc-url.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ if [[ "$TASK_PATH" == *"/eth/"* ]]; then
88
echo "mainnet"
99
elif [[ "$TASK_PATH" == *"/sep/"* ]]; then
1010
echo "sepolia"
11+
elif [[ "$TASK_PATH" == *"/oeth/"* ]]; then
12+
echo "opMainnet"
1113
else
12-
echo "Error: Task path must contain either /eth/ or /sep/" >&2
14+
echo "Error: Task path must contain either /eth/ or /sep/ or /oeth/" >&2
1315
exit 1
1416
fi

test/registry/SimpleAddressRegistry.t.sol

Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,29 +3,16 @@ pragma solidity ^0.8.0;
33

44
import {Test} from "forge-std/Test.sol";
55
import {SimpleAddressRegistry} from "src/improvements/SimpleAddressRegistry.sol";
6-
import {stdJson} from "forge-std/StdJson.sol";
7-
import {console} from "forge-std/console.sol";
86

9-
contract Helper {
10-
// Path to test fixture files
11-
string constant FIXTURES_PATH = "test/fixtures/SimpleAddressRegistry/";
12-
13-
// Helper function to read TOML from fixture file
14-
function _getPath(string memory configFile) internal pure returns (string memory) {
15-
return string.concat(FIXTURES_PATH, configFile);
16-
}
17-
18-
function _deployRegistry(string memory configFile) internal virtual returns (address) {
19-
return address(new SimpleAddressRegistry(_getPath(configFile)));
20-
}
21-
}
22-
23-
contract SimpleAddressRegistryTest is Helper, Test {
7+
contract SimpleAddressRegistryTest is Test {
248
// Test addresses
259
address constant alice = address(1);
2610
address constant bob = address(2);
2711
address constant charlie = address(3);
2812

13+
// Path to test fixture files
14+
string constant FIXTURES_PATH = "test/fixtures/SimpleAddressRegistry/";
15+
2916
string registryName; // Contract name being tested.
3017
string idReturnKind; // "identifier" or "AddressInfo"
3118

@@ -37,6 +24,15 @@ contract SimpleAddressRegistryTest is Helper, Test {
3724
isSimpleAddressRegistry = true;
3825
}
3926

27+
// Helper function to read TOML from fixture file
28+
function _getPath(string memory configFile) internal pure returns (string memory) {
29+
return string.concat(FIXTURES_PATH, configFile);
30+
}
31+
32+
function _deployRegistry(string memory configFile) internal virtual returns (address) {
33+
return address(new SimpleAddressRegistry(_getPath(configFile)));
34+
}
35+
4036
function test_initialize_succeeds_withValidToml() public {
4137
SimpleAddressRegistry registry = SimpleAddressRegistry(_deployRegistry("valid_addresses.toml"));
4238
assertEq(registry.get("Alice"), alice, "10");

0 commit comments

Comments
 (0)