Skip to content

Commit 672b41d

Browse files
committed
updates deployment script to avoid OZ CLI
1 parent cbb2721 commit 672b41d

File tree

1 file changed

+10
-11
lines changed

1 file changed

+10
-11
lines changed

script/DeployWsteth.sol

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,26 +4,25 @@ pragma solidity >=0.8.7 <0.9.0;
44

55
import {Script, console} from "forge-std/Script.sol";
66
import {WstEthL2Token} from "../src/token/WstEthL2Token.sol";
7-
import {Upgrades} from "./lib/Upgrades.sol";
7+
import {ERC1967Proxy} from "@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol";
88

99
contract 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

Comments
 (0)