Skip to content

Commit

Permalink
chore: add config files for each chain
Browse files Browse the repository at this point in the history
  • Loading branch information
EperezOk committed May 13, 2024
1 parent 5904d58 commit 1277fb5
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 5 deletions.
7 changes: 7 additions & 0 deletions scripts/config/ArbMainnet.config.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

library ArbMainnetConfig {
// ---------------- PROTOCOL ADDRESSES ----------------
address constant V1_FACTORY = 0x0000000000000000000000000000000000000000;
}
7 changes: 7 additions & 0 deletions scripts/config/ArbSepolia.config.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

library ArbSepoliaConfig {
// ---------------- PROTOCOL ADDRESSES ----------------
address constant V1_FACTORY = 0x0000000000000000000000000000000000000000;
}
10 changes: 5 additions & 5 deletions scripts/state/Deploy.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,24 @@ pragma solidity ^0.8.0;
import {Script, console2} from "forge-std/Script.sol";
import {IOverlayV1Factory} from "@overlay-protocol/v1-core/contracts/interfaces/IOverlayV1Factory.sol";
import {OverlayV1State} from "contracts/OverlayV1State.sol";
import {ArbSepoliaConfig} from "scripts/config/ArbSepolia.config.sol";
import {ArbMainnetConfig} from "scripts/config/ArbMainnet.config.sol";

// 1. Set required environment variables: ETHERSCAN_API_KEY, DEPLOYER_PK, RPC.
// 2. Run with:
// 2. Update the config file for the network you are deploying to.
// 3. Run with:
// $ source .env
// $ forge script scripts/state/Deploy.s.sol:DeployScript --rpc-url $RPC --verify -vvvv --broadcast

contract DeployScript is Script {
// TODO: update values as needed
address constant FACTORY = 0x8cCD181113c7Ae40f31D5e8178a98A1A60B55c4C;

function run() external {
uint256 DEPLOYER_PK = vm.envUint("DEPLOYER_PK");

vm.startBroadcast(DEPLOYER_PK);

// <!---- START DEPLOYMENT ---->

OverlayV1State state = new OverlayV1State(IOverlayV1Factory(FACTORY));
OverlayV1State state = new OverlayV1State(IOverlayV1Factory(ArbSepoliaConfig.V1_FACTORY));

// <!-- END DEPLOYMENT -->

Expand Down

0 comments on commit 1277fb5

Please sign in to comment.