@@ -4,26 +4,25 @@ pragma solidity >=0.8.7 <0.9.0;
44
55import {Script, console} from "forge-std/Script.sol " ;
66import {WstEthL2Token} from "../src/token/WstEthL2Token.sol " ;
7- import {Upgrades } from "./lib/Upgrades .sol " ;
7+ import {ERC1967Proxy } from "@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy .sol " ;
88
99contract DeployToken is Script {
10- function run () public {
10+ function run () public returns ( address implementation , address token ) {
1111 vm.startBroadcast ();
1212
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 ());
1814
19- WstEthL2Token token = WstEthL2Token (proxy );
15+ token = address ( new ERC1967Proxy (implementation, abi.encodeCall ( WstEthL2Token.initialize, ( " Wrapped liquid staked Ether 2.0 " , " wstETH " , msg . sender ))) );
2016
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);
2322 vm.stopBroadcast ();
2423 }
2524
26- function transferOwnership (address tokenAddress , address newOwner , address minter ) public {
25+ function transferMinterAndOwnership (address tokenAddress , address newOwner , address minter ) public {
2726 vm.startBroadcast ();
2827
2928 WstEthL2Token token = WstEthL2Token (tokenAddress);
0 commit comments