Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/contracts/utils/ChainHelpers.sol
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ library ChainIds {
uint256 internal constant INK = 57073;
uint256 internal constant SONEIUM = 1868;
uint256 internal constant BOB = 60808;
uint256 internal constant PLASMA = 9745;
}

library TestNetChainIds {
Expand All @@ -49,6 +50,7 @@ library TestNetChainIds {
uint256 internal constant MANTLE_SEPOLIA = 5003;
uint256 internal constant SONEIUM_MINATO = 1946;
uint256 internal constant BOB_SEPOLIA = 808813;
uint256 internal constant PLASMA_TESTNET = 9746;
}

library ChainHelpers {
Expand Down Expand Up @@ -104,6 +106,8 @@ library ChainHelpers {
newFork = vm.createSelectFork(vm.rpcUrl('soneium'));
} else if (chainId == ChainIds.BOB) {
newFork = vm.createSelectFork(vm.rpcUrl('bob'));
} else if (chainId == ChainIds.PLASMA) {
newFork = vm.createSelectFork(vm.rpcUrl('plasma'));
} else {
revert UnknownChainId();
}
Expand Down Expand Up @@ -150,6 +154,8 @@ library ChainHelpers {
networkName = 'soneium';
} else if (chainId == ChainIds.BOB) {
networkName = 'bob';
} else if (chainId == ChainIds.PLASMA) {
networkName = 'plasma';
}
// testnets
else if (chainId == TestNetChainIds.ETHEREUM_SEPOLIA) {
Expand Down Expand Up @@ -186,6 +192,8 @@ library ChainHelpers {
networkName = 'soneium_minato';
} else if (chainId == TestNetChainIds.BOB_SEPOLIA) {
networkName = 'bob_sepolia';
} else if (chainId == TestNetChainIds.PLASMA_TESTNET) {
networkName = 'plasma_testnet';
} else {
revert('chain id is not supported');
}
Expand Down
4 changes: 4 additions & 0 deletions src/contracts/utils/ScriptUtils.sol
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,10 @@ abstract contract SepoliaScript is WithChainIdValidation {
constructor() WithChainIdValidation(ChainIds.SEPOLIA) {}
}

abstract contract PlasmaScript is WithChainIdValidation {
constructor() WithChainIdValidation(ChainIds.PLASMA) {}
}

library Create2Utils {
// https://github.com/safe-global/safe-singleton-factory
address public constant CREATE2_FACTORY = 0x914d7Fec6aaC8cd542e72Bca78B30650d45643d7;
Expand Down
Loading