Skip to content

Commit

Permalink
Comment Ethereum Sepolia
Browse files Browse the repository at this point in the history
  • Loading branch information
rookmate committed Dec 16, 2024
1 parent 5d3582c commit 1ddc511
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 29 deletions.
32 changes: 16 additions & 16 deletions script/counter/checkCounters.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ contract CheckCounters is Script {
deployer.counter(),
84532
);
address counterInstanceSepolia = deployer.getOnChainAddress(
deployer.counter(),
11155111
);
//address counterInstanceSepolia = deployer.getOnChainAddress(
// deployer.counter(),
// 11155111
//);

if (counterInstanceArbitrumSepolia != address(0)) {
vm.createSelectFork(vm.envString("ARBITRUM_SEPOLIA_RPC"));
Expand Down Expand Up @@ -71,17 +71,17 @@ contract CheckCounters is Script {
console.log("Counter not yet deployed on Base Sepolia");
}

if (counterInstanceSepolia != address(0)) {
vm.createSelectFork(vm.envString("OPTIMISM_SEPOLIA_RPC"));
uint256 counterValueOptimismSepolia = Counter(
counterInstanceOptimismSepolia
).counter();
console.log(
"Counter value on Optimism Sepolia: ",
counterValueOptimismSepolia
);
} else {
console.log("Counter not yet deployed on Optimism Sepolia");
}
//if (counterInstanceSepolia != address(0)) {
// vm.createSelectFork(vm.envString("SEPOLIA_RPC"));
// uint256 counterValueOptimismSepolia = Counter(
// counterInstanceOptimismSepolia
// ).counter();
// console.log(
// "Counter value on Ethereum Sepolia: ",
// counterValueOptimismSepolia
// );
//} else {
// console.log("Counter not yet deployed on Ethereum Sepolia");
//}
}
}
4 changes: 2 additions & 2 deletions script/counter/deployCounterOnchain.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ contract CounterDeployOnchain is Script {
deployer.deployContracts(11155420);
console.log("Deploying contracts on Base Sepolia...");
deployer.deployContracts(84532);
console.log("Deploying contracts on Ethereum Sepolia...");
deployer.deployContracts(11155111);
//console.log("Deploying contracts on Ethereum Sepolia...");
//deployer.deployContracts(11155111);
}
}
22 changes: 11 additions & 11 deletions script/counter/incrementCounters.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,17 @@ contract IncrementCounters is Script {
deployer.counter(),
84532
);
address counterForwarderSepolia = deployer.forwarderAddresses(
deployer.counter(),
11155111
);
//address counterForwarderSepolia = deployer.forwarderAddresses(
// deployer.counter(),
// 11155111
//);

// Count non-zero addresses
uint256 nonZeroCount = 0;
if (counterForwarderArbitrumSepolia != address(0)) nonZeroCount++;
if (counterForwarderOptimismSepolia != address(0)) nonZeroCount++;
if (counterForwarderBaseSepolia != address(0)) nonZeroCount++;
if (counterForwarderSepolia != address(0)) nonZeroCount++;
//if (counterForwarderSepolia != address(0)) nonZeroCount++;

address[] memory instances = new address[](nonZeroCount);
uint256 index = 0;
Expand All @@ -64,12 +64,12 @@ contract IncrementCounters is Script {
} else {
console.log("Base Sepolia forwarder not yet deployed");
}
if (counterForwarderSepolia != address(0)) {
instances[index] = counterForwarderSepolia;
index++;
} else {
console.log("Sepolia forwarder not yet deployed");
}
//if (counterForwarderSepolia != address(0)) {
// instances[index] = counterForwarderSepolia;
// index++;
//} else {
// console.log("Ethereum Sepolia forwarder not yet deployed");
//}

vm.startBroadcast(deployerPrivateKey);
gateway.incrementCounters(instances);
Expand Down

0 comments on commit 1ddc511

Please sign in to comment.