Skip to content

Commit

Permalink
🚀 Adjust Upgrade script to base engine
Browse files Browse the repository at this point in the history
  • Loading branch information
Flocqst committed Nov 13, 2024
1 parent e0ce310 commit 65c3779
Showing 1 changed file with 13 additions and 14 deletions.
27 changes: 13 additions & 14 deletions script/Upgrade.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,9 @@ pragma solidity 0.8.27;
import {Engine} from "src/Engine.sol";

// parameters
import {ArbitrumParameters} from
"script/utils/parameters/ArbitrumParameters.sol";
import {ArbitrumSepoliaParameters} from
"script/utils/parameters/ArbitrumSepoliaParameters.sol";
import {BaseParameters} from "script/utils/parameters/BaseParameters.sol";
import {BaseSepoliaParameters} from
"script/utils/parameters/BaseSepoliaParameters.sol";

// forge utils
import {Script} from "lib/forge-std/src/Script.sol";
Expand Down Expand Up @@ -40,16 +39,16 @@ contract Setup is Script {

/// @dev steps to deploy and verify on Base:
/// (1) load the variables in the .env file via `source .env`
/// (2) run `forge script script/Upgrade.s.sol:DeployArbitrum --rpc-url $ARBITRUM_RPC_URL --etherscan-api-key $ARBISCAN_API_KEY --broadcast --verify -vvvv`
contract DeployArbitrum is Setup, ArbitrumParameters {
/// (2) run `forge script script/Upgrade.s.sol:DeployBase --rpc-url $BASE_RPC_URL --etherscan-api-key $BASESCAN_API_KEY --broadcast --verify -vvvv`
contract DeployBase is Setup, BaseParameters {
function run() public {
uint256 privateKey = vm.envUint("PRIVATE_KEY");
vm.startBroadcast(privateKey);

Setup.deployImplementation({
perpsMarketProxy: PERPS_MARKET_PROXY,
spotMarketProxy: SPOT_MARKET_PROXY,
sUSDProxy: USD_PROXY,
perpsMarketProxy: PERPS_MARKET_PROXY_ANDROMEDA,
spotMarketProxy: SPOT_MARKET_PROXY_ANDROMEDA,
sUSDProxy: USD_PROXY_ANDROMEDA,
pDAO: PDAO,
zap: ZAP,
usdc: USDC,
Expand All @@ -62,16 +61,16 @@ contract DeployArbitrum is Setup, ArbitrumParameters {

/// @dev steps to deploy and verify on Base:
/// (1) load the variables in the .env file via `source .env`
/// (2) run `forge script script/Upgrade.s.sol:DeployArbitrumSepolia --rpc-url $ARBITRUM_SEPOLIA_RPC_URL --etherscan-api-key $ARBISCAN_API_KEY --broadcast --verify -vvvv`
contract DeployArbitrumSepolia is Setup, ArbitrumSepoliaParameters {
/// (2) run `forge script script/Upgrade.s.sol:DeployBaseSepolia --rpc-url $BASE_SEPOLIA_RPC_URL --etherscan-api-key $BASESCAN_API_KEY --broadcast --verify -vvvv`
contract DeployBaseSepolia is Setup, BaseSepoliaParameters {
function run() public {
uint256 privateKey = vm.envUint("PRIVATE_KEY");
vm.startBroadcast(privateKey);

Setup.deployImplementation({
perpsMarketProxy: PERPS_MARKET_PROXY,
spotMarketProxy: SPOT_MARKET_PROXY,
sUSDProxy: USD_PROXY,
perpsMarketProxy: PERPS_MARKET_PROXY_ANDROMEDA,
spotMarketProxy: SPOT_MARKET_PROXY_ANDROMEDA,
sUSDProxy: USD_PROXY_ANDROMEDA,
pDAO: PDAO,
zap: ZAP,
usdc: USDC,
Expand Down

0 comments on commit 65c3779

Please sign in to comment.