-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathJBBaseSucker.sol
More file actions
41 lines (36 loc) · 1.72 KB
/
Copy pathJBBaseSucker.sol
File metadata and controls
41 lines (36 loc) · 1.72 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
// SPDX-License-Identifier: MIT
pragma solidity 0.8.23;
import "./JBOptimismSucker.sol";
contract JBBaseSucker is JBOptimismSucker {
//*********************************************************************//
// ---------------------------- constructor -------------------------- //
//*********************************************************************//
/// @param deployer A contract that deploys the clones for this contracts.
/// @param directory A contract storing directories of terminals and controllers for each project.
/// @param permissions A contract storing permissions.
/// @param tokens A contract that manages token minting and burning.
/// @param addToBalanceMode The mode of adding tokens to balance.
constructor(
JBOptimismSuckerDeployer deployer,
IJBDirectory directory,
IJBPermissions permissions,
IJBTokens tokens,
JBAddToBalanceMode addToBalanceMode,
address trusted_forwarder
)
JBOptimismSucker(deployer, directory, permissions, tokens, addToBalanceMode, trusted_forwarder)
{}
//*********************************************************************//
// ------------------------ external views --------------------------- //
//*********************************************************************//
/// @notice Returns the chain on which the peer is located.
/// @return chainId of the peer.
function peerChainId() external view virtual override returns (uint256) {
uint256 chainId = block.chainid;
if (chainId == 1) return 8453;
if (chainId == 8453) return 1;
if (chainId == 11_155_111) return 84_532;
if (chainId == 84_532) return 11_155_111;
return 0;
}
}