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
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ deploy-avalanche :; forge script script/DeployTransparentProxyFactory.s.sol:Depl
deploy-optimism :; forge script script/DeployTransparentProxyFactory.s.sol:DeployOptimism --rpc-url optimism --broadcast --legacy --ledger --mnemonic-indexes ${MNEMONIC_INDEX} --sender ${LEDGER_SENDER} --verify -vvvv
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
# ---------------------------------------------- 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 @@ -61,6 +61,7 @@ zksync = "${RPC_ZKSYNC}"
linea = "${RPC_LINEA}"
soneium = "${RPC_SONEIUM}"
bob = "${RPC_BOB}"
xlayer = "${RPC_XLAYER}"

[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 @@ -28,6 +28,7 @@ library ChainIds {
uint256 internal constant SONEIUM = 1868;
uint256 internal constant BOB = 60808;
uint256 internal constant PLASMA = 9745;
uint256 internal constant XLAYER = 196;
}

library TestNetChainIds {
Expand All @@ -51,6 +52,7 @@ library TestNetChainIds {
uint256 internal constant SONEIUM_MINATO = 1946;
uint256 internal constant BOB_SEPOLIA = 808813;
uint256 internal constant PLASMA_TESTNET = 9746;
uint256 internal constant XLAYER_TESTNET = 1952;
}

library ChainHelpers {
Expand Down Expand Up @@ -108,6 +110,8 @@ library ChainHelpers {
newFork = vm.createSelectFork(vm.rpcUrl('bob'));
} else if (chainId == ChainIds.PLASMA) {
newFork = vm.createSelectFork(vm.rpcUrl('plasma'));
} else if (chainId == ChainIds.XLAYER) {
newFork = vm.createSelectFork(vm.rpcUrl('xlayer'));
} else {
revert UnknownChainId();
}
Expand Down Expand Up @@ -156,6 +160,8 @@ library ChainHelpers {
networkName = 'bob';
} else if (chainId == ChainIds.PLASMA) {
networkName = 'plasma';
} else if (chainId == ChainIds.XLAYER) {
networkName = 'xlayer';
}
// testnets
else if (chainId == TestNetChainIds.ETHEREUM_SEPOLIA) {
Expand Down Expand Up @@ -194,6 +200,8 @@ library ChainHelpers {
networkName = 'bob_sepolia';
} else if (chainId == TestNetChainIds.PLASMA_TESTNET) {
networkName = 'plasma_testnet';
} else if (chainId == TestNetChainIds.XLAYER_TESTNET) {
networkName = 'xlayer_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 @@ -111,6 +111,10 @@ abstract contract PlasmaScript is WithChainIdValidation {
constructor() WithChainIdValidation(ChainIds.PLASMA) {}
}

abstract contract XLayerScript is WithChainIdValidation {
constructor() WithChainIdValidation(ChainIds.XLAYER) {}
}

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