Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions script/DeployWsteth.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
// SPDX-License-Identifier: UNLICENSED

pragma solidity >=0.8.7 <0.9.0;

import {Script, console} from "forge-std/Script.sol";
import {WstEthL2Token} from "../src/token/WstEthL2Token.sol";
import {ERC1967Proxy} from "@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol";

contract DeployToken is Script {
function run() public returns (address implementation, address token) {
vm.startBroadcast();

implementation = address(new WstEthL2Token());

token = address(new ERC1967Proxy(implementation, abi.encodeCall(WstEthL2Token.initialize, ("Wrapped liquid staked Ether 2.0", "wstETH", msg.sender))));

console.log("WstEthL2Token implementation deployed at: ");
console.log(implementation);

console.log("WstEthL2Token proxy deployed at: ");
console.log(token);
vm.stopBroadcast();
}

function transferMinterAndOwnership(address tokenAddress, address newOwner, address minter) public {
vm.startBroadcast();

WstEthL2Token token = WstEthL2Token(tokenAddress);
token.setMinter(minter);
token.transferOwnership(newOwner);
vm.stopBroadcast();
}
}
3 changes: 3 additions & 0 deletions script/deployWsteth.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env bash

forge script --broadcast --slow --verify ./script/DeployWsteth.sol $@