File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ contract DeployAlignedToken is Script {
4242 "Aligned Token Proxy deployed at address: " ,
4343 vm.toString (address (_tokenProxy)),
4444 " with proxy admin: " ,
45- vm.toString (getAdminAddress (address (_tokenProxy))),
45+ vm.toString (Utils. getAdminAddress (address (_tokenProxy))),
4646 " and owner: " ,
4747 vm.toString (_safe)
4848 )
@@ -94,12 +94,4 @@ contract DeployAlignedToken is Script {
9494 );
9595 return TransparentUpgradeableProxy (payable (_alignedTokenProxy));
9696 }
97-
98- function getAdminAddress (address proxy ) internal view returns (address ) {
99- address CHEATCODE_ADDRESS = 0x7109709ECfa91a80626fF3989D68f67F5b1DD12D ;
100- Vm vm = Vm (CHEATCODE_ADDRESS);
101-
102- bytes32 adminSlot = vm.load (proxy, ERC1967Utils .ADMIN_SLOT);
103- return address (uint160 (uint256 (adminSlot)));
104- }
10597}
Original file line number Diff line number Diff line change @@ -102,7 +102,6 @@ contract DeployAll is Script {
102102 .alignedTokenProxyDeploymentData (
103103 _proxyAdmin,
104104 address (_token),
105- _owner,
106105 _foundation,
107106 _claim
108107 );
Original file line number Diff line number Diff line change @@ -14,6 +14,11 @@ library Utils {
1414 address (uint160 (uint256 (keccak256 ("hevm cheat code " ))));
1515 Vm internal constant vm = Vm (VM_ADDRESS);
1616
17+ function getAdminAddress (address proxy ) internal view returns (address ) {
18+ bytes32 adminSlot = vm.load (proxy, ERC1967Utils .ADMIN_SLOT);
19+ return address (uint160 (uint256 (adminSlot)));
20+ }
21+
1722 /// @notice Address of the deterministic create2 factory.
1823 /// @dev This address corresponds to a contracts that is set in the storage
1924 /// in the genesis file. The same contract with the same address is deployed
You can’t perform that action at this time.
0 commit comments