Skip to content

Commit

Permalink
feat: deploy generic ERC20s
Browse files Browse the repository at this point in the history
  • Loading branch information
anna-carroll committed Aug 15, 2024
1 parent 88a1a9f commit 6900e3e
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions script/Zenith.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ import {HostOrders} from "../src/orders/HostOrders.sol";
import {RollupOrders} from "../src/orders/RollupOrders.sol";
import {Passage} from "../src/passage/Passage.sol";
import {RollupPassage} from "../src/passage/RollupPassage.sol";
// deps
import {SimpleERC20} from "simple-erc20/SimpleERC20.sol";
// utils
import {Script} from "forge-std/Script.sol";

Expand All @@ -29,13 +31,20 @@ contract ZenithScript is Script {
}

// deploy:
// forge script ZenithScript --sig "deployL2()" --rpc-url $L2_RPC_URL --private-key $PRIVATE_KEY --broadcast
function deployL2() public returns (address permit2, RollupPassage p, RollupOrders m) {
// forge script ZenithScript --sig "deployL2(address)" --rpc-url $L2_RPC_URL --private-key $PRIVATE_KEY --broadcast $MINTER
function deployL2(address minter)
public
returns (address permit2, RollupPassage p, RollupOrders m, SimpleERC20 wbtc, SimpleERC20 usdt)
{
vm.startBroadcast();
// deploy system contracts
permit2 = _deployPermit2();
p = new RollupPassage(permit2);
m = new RollupOrders(permit2);

// deploy simple erc20 tokens
wbtc = new SimpleERC20(minter, "Wrapped BTC", "WBTC");
usdt = new SimpleERC20(minter, "Tether USD", "USDT");
}

/// @dev Permit2 contract uses Solidity 0.8.17 which is incompatible with the Solidity version of some OpenZeppeling contracts used as deps for system contracts (RollupOrders and RollupPassage).
Expand Down

0 comments on commit 6900e3e

Please sign in to comment.