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
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ deploy-optimism :; forge script script/DeployTransparentProxyFactory.s.sol:Deplo
deploy-arbitrum :; forge script script/DeployTransparentProxyFactory.s.sol:DeployArbitrum --rpc-url arbitrum --broadcast --legacy --ledger --mnemonic-indexes ${MNEMONIC_INDEX} --sender ${LEDGER_SENDER} --verify -vvvv
deploy-zksync :; FOUNDRY_PROFILE=zksync forge script zksync/script/DeployTransparentProxyFactoryZkSync.s.sol:DeployZkSync --zksync --system-mode=true --rpc-url zksync --broadcast --ledger --mnemonic-indexes ${MNEMONIC_INDEX} --sender ${LEDGER_SENDER} --verify -vvvv
deploy-xlayer :; forge script script/DeployTransparentProxyFactory.s.sol:DeployTransparentProxyFactory --rpc-url xlayer --broadcast --ledger --mnemonic-indexes ${MNEMONIC_INDEX} --sender ${LEDGER_SENDER} --verify --legacy -vvvv
deploy-megaeth :; forge script script/DeployTransparentProxyFactory.s.sol:DeployTransparentProxyFactory --rpc-url megaeth --broadcast --ledger --mnemonic-indexes ${MNEMONIC_INDEX} --sender ${LEDGER_SENDER} --verify --legacy -vvvv --skip-simulation
# ---------------------------------------------- BASE SCRIPT CONFIGURATION ---------------------------------------------

BASE_LEDGER = --ledger --mnemonic-indexes $(MNEMONIC_INDEX) --sender $(LEDGER_SENDER)
Expand Down
1 change: 1 addition & 0 deletions foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ linea = "${RPC_LINEA}"
soneium = "${RPC_SONEIUM}"
bob = "${RPC_BOB}"
xlayer = "${RPC_XLAYER}"
megaeth = "${RPC_MEGAETH}"

[fuzz]
no_zksync_reserved_addresses = true
Expand Down
8 changes: 8 additions & 0 deletions src/contracts/utils/ChainHelpers.sol
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ library ChainIds {
uint256 internal constant PLASMA = 9745;
uint256 internal constant XLAYER = 196;
uint256 internal constant ANVIL = 31337;
uint256 internal constant MEGAETH = 4326;
}

library TestNetChainIds {
Expand All @@ -54,6 +55,7 @@ library TestNetChainIds {
uint256 internal constant BOB_SEPOLIA = 808813;
uint256 internal constant PLASMA_TESTNET = 9746;
uint256 internal constant XLAYER_TESTNET = 1952;
uint256 internal constant MEGAETH_TESTNET = 6342;
}

library ChainHelpers {
Expand Down Expand Up @@ -113,6 +115,8 @@ library ChainHelpers {
newFork = vm.createSelectFork(vm.rpcUrl('plasma'));
} else if (chainId == ChainIds.XLAYER) {
newFork = vm.createSelectFork(vm.rpcUrl('xlayer'));
} else if (chainId == ChainIds.MEGAETH) {
newFork = vm.createSelectFork(vm.rpcUrl('megaeth'));
} else {
revert UnknownChainId();
}
Expand Down Expand Up @@ -163,6 +167,8 @@ library ChainHelpers {
networkName = 'plasma';
} else if (chainId == ChainIds.XLAYER) {
networkName = 'xlayer';
} else if (chainId == ChainIds.MEGAETH) {
networkName = 'megaeth';
}
// testnets
else if (chainId == TestNetChainIds.ETHEREUM_SEPOLIA) {
Expand Down Expand Up @@ -203,6 +209,8 @@ library ChainHelpers {
networkName = 'plasma_testnet';
} else if (chainId == TestNetChainIds.XLAYER_TESTNET) {
networkName = 'xlayer_testnet';
} else if (chainId == TestNetChainIds.MEGAETH_TESTNET) {
networkName = 'megaeth_testnet';
} else {
revert('chain id is not supported');
}
Expand Down
Loading