diff --git a/scripts/config/ArbMainnet.config.sol b/scripts/config/ArbMainnet.config.sol new file mode 100644 index 0000000..9a25855 --- /dev/null +++ b/scripts/config/ArbMainnet.config.sol @@ -0,0 +1,7 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +library ArbMainnetConfig { + // ---------------- PROTOCOL ADDRESSES ---------------- + address constant V1_FACTORY = 0x0000000000000000000000000000000000000000; +} diff --git a/scripts/config/ArbSepolia.config.sol b/scripts/config/ArbSepolia.config.sol new file mode 100644 index 0000000..aa49672 --- /dev/null +++ b/scripts/config/ArbSepolia.config.sol @@ -0,0 +1,7 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +library ArbSepoliaConfig { + // ---------------- PROTOCOL ADDRESSES ---------------- + address constant V1_FACTORY = 0x0000000000000000000000000000000000000000; +} diff --git a/scripts/state/Deploy.s.sol b/scripts/state/Deploy.s.sol index 07b6581..bb3fa1d 100644 --- a/scripts/state/Deploy.s.sol +++ b/scripts/state/Deploy.s.sol @@ -4,16 +4,16 @@ 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"); @@ -21,7 +21,7 @@ contract DeployScript is Script { // - OverlayV1State state = new OverlayV1State(IOverlayV1Factory(FACTORY)); + OverlayV1State state = new OverlayV1State(IOverlayV1Factory(ArbSepoliaConfig.V1_FACTORY)); //