Skip to content

Commit bf955b8

Browse files
authored
feat: add Plasma (#76)
1 parent 94b1392 commit bf955b8

2 files changed

Lines changed: 12 additions & 0 deletions

File tree

src/contracts/utils/ChainHelpers.sol

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ library ChainIds {
2727
uint256 internal constant INK = 57073;
2828
uint256 internal constant SONEIUM = 1868;
2929
uint256 internal constant BOB = 60808;
30+
uint256 internal constant PLASMA = 9745;
3031
}
3132

3233
library TestNetChainIds {
@@ -49,6 +50,7 @@ library TestNetChainIds {
4950
uint256 internal constant MANTLE_SEPOLIA = 5003;
5051
uint256 internal constant SONEIUM_MINATO = 1946;
5152
uint256 internal constant BOB_SEPOLIA = 808813;
53+
uint256 internal constant PLASMA_TESTNET = 9746;
5254
}
5355

5456
library ChainHelpers {
@@ -104,6 +106,8 @@ library ChainHelpers {
104106
newFork = vm.createSelectFork(vm.rpcUrl('soneium'));
105107
} else if (chainId == ChainIds.BOB) {
106108
newFork = vm.createSelectFork(vm.rpcUrl('bob'));
109+
} else if (chainId == ChainIds.PLASMA) {
110+
newFork = vm.createSelectFork(vm.rpcUrl('plasma'));
107111
} else {
108112
revert UnknownChainId();
109113
}
@@ -150,6 +154,8 @@ library ChainHelpers {
150154
networkName = 'soneium';
151155
} else if (chainId == ChainIds.BOB) {
152156
networkName = 'bob';
157+
} else if (chainId == ChainIds.PLASMA) {
158+
networkName = 'plasma';
153159
}
154160
// testnets
155161
else if (chainId == TestNetChainIds.ETHEREUM_SEPOLIA) {
@@ -186,6 +192,8 @@ library ChainHelpers {
186192
networkName = 'soneium_minato';
187193
} else if (chainId == TestNetChainIds.BOB_SEPOLIA) {
188194
networkName = 'bob_sepolia';
195+
} else if (chainId == TestNetChainIds.PLASMA_TESTNET) {
196+
networkName = 'plasma_testnet';
189197
} else {
190198
revert('chain id is not supported');
191199
}

src/contracts/utils/ScriptUtils.sol

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,10 @@ abstract contract SepoliaScript is WithChainIdValidation {
107107
constructor() WithChainIdValidation(ChainIds.SEPOLIA) {}
108108
}
109109

110+
abstract contract PlasmaScript is WithChainIdValidation {
111+
constructor() WithChainIdValidation(ChainIds.PLASMA) {}
112+
}
113+
110114
library Create2Utils {
111115
// https://github.com/safe-global/safe-singleton-factory
112116
address public constant CREATE2_FACTORY = 0x914d7Fec6aaC8cd542e72Bca78B30650d45643d7;

0 commit comments

Comments
 (0)