Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes after 2 audits #30

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
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
322 changes: 322 additions & 0 deletions broadcast/DeployCometWrapper.s.sol/1/run-1731004221.json

Large diffs are not rendered by default.

322 changes: 322 additions & 0 deletions broadcast/DeployCometWrapper.s.sol/1/run-1731004305.json

Large diffs are not rendered by default.

322 changes: 322 additions & 0 deletions broadcast/DeployCometWrapper.s.sol/1/run-1731004372.json

Large diffs are not rendered by default.

322 changes: 322 additions & 0 deletions broadcast/DeployCometWrapper.s.sol/1/run-latest.json

Large diffs are not rendered by default.

208 changes: 208 additions & 0 deletions broadcast/DeployCometWrapper.s.sol/10/run-1731003927.json

Large diffs are not rendered by default.

511 changes: 511 additions & 0 deletions broadcast/DeployCometWrapper.s.sol/10/run-1731003934.json

Large diffs are not rendered by default.

511 changes: 511 additions & 0 deletions broadcast/DeployCometWrapper.s.sol/10/run-1731004032.json

Large diffs are not rendered by default.

511 changes: 511 additions & 0 deletions broadcast/DeployCometWrapper.s.sol/10/run-latest.json

Large diffs are not rendered by default.

143 changes: 143 additions & 0 deletions broadcast/DeployCometWrapper.s.sol/137/run-1731005178.json

Large diffs are not rendered by default.

441 changes: 441 additions & 0 deletions broadcast/DeployCometWrapper.s.sol/137/run-1731005187.json

Large diffs are not rendered by default.

441 changes: 441 additions & 0 deletions broadcast/DeployCometWrapper.s.sol/137/run-1731005261.json

Large diffs are not rendered by default.

441 changes: 441 additions & 0 deletions broadcast/DeployCometWrapper.s.sol/137/run-latest.json

Large diffs are not rendered by default.

677 changes: 677 additions & 0 deletions broadcast/DeployCometWrapper.s.sol/42161/run-1731002579.json

Large diffs are not rendered by default.

677 changes: 677 additions & 0 deletions broadcast/DeployCometWrapper.s.sol/42161/run-latest.json

Large diffs are not rendered by default.

81 changes: 0 additions & 81 deletions broadcast/DeployCometWrapper.s.sol/5/run-1698094803.json

This file was deleted.

182 changes: 0 additions & 182 deletions broadcast/DeployCometWrapper.s.sol/5/run-1698094816.json

This file was deleted.

81 changes: 0 additions & 81 deletions broadcast/DeployCometWrapper.s.sol/5/run-1698095109.json

This file was deleted.

182 changes: 0 additions & 182 deletions broadcast/DeployCometWrapper.s.sol/5/run-1698095116.json

This file was deleted.

182 changes: 0 additions & 182 deletions broadcast/DeployCometWrapper.s.sol/5/run-1698095170.json

This file was deleted.

182 changes: 0 additions & 182 deletions broadcast/DeployCometWrapper.s.sol/5/run-latest.json

This file was deleted.

78 changes: 78 additions & 0 deletions broadcast/DeployCometWrapper.s.sol/534352/run-1731005483.json

Large diffs are not rendered by default.

179 changes: 179 additions & 0 deletions broadcast/DeployCometWrapper.s.sol/534352/run-1731005489.json

Large diffs are not rendered by default.

179 changes: 179 additions & 0 deletions broadcast/DeployCometWrapper.s.sol/534352/run-1731005523.json

Large diffs are not rendered by default.

179 changes: 179 additions & 0 deletions broadcast/DeployCometWrapper.s.sol/534352/run-latest.json

Large diffs are not rendered by default.

81 changes: 0 additions & 81 deletions broadcast/DeployCometWrapper.s.sol/80001/run-1698251082.json

This file was deleted.

230 changes: 0 additions & 230 deletions broadcast/DeployCometWrapper.s.sol/80001/run-1698251088.json

This file was deleted.

230 changes: 0 additions & 230 deletions broadcast/DeployCometWrapper.s.sol/80001/run-1698251132.json

This file was deleted.

230 changes: 0 additions & 230 deletions broadcast/DeployCometWrapper.s.sol/80001/run-latest.json

This file was deleted.

273 changes: 273 additions & 0 deletions broadcast/DeployCometWrapper.s.sol/8453/run-1731004425.json

Large diffs are not rendered by default.

677 changes: 677 additions & 0 deletions broadcast/DeployCometWrapper.s.sol/8453/run-1731004434.json

Large diffs are not rendered by default.

677 changes: 677 additions & 0 deletions broadcast/DeployCometWrapper.s.sol/8453/run-1731004564.json

Large diffs are not rendered by default.

677 changes: 677 additions & 0 deletions broadcast/DeployCometWrapper.s.sol/8453/run-latest.json

Large diffs are not rendered by default.

81 changes: 0 additions & 81 deletions broadcast/DeployCometWrapper.s.sol/84531/run-1698692412.json

This file was deleted.

182 changes: 0 additions & 182 deletions broadcast/DeployCometWrapper.s.sol/84531/run-1698692418.json

This file was deleted.

182 changes: 0 additions & 182 deletions broadcast/DeployCometWrapper.s.sol/84531/run-1698692452.json

This file was deleted.

81 changes: 0 additions & 81 deletions broadcast/DeployCometWrapper.s.sol/84531/run-1698692566.json

This file was deleted.

182 changes: 0 additions & 182 deletions broadcast/DeployCometWrapper.s.sol/84531/run-1698692572.json

This file was deleted.

182 changes: 0 additions & 182 deletions broadcast/DeployCometWrapper.s.sol/84531/run-1698692574.json

This file was deleted.

182 changes: 0 additions & 182 deletions broadcast/DeployCometWrapper.s.sol/84531/run-latest.json

This file was deleted.

7 changes: 6 additions & 1 deletion foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ src = 'src'
out = 'out'
libs = ['lib']
verbosity = 3
solc-version = '0.8.21'
solc-version = '0.8.19'
via_ir = true
optimizer = true
optimizer_runs = 100000000
Expand All @@ -15,7 +15,12 @@ remappings = [

[rpc_endpoints]
mainnet = "${MAINNET_RPC_URL}"
optimism = "${OPTIMISM_RPC_URL}"
arbitrum = "${ARBITRUM_RPC_URL}"
base = "${BASE_RPC_URL}"
polygon = "${POLYGON_RPC_URL}"
scroll = "${SCROLL_RPC_URL}"

goerli = "${GOERLI_RPC_URL}"
sepolia = "${SEPOLIA_RPC_URL}"

Expand Down
171 changes: 148 additions & 23 deletions script/DeployCometWrapper.s.sol
Original file line number Diff line number Diff line change
@@ -1,64 +1,189 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.21;
pragma solidity 0.8.19;

import "forge-std/Script.sol";
import "forge-std/console.sol";
import { TransparentUpgradeableProxy } from "openzeppelin-contracts/contracts/proxy/transparent/TransparentUpgradeableProxy.sol";
import { ProxyAdmin } from "openzeppelin-contracts/contracts/proxy/transparent/ProxyAdmin.sol";
import { CometWrapper, CometInterface, ICometRewards, CometHelpers, IERC20 } from "../src/CometWrapper.sol";
import { CometWrapperWithoutMultiplier, ICometRewardsWithoutMultiplier } from "../src/CometWrapperWithoutMultiplier.sol";

// Deploy with:
// $ set -a && source .env && ./script/deploy.sh

// Required ENV vars:
// RPC_URL
// DEPLOYER_PK
// COMET_ADDRESS
// REWARDS_ADDRESS
// PROXY_ADMIN_ADDRESS
// TOKEN_NAME
// TOKEN_SYMBOL

// Optional but suggested ENV vars:
// ETHERSCAN_KEY

contract DeployCometWrapper is Script {
ProxyAdmin proxyAdmin;
address[] COMET_ADDRESS_MAINNET=[0x3Afdc9BCA9213A35503b077a6072F3D0d5AB0840, 0x3D0bb1ccaB520A66e607822fC55BC921738fAFE3, 0xA17581A9E3356d9A858b789D68B4d866e593aE94, 0xc3d688B66703497DAA19211EEdff47f25384cdc3, 0x5D409e56D886231aDAf00c8775665AD0f9897b56];
string[] TOKEN_NAME_MAINNET=["Wrapped Comet USDT", "Wrapped Comet wstETH", "Wrapped Comet WETH", "Wrapped Comet USDC", "Wrapped Comet USDS"];
string[] TOKEN_SYMBOL_MAINNET=["wcUSDTv3", "wcWstETHv3", "wcWETHv3", "wcUSDCv3", "wcUSDSv3"];
address REWARDS_ADDRESS_MAINNET=0x1B0e765F6224C21223AeA2af16c1C46E38885a40;
address PROXY_ADMIN_ADDRESS_MAINNET=0x1EC63B5883C3481134FD50D5DAebc83Ecd2E8779;

address[] COMET_ADDRESS_OPTIMISM=[0x2e44e174f7D53F0212823acC11C01A11d58c5bCB, 0x995E394b8B2437aC8Ce61Ee0bC610D617962B214, 0xE36A30D249f7761327fd973001A32010b521b6Fd];
string[] TOKEN_NAME_OPTIMISM=["Wrapped Comet USDC", "Wrapped Comet USDT", "Wrapped Comet WETH"];
string[] TOKEN_SYMBOL_OPTIMISM=["wcUSDCv3", "wcUSDTv3", "wcWETHv3"];
address REWARDS_ADDRESS_OPTIMISM=0x443EA0340cb75a160F31A440722dec7b5bc3C2E9;
address PROXY_ADMIN_ADDRESS_OPTIMISM=0x3C30B5a5A04656565686f800481580Ac4E7ed178;

address[] COMET_ADDRESS_POLYGON=[0xF25212E676D1F7F89Cd72fFEe66158f541246445, 0xaeB318360f27748Acb200CE616E389A6C9409a07];
string[] TOKEN_NAME_POLYGON=["Wrapped Comet USDC", "Wrapped Comet USDT"];
string[] TOKEN_SYMBOL_POLYGON=["wcUSDCv3", "wcUSDTv3"];
address REWARDS_ADDRESS_POLYGON=0x45939657d1CA34A8FA39A924B71D28Fe8431e581;
address PROXY_ADMIN_ADDRESS_POLYGON=0xd712ACe4ca490D4F3E92992Ecf3DE12251b975F9;

address[] COMET_ADDRESS_BASE=[0xb125E6687d4313864e53df431d5425969c15Eb2F, 0x9c4ec768c28520B50860ea7a15bd7213a9fF58bf, 0x46e6b214b524310239732D51387075E0e70970bf, 0x784efeB622244d2348d4F2522f8860B96fbEcE89];
string[] TOKEN_NAME_BASE=["Wrapped Comet USDC", "Wrapped Comet USDbC", "Wrapped Comet WETH", "Wrapped Comet AERO"];
string[] TOKEN_SYMBOL_BASE=["wcUSDCv3", "wcUSDbCv3", "wcWETHv3", "wcAEROv3"];
address REWARDS_ADDRESS_BASE=0x123964802e6ABabBE1Bc9547D72Ef1B69B00A6b1;
address PROXY_ADMIN_ADDRESS_BASE=0xbdE8F31D2DdDA895264e27DD990faB3DC87b372d;

address[] COMET_ADDRESS_ARBITRUM=[0xA5EDBDD9646f8dFF606d7448e414884C7d905dCA, 0x9c4ec768c28520B50860ea7a15bd7213a9fF58bf, 0x6f7D514bbD4aFf3BcD1140B7344b32f063dEe486, 0xd98Be00b5D27fc98112BdE293e487f8D4cA57d07];
string[] TOKEN_NAME_ARBITRUM=["Wrapped Comet USDC.e", "Wrapped Comet USDC", "Wrapped Comet WETH", "Wrapped Comet USDT"];
string[] TOKEN_SYMBOL_ARBITRUM=["wcUSDCev3", "wcUSDCv3", "wcWETHv3", "wcUSDTv3"];
address REWARDS_ADDRESS_ARBITRUM=0x88730d254A2f7e6AC8388c3198aFd694bA9f7fae;
address PROXY_ADMIN_ADDRESS_ARBITRUM=0xD10b40fF1D92e2267D099Da3509253D9Da4D715e;

address[] COMET_ADDRESS_SCROLL=[0xB2f97c1Bd3bf02f5e74d13f02E3e26F93D77CE44];
string[] TOKEN_NAME_SCROLL=["Wrapped Comet USDC"];
string[] TOKEN_SYMBOL_SCROLL=["wcUSDCv3"];
address REWARDS_ADDRESS_SCROLL=0x70167D30964cbFDc315ECAe02441Af747bE0c5Ee;
address PROXY_ADMIN_ADDRESS_SCROLL=0x87A27b91f4130a25E9634d23A5B8E05e342bac50;

TransparentUpgradeableProxy cometWrapperProxy;
address internal cometAddr;
address[] internal cometAddresses;
string[] internal tokenNames;
string[] internal tokenSymbols;
address internal rewardsAddr;
address internal proxyAdminAddr;
string internal tokenName;
string internal tokenSymbol;

function run() public {
cometAddr = vm.envAddress("COMET_ADDRESS");
rewardsAddr = vm.envAddress("REWARDS_ADDRESS");
proxyAdminAddr = vm.envAddress("PROXY_ADMIN_ADDRESS");
tokenName = vm.envString("TOKEN_NAME"); // Wrapped Comet WETH || Wrapped Comet USDC
tokenSymbol = vm.envString("TOKEN_SYMBOL"); // wcWETHv3 || wcUSDCv3
address deployer = vm.addr(vm.envUint("DEPLOYER_PK"));

uint256 chainId = block.chainid;
vm.startBroadcast(deployer);
if (chainId == 1) {
cometAddresses = COMET_ADDRESS_MAINNET;
tokenNames = TOKEN_NAME_MAINNET;
tokenSymbols = TOKEN_SYMBOL_MAINNET;
rewardsAddr = REWARDS_ADDRESS_MAINNET;
proxyAdminAddr = PROXY_ADMIN_ADDRESS_MAINNET;
for(uint i = 0; i < cometAddresses.length; i++) {
printDeployInfo(tokenNames[i], tokenSymbols[i], cometAddresses[i]);
deployCometWrapperWithoutMultiplier(cometAddresses[i], tokenNames[i], tokenSymbols[i]);
}
} else if(chainId == 10) {
cometAddresses = COMET_ADDRESS_OPTIMISM;
tokenNames = TOKEN_NAME_OPTIMISM;
tokenSymbols = TOKEN_SYMBOL_OPTIMISM;
rewardsAddr = REWARDS_ADDRESS_OPTIMISM;
proxyAdminAddr = PROXY_ADMIN_ADDRESS_OPTIMISM;
for(uint i = 0; i < cometAddresses.length; i++) {
printDeployInfo(tokenNames[i], tokenSymbols[i], cometAddresses[i]);
deployCometWrapper(cometAddresses[i], tokenNames[i], tokenSymbols[i]);
}
} else if(chainId == 137) {
cometAddresses = COMET_ADDRESS_POLYGON;
tokenNames = TOKEN_NAME_POLYGON;
tokenSymbols = TOKEN_SYMBOL_POLYGON;
rewardsAddr = REWARDS_ADDRESS_POLYGON;
proxyAdminAddr = PROXY_ADMIN_ADDRESS_POLYGON;
for(uint i = 0; i < cometAddresses.length; i++) {
printDeployInfo(tokenNames[i], tokenSymbols[i], cometAddresses[i]);
deployCometWrapperWithoutMultiplier(cometAddresses[i], tokenNames[i], tokenSymbols[i]);
}
} else if(chainId == 8453) {
cometAddresses = COMET_ADDRESS_BASE;
tokenNames = TOKEN_NAME_BASE;
tokenSymbols = TOKEN_SYMBOL_BASE;
rewardsAddr = REWARDS_ADDRESS_BASE;
proxyAdminAddr = PROXY_ADMIN_ADDRESS_BASE;
for(uint i = 0; i < cometAddresses.length; i++) {
printDeployInfo(tokenNames[i], tokenSymbols[i], cometAddresses[i]);
deployCometWrapper(cometAddresses[i], tokenNames[i], tokenSymbols[i]);
}
} else if(chainId == 42161){
cometAddresses = COMET_ADDRESS_ARBITRUM;
tokenNames = TOKEN_NAME_ARBITRUM;
tokenSymbols = TOKEN_SYMBOL_ARBITRUM;
rewardsAddr = REWARDS_ADDRESS_ARBITRUM;
proxyAdminAddr = PROXY_ADMIN_ADDRESS_ARBITRUM;
for(uint i = 0; i < cometAddresses.length; i++) {
printDeployInfo(tokenNames[i], tokenSymbols[i], cometAddresses[i]);
deployCometWrapper(cometAddresses[i], tokenNames[i], tokenSymbols[i]);
}
} else if(chainId == 534352){
cometAddresses = COMET_ADDRESS_SCROLL;
tokenNames = TOKEN_NAME_SCROLL;
tokenSymbols = TOKEN_SYMBOL_SCROLL;
rewardsAddr = REWARDS_ADDRESS_SCROLL;
proxyAdminAddr = PROXY_ADMIN_ADDRESS_SCROLL;
for(uint i = 0; i < cometAddresses.length; i++) {
printDeployInfo(tokenNames[i], tokenSymbols[i], cometAddresses[i]);
deployCometWrapper(cometAddresses[i], tokenNames[i], tokenSymbols[i]);
}
}
else {
console.log("Unsupported chainId: ", chainId);
}

vm.stopBroadcast();
}

function printDeployInfo(
string memory tokenName,
string memory tokenSymbol,
address cometAddr
) public view {
console.log("=============================================================");
console.log("Token Name: ", tokenName);
console.log("Token Symbol: ", tokenSymbol);
console.log("Comet Address: ", cometAddr);
console.log("Rewards Address: ", rewardsAddr);
console.log("Proxy Admin Address: ", proxyAdminAddr);
console.log("=============================================================");
console.log("Token Name: ", tokenName);
console.log("Token Symbol: ", tokenSymbol);
console.log("Comet Address: ", cometAddr);
console.log("Rewards Address: ", rewardsAddr);
console.log("Proxy Admin Address: ", proxyAdminAddr);
}

function deployCometWrapper(
address cometAddr,
string memory tokenName,
string memory tokenSymbol
) internal {
CometWrapper cometWrapperImpl =
new CometWrapper(CometInterface(cometAddr), ICometRewards(rewardsAddr));
cometWrapperProxy = new TransparentUpgradeableProxy(address(cometWrapperImpl), proxyAdminAddr, "");

// Wrap in ABI to support easier calls
CometWrapper cometWrapper = CometWrapper(address(cometWrapperProxy));

console.log("CometWrapper address: ", address(cometWrapper));
console.log("=============================================================");
console.log();

// Initialize the wrapper contract
cometWrapper.initialize(tokenName, tokenSymbol);
}

vm.stopBroadcast();
function deployCometWrapperWithoutMultiplier(
address cometAddr,
string memory tokenName,
string memory tokenSymbol
) internal {
CometWrapperWithoutMultiplier cometWrapperImpl =
new CometWrapperWithoutMultiplier(CometInterface(cometAddr), ICometRewardsWithoutMultiplier(rewardsAddr));
cometWrapperProxy = new TransparentUpgradeableProxy(address(cometWrapperImpl), proxyAdminAddr, "");

// Wrap in ABI to support easier calls
CometWrapperWithoutMultiplier cometWrapper = CometWrapperWithoutMultiplier(address(cometWrapperProxy));

console.log("CometWrapper address: ", address(cometWrapper));
console.log("=============================================================");
console.log();

// Initialize the wrapper contract
cometWrapper.initialize(tokenName, tokenSymbol);
}
}
96 changes: 96 additions & 0 deletions script/DeploySingleCometWrapper.s.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.19;

import "forge-std/Script.sol";
import "forge-std/console.sol";
import { TransparentUpgradeableProxy } from "openzeppelin-contracts/contracts/proxy/transparent/TransparentUpgradeableProxy.sol";
import { ProxyAdmin } from "openzeppelin-contracts/contracts/proxy/transparent/ProxyAdmin.sol";
import { CometWrapper, CometInterface, ICometRewards, CometHelpers, IERC20 } from "../src/CometWrapper.sol";
import { CometWrapperWithoutMultiplier, ICometRewardsWithoutMultiplier } from "../src/CometWrapperWithoutMultiplier.sol";

// Deploy with:
// $ set -a && source .env && ./script/deploy.sh

// Required ENV vars:
// RPC_URL
// DEPLOYER_PK
// COMET_ADDRESS
// REWARDS_ADDRESS
// PROXY_ADMIN_ADDRESS
// TOKEN_NAME
// TOKEN_SYMBOL

// Optional but suggested ENV vars:
// ETHERSCAN_KEY

contract DeploySingleCometWrapper is Script {
TransparentUpgradeableProxy cometWrapperProxy;
address internal cometAddress;
string internal tokenName;
string internal tokenSymbol;
address internal rewardsAddr;
address internal proxyAdminAddr;
bool internal withMultiplier;

function run() public {
address deployer = vm.addr(vm.envUint("DEPLOYER_PK"));
cometAddress = vm.envAddress("COMET_ADDRESS");
rewardsAddr = vm.envAddress("REWARDS_ADDRESS");
proxyAdminAddr = vm.envAddress("PROXY_ADMIN_ADDRESS");
tokenName = vm.envString("TOKEN_NAME"); // Wrapped Comet WETH || Wrapped Comet USDC
tokenSymbol = vm.envString("TOKEN_SYMBOL"); // wcWETHv3 || wcUSDCv3
withMultiplier = vm.envBool("WITH_MULTIPLIER");

vm.startBroadcast(deployer);

console.log("=============================================================");
console.log("Token Name: ", tokenName);
console.log("Token Symbol: ", tokenSymbol);
console.log("Comet Address: ", cometAddress);
console.log("Rewards Address: ", rewardsAddr);
console.log("Proxy Admin Address: ", proxyAdminAddr);

if (withMultiplier) {
deployCometWrapper();
} else {
deployCometWrapperWithoutMultiplier();
}

vm.stopBroadcast();
}

function printDeployInfo() public view {
}

function deployCometWrapper() internal {
CometWrapper cometWrapperImpl =
new CometWrapper(CometInterface(cometAddress), ICometRewards(rewardsAddr));
cometWrapperProxy = new TransparentUpgradeableProxy(address(cometWrapperImpl), proxyAdminAddr, "");

// Wrap in ABI to support easier calls
CometWrapper cometWrapper = CometWrapper(address(cometWrapperProxy));

console.log("CometWrapper address: ", address(cometWrapper));
console.log("=============================================================");
console.log();

// Initialize the wrapper contract
cometWrapper.initialize(tokenName, tokenSymbol);
}

function deployCometWrapperWithoutMultiplier() internal {
CometWrapperWithoutMultiplier cometWrapperImpl =
new CometWrapperWithoutMultiplier(CometInterface(cometAddress), ICometRewardsWithoutMultiplier(rewardsAddr));
cometWrapperProxy = new TransparentUpgradeableProxy(address(cometWrapperImpl), proxyAdminAddr, "");

// Wrap in ABI to support easier calls
CometWrapperWithoutMultiplier cometWrapper = CometWrapperWithoutMultiplier(address(cometWrapperProxy));

console.log("CometWrapper address: ", address(cometWrapper));
console.log("=============================================================");
console.log();

// Initialize the wrapper contract
cometWrapper.initialize(tokenName, tokenSymbol);
}
}
37 changes: 37 additions & 0 deletions script/deployArbitrum.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#!/bin/bash

set -exo pipefail

# Load .env file if it exists
if [ -f .env ]; then
source .env
fi

if [ -n "$RPC_ARBITRUM_URL" ]; then
rpc_args="--rpc-url $RPC_ARBITRUM_URL"
else
rpc_args=""
fi

if [ -n "$DEPLOYER_PK" ]; then
wallet_args="--private-key $DEPLOYER_PK"
else
wallet_args="--unlocked"
fi

if [ -n "$ARBISCAN_KEY" ]; then
etherscan_args="--verify --etherscan-api-key $ARBISCAN_KEY"
else
etherscan_args=""
fi


forge script \
$rpc_args \
$wallet_args \
$etherscan_args \
--gas-price 20000000 \
--legacy \
--broadcast \
$@ \
script/DeployCometWrapper.s.sol:DeployCometWrapper
Loading