Skip to content

Commit

Permalink
Add script deploy. Missing addressResolver address
Browse files Browse the repository at this point in the history
  • Loading branch information
rookmate committed Dec 3, 2024
1 parent 895b6c4 commit 71a01e1
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions script/Deploy.s.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

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

contract CounterDeploy is Script {
function run() external {
uint256 deployerPrivateKey = vm.envUint("PRIVATE_KEY");
vm.startBroadcast(deployerPrivateKey);

address addressResolver = 0x0; // TODO: ADD correct AddressResolver on Socket Composer Testnet
// Setting fee payment on Arbitrum Sepolia
FeesData memory feesData = FeesData({
feePoolChain: 421614,
feePoolToken: ETH_ADDRESS,
maxFees: 0.01 ether
});

CounterDeployer deployer = new CounterDeployer(
addressResolver,
feesData
);

CounterComposer gateway = new CounterComposer(
addressResolver,
address(deployer),
feesData
);

address counterPlug = deployer.counter();
console.log("Contracts deployed:");
console.log("CounterComposer:", address(gateway));
console.log("Counter Deployer:", address(deployer));
console.log("Counter:", address(counterPlug));

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

0 comments on commit 71a01e1

Please sign in to comment.