Skip to content

Commit ff0e925

Browse files
committed
Updated weth method name
Signed-off-by: Faisal Usmani <faisal.of.usmani@gmail.com>
1 parent ae04d5f commit ff0e925

13 files changed

+37
-49
lines changed

script/001DeployHubPool.s.sol

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ contract DeployHubPool is Script, Test, Constants {
2626
uint256 chainId = block.chainid;
2727

2828
// Get the appropriate addresses for this chain
29-
WETH9Interface weth = getWrappedNativeToken(chainId);
29+
address weth = getWETHAddress(chainId);
3030
FinderInterface finder = FinderInterface(getL1Addresses(chainId).finder);
3131

3232
vm.startBroadcast(deployerPrivateKey);
@@ -35,7 +35,7 @@ contract DeployHubPool is Script, Test, Constants {
3535
LpTokenFactory lpTokenFactory = new LpTokenFactory();
3636

3737
// Deploy HubPool with the LpTokenFactory address
38-
HubPool hubPool = new HubPool(lpTokenFactory, finder, weth, address(0));
38+
HubPool hubPool = new HubPool(lpTokenFactory, finder, WETH9Interface(weth), address(0));
3939

4040
// Log the deployed addresses
4141
console.log("Chain ID:", chainId);

script/002DeployOptimismAdapter.s.sol

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import { Constants } from "./utils/Constants.sol";
99
import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
1010
import { ITokenMessenger } from "../contracts/external/interfaces/CCTPInterfaces.sol";
1111
import { IL1StandardBridge } from "@eth-optimism/contracts/L1/messaging/IL1StandardBridge.sol";
12+
import { WETH9Interface } from "../contracts/external/interfaces/WETH9Interface.sol";
1213

1314
// How to run:
1415
// 1. `source .env` where `.env` has MNEMONIC="x x x ... x" and ETHERSCAN_API_KEY="x" entries
@@ -39,7 +40,7 @@ contract DeployOptimismAdapter is Script, Test, Constants {
3940

4041
// Deploy Optimism_Adapter with constructor parameters
4142
Optimism_Adapter optimismAdapter = new Optimism_Adapter(
42-
getWrappedNativeToken(chainId), // L1 WETH
43+
WETH9Interface(getWETHAddress(chainId)), // L1 WETH
4344
opStack.L1CrossDomainMessenger, // L1 Cross Domain Messenger
4445
IL1StandardBridge(opStack.L1StandardBridge), // L1 Standard Bridge
4546
IERC20(getUSDCAddress(chainId)), // L1 USDC
@@ -49,7 +50,7 @@ contract DeployOptimismAdapter is Script, Test, Constants {
4950
// Log the deployed addresses
5051
console.log("Chain ID:", chainId);
5152
console.log("Optimism_Adapter deployed to:", address(optimismAdapter));
52-
console.log("L1 WETH:", address(getWrappedNativeToken(chainId)));
53+
console.log("L1 WETH:", getWETHAddress(chainId));
5354
console.log("L1 Cross Domain Messenger:", opStack.L1CrossDomainMessenger);
5455
console.log("L1 Standard Bridge:", opStack.L1StandardBridge);
5556
console.log("L1 USDC:", getUSDCAddress(chainId));

script/003DeployOptimismSpokePool.s.sol

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import { Script } from "forge-std/Script.sol";
55
import { Test } from "forge-std/Test.sol";
66
import { console } from "forge-std/console.sol";
77
import { Optimism_SpokePool } from "../contracts/Optimism_SpokePool.sol";
8-
import { WETH9Interface } from "../contracts/external/interfaces/WETH9Interface.sol";
98
import { DeploymentUtils } from "./utils/DeploymentUtils.sol";
109

1110
// How to run:
@@ -25,7 +24,7 @@ contract DeployOptimismSpokePool is Script, Test, DeploymentUtils {
2524
console.log("HubPool address:", info.hubPool);
2625

2726
// Get the appropriate addresses for this chain
28-
WETH9Interface weth = getWrappedNativeToken(info.spokeChainId);
27+
address weth = getWETHAddress(info.spokeChainId);
2928

3029
// Get L2 addresses for Optimism
3130
address cctpTokenMessenger = getL2Address(info.spokeChainId, "cctpTokenMessenger");
@@ -34,7 +33,7 @@ contract DeployOptimismSpokePool is Script, Test, DeploymentUtils {
3433

3534
// Prepare constructor arguments for Optimism_SpokePool
3635
bytes memory constructorArgs = abi.encode(
37-
address(weth), // _wrappedNativeTokenAddress
36+
weth, // _wrappedNativeTokenAddress
3837
QUOTE_TIME_BUFFER(), // _depositQuoteTimeBuffer
3938
FILL_DEADLINE_BUFFER(), // _fillDeadlineBuffer
4039
getUSDCAddress(info.spokeChainId), // _l2Usdc
@@ -62,7 +61,7 @@ contract DeployOptimismSpokePool is Script, Test, DeploymentUtils {
6261
console.log("Chain ID:", info.spokeChainId);
6362
console.log("Hub Chain ID:", info.hubChainId);
6463
console.log("HubPool address:", info.hubPool);
65-
console.log("WETH address:", address(weth));
64+
console.log("WETH address:", weth);
6665
console.log("CCTP Token Messenger:", cctpTokenMessenger);
6766
console.log("USDC address:", getUSDCAddress(info.spokeChainId));
6867
console.log("Optimism_SpokePool proxy deployed to:", result.proxy);

script/005DeployArbitrumSpokePool.s.sol

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import { Script } from "forge-std/Script.sol";
55
import { Test } from "forge-std/Test.sol";
66
import { console } from "forge-std/console.sol";
77
import { Arbitrum_SpokePool } from "../contracts/Arbitrum_SpokePool.sol";
8-
import { WETH9Interface } from "../contracts/external/interfaces/WETH9Interface.sol";
98
import { DeploymentUtils } from "./utils/DeploymentUtils.sol";
109

1110
// How to run:
@@ -25,7 +24,7 @@ contract DeployArbitrumSpokePool is Script, Test, DeploymentUtils {
2524
console.log("HubPool address:", info.hubPool);
2625

2726
// Get the appropriate addresses for this chain
28-
WETH9Interface weth = getWrappedNativeToken(info.spokeChainId);
27+
address weth = getWETHAddress(info.spokeChainId);
2928

3029
// Get L2 addresses for Arbitrum
3130
address l2GatewayRouter = getL2Address(info.spokeChainId, "l2GatewayRouter");
@@ -35,7 +34,7 @@ contract DeployArbitrumSpokePool is Script, Test, DeploymentUtils {
3534

3635
// Prepare constructor arguments for Arbitrum_SpokePool
3736
bytes memory constructorArgs = abi.encode(
38-
address(weth), // _weth
37+
weth, // _weth
3938
QUOTE_TIME_BUFFER(), // _quoteTimeBuffer
4039
FILL_DEADLINE_BUFFER(), // _fillDeadlineBuffer
4140
getUSDCAddress(info.spokeChainId), // _usdc
@@ -66,7 +65,7 @@ contract DeployArbitrumSpokePool is Script, Test, DeploymentUtils {
6665
console.log("Chain ID:", info.spokeChainId);
6766
console.log("Hub Chain ID:", info.hubChainId);
6867
console.log("HubPool address:", info.hubPool);
69-
console.log("WETH address:", address(weth));
68+
console.log("WETH address:", weth);
7069
console.log("L2 Gateway Router:", l2GatewayRouter);
7170
console.log("CCTP Token Messenger:", cctpTokenMessenger);
7271
console.log("USDC address:", getUSDCAddress(info.spokeChainId));

script/007DeployEthereumSpokePool.s.sol

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import { Script } from "forge-std/Script.sol";
55
import { Test } from "forge-std/Test.sol";
66
import { console } from "forge-std/console.sol";
77
import { Ethereum_SpokePool } from "../contracts/Ethereum_SpokePool.sol";
8-
import { WETH9Interface } from "../contracts/external/interfaces/WETH9Interface.sol";
98
import { DeploymentUtils } from "./utils/DeploymentUtils.sol";
109

1110
// How to run:
@@ -25,13 +24,13 @@ contract DeployEthereumSpokePool is Script, Test, DeploymentUtils {
2524
console.log("HubPool address:", info.hubPool);
2625

2726
// Get the appropriate addresses for this chain
28-
WETH9Interface weth = getWrappedNativeToken(info.spokeChainId);
27+
address weth = getWETHAddress(info.spokeChainId);
2928

3029
vm.startBroadcast(deployerPrivateKey);
3130

3231
// Prepare constructor arguments for Ethereum_SpokePool
3332
bytes memory constructorArgs = abi.encode(
34-
address(weth), // _weth
33+
weth, // _weth
3534
QUOTE_TIME_BUFFER(), // _quoteTimeBuffer
3635
FILL_DEADLINE_BUFFER() // _fillDeadlineBuffer
3736
);
@@ -56,7 +55,7 @@ contract DeployEthereumSpokePool is Script, Test, DeploymentUtils {
5655
console.log("Chain ID:", info.spokeChainId);
5756
console.log("Hub Chain ID:", info.hubChainId);
5857
console.log("HubPool address:", info.hubPool);
59-
console.log("WETH address:", address(weth));
58+
console.log("WETH address:", weth);
6059
console.log("Ethereum_SpokePool proxy deployed to:", result.proxy);
6160
console.log("Ethereum_SpokePool implementation deployed to:", result.implementation);
6261

script/027DeployScrollSpokePool.s.sol

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ contract DeployScrollSpokePool is Script, Test, DeploymentUtils {
2525
console.log("HubPool address:", info.hubPool);
2626

2727
// Get the appropriate addresses for this chain
28-
WETH9Interface weth = getWrappedNativeToken(info.spokeChainId);
28+
address weth = getWETHAddress(info.spokeChainId);
2929

3030
// Get L2 addresses for Scroll
3131
address l2GatewayRouter = getL2Address(info.spokeChainId, "scrollERC20GatewayRouter");
@@ -35,7 +35,7 @@ contract DeployScrollSpokePool is Script, Test, DeploymentUtils {
3535

3636
// Prepare constructor arguments for Scroll_SpokePool
3737
bytes memory constructorArgs = abi.encode(
38-
address(weth), // _wrappedNativeTokenAddress
38+
weth, // _wrappedNativeTokenAddress
3939
QUOTE_TIME_BUFFER(), // _depositQuoteTimeBuffer
4040
FILL_DEADLINE_BUFFER() // _fillDeadlineBuffer
4141
);
@@ -64,7 +64,7 @@ contract DeployScrollSpokePool is Script, Test, DeploymentUtils {
6464
console.log("Chain ID:", info.spokeChainId);
6565
console.log("Hub Chain ID:", info.hubChainId);
6666
console.log("HubPool address:", info.hubPool);
67-
console.log("WETH address:", address(weth));
67+
console.log("WETH address:", weth);
6868
console.log("L2 Gateway Router:", l2GatewayRouter);
6969
console.log("L2 Scroll Messenger:", l2ScrollMessenger);
7070
console.log("Scroll_SpokePool proxy deployed to:", result.proxy);

script/036DeployBlastSpokePool.s.sol

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import { Script } from "forge-std/Script.sol";
55
import { Test } from "forge-std/Test.sol";
66
import { console } from "forge-std/console.sol";
77
import { Blast_SpokePool } from "../contracts/Blast_SpokePool.sol";
8-
import { WETH9Interface } from "../contracts/external/interfaces/WETH9Interface.sol";
98
import { DeploymentUtils } from "./utils/DeploymentUtils.sol";
109

1110
// How to run:
@@ -35,7 +34,7 @@ contract DeployBlastSpokePool is Script, Test, DeploymentUtils {
3534
console.log("HubPool address:", info.hubPool);
3635

3736
// Get the appropriate addresses for this chain
38-
WETH9Interface weth = getWrappedNativeToken(info.spokeChainId);
37+
address weth = getWETHAddress(info.spokeChainId);
3938

4039
// Get USDB and DAI addresses based on chain
4140
address usdb = getUSDBAddress(info.spokeChainId);
@@ -46,7 +45,7 @@ contract DeployBlastSpokePool is Script, Test, DeploymentUtils {
4645

4746
// Prepare constructor arguments for Blast_SpokePool
4847
bytes memory constructorArgs = abi.encode(
49-
address(weth), // _wrappedNativeTokenAddress
48+
weth, // _wrappedNativeTokenAddress
5049
QUOTE_TIME_BUFFER(), // _depositQuoteTimeBuffer
5150
FILL_DEADLINE_BUFFER(), // _fillDeadlineBuffer
5251
address(0), // _l2Usdc
@@ -79,7 +78,7 @@ contract DeployBlastSpokePool is Script, Test, DeploymentUtils {
7978
console.log("Chain ID:", info.spokeChainId);
8079
console.log("Hub Chain ID:", info.hubChainId);
8180
console.log("HubPool address:", info.hubPool);
82-
console.log("WETH address:", address(weth));
81+
console.log("WETH address:", weth);
8382
console.log("USDB address:", usdb);
8483
console.log("DAI address:", dai);
8584
console.log("Yield Recipient:", YIELD_RECIPIENT);

script/039DeployModeSpokePool.s.sol

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import { Script } from "forge-std/Script.sol";
55
import { Test } from "forge-std/Test.sol";
66
import { console } from "forge-std/console.sol";
77
import { Mode_SpokePool } from "../contracts/Mode_SpokePool.sol";
8-
import { WETH9Interface } from "../contracts/external/interfaces/WETH9Interface.sol";
98
import { DeploymentUtils } from "./utils/DeploymentUtils.sol";
109

1110
// How to run:
@@ -27,13 +26,13 @@ contract DeployModeSpokePool is Script, Test, DeploymentUtils {
2726
console.log("HubPool address:", info.hubPool);
2827

2928
// Get the appropriate addresses for this chain
30-
WETH9Interface weth = getWrappedNativeToken(info.spokeChainId);
29+
address weth = getWETHAddress(info.spokeChainId);
3130

3231
vm.startBroadcast(deployerPrivateKey);
3332

3433
// Prepare constructor arguments for Mode_SpokePool
3534
bytes memory constructorArgs = abi.encode(
36-
address(weth), // _wrappedNativeTokenAddress
35+
weth, // _wrappedNativeTokenAddress
3736
QUOTE_TIME_BUFFER(), // _depositQuoteTimeBuffer
3837
FILL_DEADLINE_BUFFER(), // _fillDeadlineBuffer
3938
address(0), // _l2Usdc
@@ -61,7 +60,7 @@ contract DeployModeSpokePool is Script, Test, DeploymentUtils {
6160
console.log("Chain ID:", info.spokeChainId);
6261
console.log("Hub Chain ID:", info.hubChainId);
6362
console.log("HubPool address:", info.hubPool);
64-
console.log("WETH address:", address(weth));
63+
console.log("WETH address:", weth);
6564
console.log("Mode_SpokePool proxy deployed to:", result.proxy);
6665
console.log("Mode_SpokePool implementation deployed to:", result.implementation);
6766

script/047DeployRedstoneSpokePool.s.sol

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import { Script } from "forge-std/Script.sol";
55
import { Test } from "forge-std/Test.sol";
66
import { console } from "forge-std/console.sol";
77
import { Redstone_SpokePool } from "../contracts/Redstone_SpokePool.sol";
8-
import { WETH9Interface } from "../contracts/external/interfaces/WETH9Interface.sol";
98
import { DeploymentUtils } from "./utils/DeploymentUtils.sol";
109

1110
// How to run:
@@ -25,13 +24,13 @@ contract DeployRedstoneSpokePool is Script, Test, DeploymentUtils {
2524
console.log("HubPool address:", info.hubPool);
2625

2726
// Get the appropriate addresses for this chain
28-
WETH9Interface weth = getWrappedNativeToken(info.spokeChainId);
27+
address weth = getWETHAddress(info.spokeChainId);
2928

3029
vm.startBroadcast(deployerPrivateKey);
3130

3231
// Prepare constructor arguments for Redstone_SpokePool
3332
bytes memory constructorArgs = abi.encode(
34-
address(weth), // _wrappedNativeTokenAddress
33+
weth, // _wrappedNativeTokenAddress
3534
QUOTE_TIME_BUFFER(), // _depositQuoteTimeBuffer
3635
FILL_DEADLINE_BUFFER(), // _fillDeadlineBuffer
3736
address(0), // _l2Usdc
@@ -59,7 +58,7 @@ contract DeployRedstoneSpokePool is Script, Test, DeploymentUtils {
5958
console.log("Chain ID:", info.spokeChainId);
6059
console.log("Hub Chain ID:", info.hubChainId);
6160
console.log("HubPool address:", info.hubPool);
62-
console.log("WETH address:", address(weth));
61+
console.log("WETH address:", weth);
6362
console.log("Redstone_SpokePool proxy deployed to:", result.proxy);
6463
console.log("Redstone_SpokePool implementation deployed to:", result.implementation);
6564

script/049DeployZoraSpokePool.s.sol

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import { Script } from "forge-std/Script.sol";
55
import { Test } from "forge-std/Test.sol";
66
import { console } from "forge-std/console.sol";
77
import { Zora_SpokePool } from "../contracts/Zora_SpokePool.sol";
8-
import { WETH9Interface } from "../contracts/external/interfaces/WETH9Interface.sol";
98
import { DeploymentUtils } from "./utils/DeploymentUtils.sol";
109

1110
// How to run:
@@ -25,13 +24,13 @@ contract DeployZoraSpokePool is Script, Test, DeploymentUtils {
2524
console.log("HubPool address:", info.hubPool);
2625

2726
// Get the appropriate addresses for this chain
28-
WETH9Interface weth = getWrappedNativeToken(info.spokeChainId);
27+
address weth = getWETHAddress(info.spokeChainId);
2928

3029
vm.startBroadcast(deployerPrivateKey);
3130

3231
// Prepare constructor arguments for Zora_SpokePool
3332
bytes memory constructorArgs = abi.encode(
34-
address(weth), // _wrappedNativeTokenAddress
33+
weth, // _wrappedNativeTokenAddress
3534
QUOTE_TIME_BUFFER(), // _depositQuoteTimeBuffer
3635
FILL_DEADLINE_BUFFER(), // _fillDeadlineBuffer
3736
address(0), // _l2Usdc
@@ -59,7 +58,7 @@ contract DeployZoraSpokePool is Script, Test, DeploymentUtils {
5958
console.log("Chain ID:", info.spokeChainId);
6059
console.log("Hub Chain ID:", info.hubChainId);
6160
console.log("HubPool address:", info.hubPool);
62-
console.log("WETH address:", address(weth));
61+
console.log("WETH address:", weth);
6362
console.log("Zora_SpokePool proxy deployed to:", result.proxy);
6463
console.log("Zora_SpokePool implementation deployed to:", result.implementation);
6564

0 commit comments

Comments
 (0)