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

chore: Deploy to sepolia and base-sepolia #363

Merged
merged 2 commits into from
Jan 5, 2024
Merged
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
15 changes: 15 additions & 0 deletions deploy/BaseSepolia.s.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8;

import "./Deploy.s.sol";
import "./LibDeployConstants.sol";

contract SepoliaDeploy is DeployScript {
function _run() internal override {
console.log("Starting base sepolia deploy script.");

deploy(LibDeployConstants.baseSepolia(this.getDeployer()));

console.log("Ending base sepolia deploy script.");
}
}
3 changes: 3 additions & 0 deletions deploy/Deploy.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,9 @@ abstract contract Deploy {
console.log("");
console.log("### ProposalExecutionEngine");
console.log(" Deploying - ProposalExecutionEngine");
if (deployConstants.zoraReserveAuctionCoreEth == address(0)) {
revert("zoraReserveAuctionCoreEth address cannot be 0");
}
IReserveAuctionCoreEth zora = IReserveAuctionCoreEth(
deployConstants.zoraReserveAuctionCoreEth
);
Expand Down
68 changes: 68 additions & 0 deletions deploy/LibDeployConstants.sol
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,74 @@ library LibDeployConstants {
string baseExternalURL;
}

function sepolia(address multisig) internal pure returns (DeployConstants memory) {
address[] memory allowedERC20SwapOperatorTargets = new address[](0);

DeployConstants memory deployConstants = DeployConstants({
seaportExchangeAddress: 0x00000000000000ADc04C56Bf30aC9d3c0aAF14dC,
osZoraAuctionDuration: 2 minutes,
osZoraAuctionTimeout: 2 minutes,
osMinOrderDuration: 2 minutes,
osMaxOrderDuration: 14 days,
zoraMinAuctionDuration: 2 minutes,
zoraMaxAuctionDuration: 10 days,
zoraMaxAuctionTimeout: 7 days,
minCancelDelay: 5 minutes,
maxCancelDelay: 1 days,
distributorEmergencyActionAllowedDuration: 365 days,
partyDaoMultisig: multisig,
allowedERC20SwapOperatorTargets: allowedERC20SwapOperatorTargets,
osZone: 0x0000000000000000000000000000000000000000,
osConduitKey: 0xf984c55ca75735630c1c27d3d06969c1aa6af1df86d22ddc0e3a978ad6138e9f,
osConduitController: 0x00000000F9490004C11Cef243f5400493c00Ad63,
fractionalVaultFactory: 0x0000000000000000000000000000000000000000,
nounsAuctionHouse: 0x0000000000000000000000000000000000000000,
zoraReserveAuctionCoreEth: 0x0000000000000000000000000000000000000000,
networkName: "sepolia",
deployedNounsMarketWrapper: 0x0000000000000000000000000000000000000000,
contributionRouterInitialFee: 0.00055 ether,
tokenDistributorV1: 0x0000000000000000000000000000000000000000,
tokenDistributorV2: 0x0000000000000000000000000000000000000000,
baseExternalURL: "https://party.app/party/"
});

return deployConstants;
}

function baseSepolia(address multisig) internal pure returns (DeployConstants memory) {
address[] memory allowedERC20SwapOperatorTargets = new address[](0);

DeployConstants memory deployConstants = DeployConstants({
seaportExchangeAddress: 0x00000000000000ADc04C56Bf30aC9d3c0aAF14dC,
osZoraAuctionDuration: 2 minutes,
osZoraAuctionTimeout: 2 minutes,
osMinOrderDuration: 2 minutes,
osMaxOrderDuration: 14 days,
zoraMinAuctionDuration: 2 minutes,
zoraMaxAuctionDuration: 10 days,
zoraMaxAuctionTimeout: 7 days,
minCancelDelay: 5 minutes,
maxCancelDelay: 1 days,
distributorEmergencyActionAllowedDuration: 365 days,
partyDaoMultisig: multisig,
allowedERC20SwapOperatorTargets: allowedERC20SwapOperatorTargets,
osZone: 0x0000000000000000000000000000000000000000,
osConduitKey: 0xf984c55ca75735630c1c27d3d06969c1aa6af1df86d22ddc0e3a978ad6138e9f,
osConduitController: 0x00000000F9490004C11Cef243f5400493c00Ad63,
fractionalVaultFactory: 0x0000000000000000000000000000000000000000,
nounsAuctionHouse: 0x0000000000000000000000000000000000000000,
zoraReserveAuctionCoreEth: 0x0000000000000000000000000000000000000000,
networkName: "base-sepolia",
deployedNounsMarketWrapper: 0x0000000000000000000000000000000000000000,
contributionRouterInitialFee: 0.00055 ether,
tokenDistributorV1: 0x0000000000000000000000000000000000000000,
tokenDistributorV2: 0x0000000000000000000000000000000000000000,
baseExternalURL: "https://party.app/party/"
});

return deployConstants;
}

function goerli(address multisig) internal pure returns (DeployConstants memory) {
address[] memory allowedERC20SwapOperatorTargets = new address[](1);
allowedERC20SwapOperatorTargets[0] = 0xF91bB752490473B8342a3E964E855b9f9a2A668e; // 0x Swap Aggregator
Expand Down
15 changes: 15 additions & 0 deletions deploy/Sepolia.s.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8;

import "./Deploy.s.sol";
import "./LibDeployConstants.sol";

contract SepoliaDeploy is DeployScript {
function _run() internal override {
console.log("Starting sepolia deploy script.");

deploy(LibDeployConstants.sepolia(this.getDeployer()));

console.log("Ending sepolia deploy script.");
}
}
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
"deploy": "node js/deploy.js",
"deploy:goerli": "DRY_RUN=0 forge script ./deploy/Goerli.s.sol -vvv --rpc-url $GOERLI_RPC_URL --broadcast --etherscan-api-key $ETHERSCAN_API_KEY --via-ir --skip test --optimize --optimizer-runs 95 --ffi --slow",
"deploy:goerli:dry": "DRY_RUN=1 forge script ./deploy/Goerli.s.sol -vvv --rpc-url $GOERLI_RPC_URL --via-ir --skip test --optimize --optimizer-runs 95 --ffi",
"deploy:sepolia": "DRY_RUN=0 forge script ./deploy/Sepolia.s.sol -vvv --rpc-url $SEPOLIA_RPC_URL --broadcast --etherscan-api-key $ETHERSCAN_API_KEY --via-ir --skip test --optimize --optimizer-runs 95 --ffi --slow",
"deploy:sepolia:dry": "DRY_RUN=1 forge script ./deploy/Sepolia.s.sol -vvv --rpc-url $SEPOLIA_RPC_URL --via-ir --skip test --optimize --optimizer-runs 95 --ffi",
"deploy:mainnet": "DRY_RUN=0 forge script ./deploy/Mainnet.s.sol -vvv --rpc-url $ETH_RPC_URL --broadcast --etherscan-api-key $ETHERSCAN_API_KEY --via-ir --skip test --optimize --optimizer-runs 95 --ffi --slow",
"deploy:mainnet:dry": "DRY_RUN=1 forge script ./deploy/Mainnet.s.sol -vvv --rpc-url $ETH_RPC_URL --via-ir --skip test --optimize --optimizer-runs 95 --ffi",
"deploy:base": "DRY_RUN=0 forge script ./deploy/Base.s.sol -vvv --rpc-url $BASE_RPC_URL --via-ir --broadcast --etherscan-api-key $BASESCAN_API_KEY --evm-version paris --skip test --optimize --optimizer-runs 0 --ffi --slow",
Expand Down
10 changes: 9 additions & 1 deletion utils/deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,15 @@ async function updateHeadJson(chain: string, releaseName: string) {

async function main() {
const chain = process.argv[2];
const validChains = ["mainnet", "goerli", "base", "base-goerli", "zora"];
const validChains = [
"mainnet",
"goerli",
"base",
"base-goerli",
"zora",
"sepolia",
"base-sepolia",
];

if (!chain) {
console.error(`Missing chain argument. Valid chains are: ${validChains.join(", ")}`);
Expand Down
6 changes: 6 additions & 0 deletions utils/verify.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ export const getBlockExplorerApiEndpoint = (chain: string) => {
return "https://api-goerli.basescan.org/api";
} else if (chain === "zora") {
return "https://api.routescan.io/v2/network/mainnet/evm/7777777/etherscan/api";
} else if (chain === "base-sepolia") {
return "https://api-sepolia.basescan.org/api";
} else {
return `https://api-${chain}.etherscan.io/api`;
}
Expand Down Expand Up @@ -212,6 +214,10 @@ const getChainId = (chain: string) => {
return 84531;
} else if (chain === "zora") {
return 7777777;
} else if (chain === "sepolia") {
return 11155111;
} else if (chain === "base-sepolia") {
return 84532;
} else {
throw new Error(`Unknown chain ID for "${chain}". Please add to getChainId() function.`);
}
Expand Down