Skip to content

Commit

Permalink
nit: move CrossChainPingPong into dedicated folder (ethereum-optimism…
Browse files Browse the repository at this point in the history
…#220)

* ping.pong

* update test
  • Loading branch information
hamdiallam authored Oct 23, 2024
1 parent 601e58e commit 52b9095
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 31 deletions.
29 changes: 0 additions & 29 deletions contracts/script/DeployCrossChainPingPong.s.sol

This file was deleted.

20 changes: 20 additions & 0 deletions contracts/script/pingpong/Deploy.s.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.25;

import {Script, console} from "forge-std/Script.sol";
import {CrossChainPingPong} from "../../src/pingpong/CrossChainPingPong.sol";

contract DeployScript is Script {
function setUp() public {}

function run() public {
uint256[] memory allowedChains = new uint256[](2);
allowedChains[0] = 901;
allowedChains[1] = 902;

vm.broadcast();
uint256 serverChainId = allowedChains[0];
CrossChainPingPong pingpong = new CrossChainPingPong{salt: "pingpong"}(allowedChains, serverChainId);
console.log("Deployed at: ", address(pingpong));
}
}
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
CallerNotL2ToL2CrossDomainMessenger,
InvalidCrossDomainSender,
BallAlreadyServed
} from "../src/CrossChainPingPong.sol";
} from "../../src/pingpong/CrossChainPingPong.sol";
import {IL2ToL2CrossDomainMessenger} from "@contracts-bedrock/L2/interfaces/IL2ToL2CrossDomainMessenger.sol";
import {Predeploys} from "@contracts-bedrock/libraries/Predeploys.sol";

Expand Down
2 changes: 1 addition & 1 deletion docs/src/guides/interop/writing-contract-using-l2cdm.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!-- omit in toc -->
# Writing cross-chain contract using `L2ToL2CrossDomainMessenger`

This guide walks through the `CrossChainPingPong.sol` contract, focusing on high level design and steps on integrating the `L2ToL2CrossChainMessenger` contract. The source code can be found [here](https://github.com/ethereum-optimism/supersim/blob/f400984d8057fe54cfbaabee279a6a45cd41411b/contracts/src/CrossChainPingPong.sol).
This guide walks through the `CrossChainPingPong.sol` contract, focusing on high level design and steps on integrating the `L2ToL2CrossChainMessenger` contract. The source code can be found [here](https://github.com/ethereum-optimism/supersim/blob/main/contracts/src/pingpong/CrossChainPingPong.sol).

- [High level overview](#high-level-overview)
- [Diagram](#diagram)
Expand Down

0 comments on commit 52b9095

Please sign in to comment.