Skip to content

Commit 6ab18a7

Browse files
authored
Merge pull request #58 from kleros/docs/foreign-proxy-precompute
docs(HomeProxy): add clarification
2 parents 18bb483 + 549648e commit 6ab18a7

File tree

4 files changed

+11
-7
lines changed

4 files changed

+11
-7
lines changed

contracts/src/0.8/RealitioHomeProxyArbitrum.sol

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ contract RealitioHomeProxyArbitrum is IHomeArbitrationProxy {
2828

2929
/// @dev The address of the Realitio contract (v3.0 required). TRUSTED.
3030
IRealitio public immutable realitio;
31-
address public immutable foreignProxy; // Address of the proxy on L1.
31+
/// @dev Address of the proxy on L1. Note that it needs to be precomputed before deployment by using deployer's address and tx nonce.
32+
address public immutable foreignProxy;
3233
/// @dev ID of the foreign chain, required for Realitio.
3334
bytes32 public immutable foreignChainId;
3435

@@ -67,7 +68,7 @@ contract RealitioHomeProxyArbitrum is IHomeArbitrationProxy {
6768
* @notice Creates an arbitration proxy on the home chain.
6869
* @param _realitio Realitio contract address.
6970
* @param _metadata Metadata for Realitio.
70-
* @param _foreignProxy Address of the proxy on L1.
71+
* @param _foreignProxy Address of the proxy on L1. Note that it needs to be precomputed before deployment by using deployer's address and tx nonce.
7172
* @param _foreignChainId The ID of foreign chain (Sepolia/Mainnet).
7273
*/
7374
constructor(IRealitio _realitio, string memory _metadata, address _foreignProxy, uint256 _foreignChainId) {

contracts/src/0.8/RealitioHomeProxyGnosis.sol

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ contract RealitioHomeProxyGnosis is IHomeArbitrationProxy {
2626
IAMB public immutable amb;
2727

2828
/// @dev Address of the counter-party proxy on the Foreign Chain. TRUSTED.
29+
/// Note that it needs to be precomputed before deployment by using deployer's address and tx nonce.
2930
address public immutable foreignProxy;
3031

3132
/// @dev The chain ID where the foreign proxy is deployed.
@@ -65,7 +66,7 @@ contract RealitioHomeProxyGnosis is IHomeArbitrationProxy {
6566
* @notice Creates an arbitration proxy on the home chain.
6667
* @param _realitio Realitio contract address.
6768
* @param _metadata Metadata for Realitio.
68-
* @param _foreignProxy The address of the proxy.
69+
* @param _foreignProxy The address of the proxy. Note that it needs to be precomputed before deployment by using deployer's address and tx nonce.
6970
* @param _foreignChainId The ID of the chain where the foreign proxy is deployed.
7071
* @param _amb ArbitraryMessageBridge contract address.
7172
*/

contracts/src/0.8/RealitioHomeProxyOptimism.sol

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ contract RealitioHomeProxyOptimism is IHomeArbitrationProxy {
2323

2424
/// @dev The address of the Realitio contract (v3.0 required). TRUSTED.
2525
IRealitio public immutable realitio;
26-
address public immutable foreignProxy; // Address of the proxy on L1.
26+
/// @dev Address of the proxy on L1. Note that it needs to be precomputed before deployment by using deployer's address and tx nonce.
27+
address public immutable foreignProxy;
2728

2829
/// @dev ID of the foreign chain, required for Realitio.
2930
bytes32 public immutable foreignChainId;
@@ -61,7 +62,7 @@ contract RealitioHomeProxyOptimism is IHomeArbitrationProxy {
6162
* @notice Creates an arbitration proxy on the home chain.
6263
* @param _realitio Realitio contract address.
6364
* @param _metadata Metadata for Realitio.
64-
* @param _foreignProxy Address of the proxy on L1.
65+
* @param _foreignProxy Address of the proxy on L1. Note that it needs to be precomputed before deployment by using deployer's address and tx nonce.
6566
* @param _foreignChainId The ID of foreign chain (Sepolia/Mainnet).
6667
*/
6768
constructor(IRealitio _realitio, string memory _metadata, address _foreignProxy, uint256 _foreignChainId) {

contracts/src/0.8/RealitioHomeProxyZkSync.sol

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ contract RealitioHomeProxyZkSync is IHomeArbitrationProxy {
2727
/// @dev The address of the Realitio contract (v3.0 required). TRUSTED.
2828
IRealitio public immutable realitio;
2929
address public immutable foreignProxyAlias; // Address of the proxy on L1 converted to L2. See https://era.zksync.io/docs/api/go/utils.html#applyl1tol2alias
30-
address public immutable foreignProxy; // Address of the proxy on L1. Required for Realitio UI.
30+
/// @dev Address of the proxy on L1. Note that it needs to be precomputed before deployment by using deployer's address and tx nonce.
31+
address public immutable foreignProxy;
3132
/// @dev ID of the foreign chain, required for Realitio.
3233
bytes32 public immutable foreignChainId;
3334

@@ -64,7 +65,7 @@ contract RealitioHomeProxyZkSync is IHomeArbitrationProxy {
6465
* @notice Creates an arbitration proxy on the home chain.
6566
* @param _realitio Realitio contract address.
6667
* @param _metadata Metadata for Realitio.
67-
* @param _foreignProxy Address of the proxy on L1.
68+
* @param _foreignProxy Address of the proxy on L1. Note that it needs to be precomputed before deployment by using deployer's address and tx nonce.
6869
* @param _foreignProxyAlias Alias of the proxy on L1.
6970
* @param _foreignChainId The ID of foreign chain (Sepolia/Mainnet).
7071
*/

0 commit comments

Comments
 (0)