Skip to content

Commit 4d45750

Browse files
committed
Fix deployments
1 parent 6adc8d1 commit 4d45750

File tree

10 files changed

+2100
-457
lines changed

10 files changed

+2100
-457
lines changed

contracts/ZkSync_SpokePool.sol

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ contract ZkSync_SpokePool is SpokePool, CircleCCTPAdapter {
3939
// Legacy bridge used to withdraw ERC20's to L1, replaced by `l2AssetRouter`.
4040
address public DEPRECATED_zkErc20Bridge;
4141

42-
/// @custom:oz-upgrades-unsafe-allow state-variable-immutable
4342
/// @dev Legacy bridge used to withdraw USDC to L1, for withdrawing all other ERC20's we use `l2AssetRouter`.
4443
ZkBridgeLike public immutable zkUSDCBridge;
4544

@@ -191,7 +190,7 @@ contract ZkSync_SpokePool is SpokePool, CircleCCTPAdapter {
191190

192191
// Implementation from https://github.com/matter-labs/era-contracts/blob/48e189814aabb43964ed29817a7f05aa36f09fd6/l1-contracts/contracts/common/libraries/DataEncoding.sol#L117C14-L117C62
193192
function _getAssetId(address _tokenAddress) internal view returns (bytes32) {
194-
return keccak256(abi.encode(l1ChainId, l2NativeTokenVault, _tokenAddress));
193+
return keccak256(abi.encode(l1ChainId, L2_NATIVE_TOKEN_VAULT_ADDR, _tokenAddress));
195194
}
196195

197196
// Implementation from https://github.com/matter-labs/era-contracts/blob/48e189814aabb43964ed29817a7f05aa36f09fd6/l1-contracts/contracts/common/libraries/DataEncoding.sol#L24C1-L30C6

deploy/016_deploy_zksync_spokepool.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,9 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
2020

2121
const artifact = await deployer.loadArtifact(contractName);
2222

23-
const { zkErc20Bridge, zkUSDCBridge = ZERO_ADDRESS, cctpTokenMessenger } = L2_ADDRESS_MAP[spokeChainId];
23+
const { zkUSDCBridge = ZERO_ADDRESS, cctpTokenMessenger } = L2_ADDRESS_MAP[spokeChainId];
2424
const initArgs = [
2525
0, // Start at 0 since this first time we're deploying this spoke pool. On future upgrades increase this.
26-
zkErc20Bridge,
2726
hubPool.address,
2827
hubPool.address,
2928
];
@@ -44,6 +43,7 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
4443
WETH[spokeChainId],
4544
usdcAddress,
4645
zkUSDCBridge,
46+
hubChainId,
4747
cctpTokenMessenger,
4848
QUOTE_TIME_BUFFER,
4949
FILL_DEADLINE_BUFFER,

deploy/059_deploy_lens_spokepool.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,10 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
2020

2121
const artifact = await deployer.loadArtifact(contractName);
2222

23-
const { zkErc20Bridge, zkUSDCBridge, cctpTokenMessenger } = L2_ADDRESS_MAP[spokeChainId];
23+
const { zkUSDCBridge, cctpTokenMessenger } = L2_ADDRESS_MAP[spokeChainId];
2424

2525
const initArgs = [
2626
100_000, // Redeployment of the Spoke Pool proxy @ 09-01-2025. Offset the initial deposit ID by 100k
27-
zkErc20Bridge,
2827
hubPool.address,
2928
hubPool.address,
3029
];
@@ -44,6 +43,7 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
4443
WGHO[spokeChainId],
4544
usdcAddress,
4645
zkUSDCBridge,
46+
hubChainId,
4747
cctpTokenMessenger,
4848
QUOTE_TIME_BUFFER,
4949
FILL_DEADLINE_BUFFER,

deploy/consts.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,6 @@ export const L2_ADDRESS_MAP: { [key: number]: { [contractName: string]: string }
225225
cctpMessageTransmitter: "0x7865fAfC2db2093669d92c0F33AeEF291086BEFD",
226226
},
227227
[CHAIN_IDs.ZK_SYNC]: {
228-
zkErc20Bridge: "0x11f943b2c77b743AB90f4A0Ae7d5A4e7FCA3E102",
229228
cctpTokenMessenger: ZERO_ADDRESS, // CCTP not available on zkSync.
230229
"1inchV6Router": "0x6fd4383cB451173D5f9304F041C7BCBf27d561fF",
231230
permit2: "0x0000000000225e31d15943971f47ad3022f714fa",
@@ -259,7 +258,6 @@ export const L2_ADDRESS_MAP: { [key: number]: { [contractName: string]: string }
259258
cctpV2TokenMessenger: "0x0000000000000000000000000000000000000000",
260259
},
261260
[CHAIN_IDs.LENS]: {
262-
zkErc20Bridge: "0xfBEC23c5BB0E076F2ef4d0AaD7fe331aE5A01143",
263261
zkUSDCBridge: "0x7188B6975EeC82ae914b6eC7AC32b3c9a18b2c81",
264262
cctpTokenMessenger: ZERO_ADDRESS, // Not available on Lens.
265263
permit2: "0x0000000000225e31D15943971F47aD3022F714Fa",

0 commit comments

Comments
 (0)