Skip to content

Commit

Permalink
Fix typo and add deployOnchain script
Browse files Browse the repository at this point in the history
  • Loading branch information
rookmate committed Dec 5, 2024
1 parent 423720a commit f2439b3
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ OPTIMISM_API_KEY="empty"
BASE_SEPOLIA_RPC="https://rpc.ankr.com/base_sepolia"
BASE_API_KEY="empty"

ADDRESS_RESOLVER="0x9433644DEa540F91faC99EC6FAC9d7579f925624" # TODO: ADD correct AddressResolver on Socket Composer Testnet
ADDRESS_RESOLVER="0x208dC31cd6042a09bbFDdB31614A337a51b870ba"

# Set values after deployment
COUNTER_DEPLOYER=""
Expand Down
33 changes: 33 additions & 0 deletions script/deployOnchain.s.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import {Script} from "forge-std/Script.sol";
import {console} from "forge-std/Console.sol";
import {CounterDeployer} from "../src/CounterDeployer.sol";
import {ETH_ADDRESS} from "lib/socket-poc/contracts/common/Constants.sol";

contract CounterDeployOnchain is Script {
function run() external {
string memory rpc = vm.envString("SOCKET_RPC");
console.log(rpc);
vm.createSelectFork(rpc);

uint256 deployerPrivateKey = vm.envUint("PRIVATE_KEY");
vm.startBroadcast(deployerPrivateKey);

CounterDeployer deployer = CounterDeployer(
vm.envAddress("COUNTER_DEPLOYER")
);

console.log("Counter Deployer:", address(deployer));

console.log("Deploying contracts on Arbitrum Sepolia...");
deployer.deployContracts(421614);
console.log("Deploying contracts on Optimism Sepolia...");
deployer.deployContracts(11155420);
console.log("Deploying contracts on Ethereum Sepolia...");
deployer.deployContracts(11155111);
console.log("Deploying contracts on Base Sepolia...");
deployer.deployContracts(84532);
}
}

0 comments on commit f2439b3

Please sign in to comment.