@@ -4,26 +4,25 @@ pragma solidity >=0.8.7 <0.9.0;
4
4
5
5
import {Script, console} from "forge-std/Script.sol " ;
6
6
import {WstEthL2Token} from "../src/token/WstEthL2Token.sol " ;
7
- import {Upgrades } from "./lib/Upgrades .sol " ;
7
+ import {ERC1967Proxy } from "@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy .sol " ;
8
8
9
9
contract DeployToken is Script {
10
- function run () public {
10
+ function run () public returns ( address implementation , address token ) {
11
11
vm.startBroadcast ();
12
12
13
- address proxy = Upgrades.deployUUPSProxy (
14
- "out/ERC1967Proxy.sol/ERC1967Proxy.json " ,
15
- "WstEthL2Token.sol " ,
16
- abi.encodeCall (WstEthL2Token.initialize, ("Wrapped liquid staked Ether 2.0 " , "wstETH " , msg .sender ))
17
- );
13
+ implementation = address (new WstEthL2Token ());
18
14
19
- WstEthL2Token token = WstEthL2Token (proxy );
15
+ token = address ( new ERC1967Proxy (implementation, abi.encodeCall ( WstEthL2Token.initialize, ( " Wrapped liquid staked Ether 2.0 " , " wstETH " , msg . sender ))) );
20
16
21
- console.log ("WstEthL2Token deployed at: " );
22
- console.log (address (token));
17
+ console.log ("WstEthL2Token implementation deployed at: " );
18
+ console.log (implementation);
19
+
20
+ console.log ("WstEthL2Token proxy deployed at: " );
21
+ console.log (token);
23
22
vm.stopBroadcast ();
24
23
}
25
24
26
- function transferOwnership (address tokenAddress , address newOwner , address minter ) public {
25
+ function transferMinterAndOwnership (address tokenAddress , address newOwner , address minter ) public {
27
26
vm.startBroadcast ();
28
27
29
28
WstEthL2Token token = WstEthL2Token (tokenAddress);
0 commit comments