2
2
pragma solidity ^ 0.8.13 ;
3
3
4
4
import {Test, console} from "forge-std/Test.sol " ;
5
- import {AlchemyProxyRegistry } from "../src/AlchemyProxyRegistry .sol " ;
5
+ import {AlchemyProxyLoader } from "../src/AlchemyProxyLoader .sol " ;
6
6
import {ERC1967Proxy } from "@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol " ;
7
7
8
- contract AlchemyProxyRegistryTest is Test {
9
- AlchemyProxyRegistry public proxyRegistry;
8
+ contract AlchemyProxyLoaderTest is Test {
9
+ AlchemyProxyLoader public proxyRegistry;
10
10
bytes32 internal immutable _PROXY_IMPL_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc ;
11
11
12
12
function setUp () public {
13
- proxyRegistry = new AlchemyProxyRegistry (address (this ));
13
+ proxyRegistry = new AlchemyProxyLoader (address (this ));
14
14
}
15
15
16
16
function test_deploys () public {
@@ -20,10 +20,10 @@ contract AlchemyProxyRegistryTest is Test {
20
20
address proxy = address (new ERC1967Proxy (address (proxyRegistry), "" ));
21
21
22
22
// instance of implementation to test upgradeTo
23
- address toUpgradeTo = address (new AlchemyProxyRegistry (address (this )));
23
+ address toUpgradeTo = address (new AlchemyProxyLoader (address (this )));
24
24
25
25
assertEq (_getImplementation (proxy), address (proxyRegistry));
26
- AlchemyProxyRegistry (proxy).upgradeToAndCall (toUpgradeTo, "" );
26
+ AlchemyProxyLoader (proxy).upgradeToAndCall (toUpgradeTo, "" );
27
27
28
28
// check that implementation is now the new implementation
29
29
assertEq (_getImplementation (proxy), address (toUpgradeTo));
@@ -36,12 +36,12 @@ contract AlchemyProxyRegistryTest is Test {
36
36
address proxy = address (new ERC1967Proxy (address (proxyRegistry), "" ));
37
37
38
38
// instance of implementation to test upgradeTo
39
- address toUpgradeTo = address (new AlchemyProxyRegistry (address (this )));
39
+ address toUpgradeTo = address (new AlchemyProxyLoader (address (this )));
40
40
41
41
assertEq (_getImplementation (proxy), address (proxyRegistry));
42
42
vm.startPrank (address (1 ));
43
43
vm.expectRevert ("Only deployer can upgrade " );
44
- AlchemyProxyRegistry (proxy).upgradeToAndCall (toUpgradeTo, "" );
44
+ AlchemyProxyLoader (proxy).upgradeToAndCall (toUpgradeTo, "" );
45
45
46
46
// check that implementation is still the old implementation
47
47
assertEq (_getImplementation (proxy), address (proxyRegistry));
0 commit comments