Skip to content
Open
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
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@
"generate-evm-artifacts": "rm -rf typechain && TYPECHAIN=ethers yarn hardhat typechain",
"process-hardhat-export": "hardhat export --export-all ./cache/massExport.json && ts-node ./scripts/processHardhatExport.ts && prettier --write ./deployments/deployments.json",
"pre-commit-hook": "sh scripts/preCommitHook.sh",
"extract-addresses": "./script/utils/extract_foundry_addresses.sh"
"extract-addresses": "./script/utils/extract_foundry_addresses.sh",
"generate-constants-json": "ts-node ./script/utils/GenerateConstantsJson.ts"
},
"dependencies": {
"@across-protocol/constants": "^3.1.69",
Expand Down
4 changes: 2 additions & 2 deletions script/001DeployHubPool.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ contract DeployHubPool is Script, Test, Constants {
uint256 chainId = block.chainid;

// Get the appropriate addresses for this chain
WETH9Interface weth = getWrappedNativeToken(chainId);
address weth = getWETHAddress(chainId);
FinderInterface finder = FinderInterface(getL1Addresses(chainId).finder);

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

// Deploy HubPool with the LpTokenFactory address
HubPool hubPool = new HubPool(lpTokenFactory, finder, weth, address(0));
HubPool hubPool = new HubPool(lpTokenFactory, finder, WETH9Interface(weth), address(0));

// Log the deployed addresses
console.log("Chain ID:", chainId);
Expand Down
5 changes: 3 additions & 2 deletions script/002DeployOptimismAdapter.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { Constants } from "./utils/Constants.sol";
import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import { ITokenMessenger } from "../contracts/external/interfaces/CCTPInterfaces.sol";
import { IL1StandardBridge } from "@eth-optimism/contracts/L1/messaging/IL1StandardBridge.sol";
import { WETH9Interface } from "../contracts/external/interfaces/WETH9Interface.sol";

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

// Deploy Optimism_Adapter with constructor parameters
Optimism_Adapter optimismAdapter = new Optimism_Adapter(
getWrappedNativeToken(chainId), // L1 WETH
WETH9Interface(getWETHAddress(chainId)), // L1 WETH
opStack.L1CrossDomainMessenger, // L1 Cross Domain Messenger
IL1StandardBridge(opStack.L1StandardBridge), // L1 Standard Bridge
IERC20(getUSDCAddress(chainId)), // L1 USDC
Expand All @@ -49,7 +50,7 @@ contract DeployOptimismAdapter is Script, Test, Constants {
// Log the deployed addresses
console.log("Chain ID:", chainId);
console.log("Optimism_Adapter deployed to:", address(optimismAdapter));
console.log("L1 WETH:", address(getWrappedNativeToken(chainId)));
console.log("L1 WETH:", getWETHAddress(chainId));
console.log("L1 Cross Domain Messenger:", opStack.L1CrossDomainMessenger);
console.log("L1 Standard Bridge:", opStack.L1StandardBridge);
console.log("L1 USDC:", getUSDCAddress(chainId));
Expand Down
7 changes: 3 additions & 4 deletions script/003DeployOptimismSpokePool.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { Script } from "forge-std/Script.sol";
import { Test } from "forge-std/Test.sol";
import { console } from "forge-std/console.sol";
import { Optimism_SpokePool } from "../contracts/Optimism_SpokePool.sol";
import { WETH9Interface } from "../contracts/external/interfaces/WETH9Interface.sol";
import { DeploymentUtils } from "./utils/DeploymentUtils.sol";

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

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

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

// Prepare constructor arguments for Optimism_SpokePool
bytes memory constructorArgs = abi.encode(
address(weth), // _wrappedNativeTokenAddress
weth, // _wrappedNativeTokenAddress
QUOTE_TIME_BUFFER(), // _depositQuoteTimeBuffer
FILL_DEADLINE_BUFFER(), // _fillDeadlineBuffer
getUSDCAddress(info.spokeChainId), // _l2Usdc
Expand Down Expand Up @@ -62,7 +61,7 @@ contract DeployOptimismSpokePool is Script, Test, DeploymentUtils {
console.log("Chain ID:", info.spokeChainId);
console.log("Hub Chain ID:", info.hubChainId);
console.log("HubPool address:", info.hubPool);
console.log("WETH address:", address(weth));
console.log("WETH address:", weth);
console.log("CCTP Token Messenger:", cctpTokenMessenger);
console.log("USDC address:", getUSDCAddress(info.spokeChainId));
console.log("Optimism_SpokePool proxy deployed to:", result.proxy);
Expand Down
7 changes: 3 additions & 4 deletions script/005DeployArbitrumSpokePool.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { Script } from "forge-std/Script.sol";
import { Test } from "forge-std/Test.sol";
import { console } from "forge-std/console.sol";
import { Arbitrum_SpokePool } from "../contracts/Arbitrum_SpokePool.sol";
import { WETH9Interface } from "../contracts/external/interfaces/WETH9Interface.sol";
import { DeploymentUtils } from "./utils/DeploymentUtils.sol";

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

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

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

// Prepare constructor arguments for Arbitrum_SpokePool
bytes memory constructorArgs = abi.encode(
address(weth), // _weth
weth, // _weth
QUOTE_TIME_BUFFER(), // _quoteTimeBuffer
FILL_DEADLINE_BUFFER(), // _fillDeadlineBuffer
getUSDCAddress(info.spokeChainId), // _usdc
Expand Down Expand Up @@ -66,7 +65,7 @@ contract DeployArbitrumSpokePool is Script, Test, DeploymentUtils {
console.log("Chain ID:", info.spokeChainId);
console.log("Hub Chain ID:", info.hubChainId);
console.log("HubPool address:", info.hubPool);
console.log("WETH address:", address(weth));
console.log("WETH address:", weth);
console.log("L2 Gateway Router:", l2GatewayRouter);
console.log("CCTP Token Messenger:", cctpTokenMessenger);
console.log("USDC address:", getUSDCAddress(info.spokeChainId));
Expand Down
7 changes: 3 additions & 4 deletions script/007DeployEthereumSpokePool.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { Script } from "forge-std/Script.sol";
import { Test } from "forge-std/Test.sol";
import { console } from "forge-std/console.sol";
import { Ethereum_SpokePool } from "../contracts/Ethereum_SpokePool.sol";
import { WETH9Interface } from "../contracts/external/interfaces/WETH9Interface.sol";
import { DeploymentUtils } from "./utils/DeploymentUtils.sol";

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

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

vm.startBroadcast(deployerPrivateKey);

// Prepare constructor arguments for Ethereum_SpokePool
bytes memory constructorArgs = abi.encode(
address(weth), // _weth
weth, // _weth
QUOTE_TIME_BUFFER(), // _quoteTimeBuffer
FILL_DEADLINE_BUFFER() // _fillDeadlineBuffer
);
Expand All @@ -56,7 +55,7 @@ contract DeployEthereumSpokePool is Script, Test, DeploymentUtils {
console.log("Chain ID:", info.spokeChainId);
console.log("Hub Chain ID:", info.hubChainId);
console.log("HubPool address:", info.hubPool);
console.log("WETH address:", address(weth));
console.log("WETH address:", weth);
console.log("Ethereum_SpokePool proxy deployed to:", result.proxy);
console.log("Ethereum_SpokePool implementation deployed to:", result.implementation);

Expand Down
6 changes: 3 additions & 3 deletions script/027DeployScrollSpokePool.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ contract DeployScrollSpokePool is Script, Test, DeploymentUtils {
console.log("HubPool address:", info.hubPool);

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

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

// Prepare constructor arguments for Scroll_SpokePool
bytes memory constructorArgs = abi.encode(
address(weth), // _wrappedNativeTokenAddress
weth, // _wrappedNativeTokenAddress
QUOTE_TIME_BUFFER(), // _depositQuoteTimeBuffer
FILL_DEADLINE_BUFFER() // _fillDeadlineBuffer
);
Expand Down Expand Up @@ -64,7 +64,7 @@ contract DeployScrollSpokePool is Script, Test, DeploymentUtils {
console.log("Chain ID:", info.spokeChainId);
console.log("Hub Chain ID:", info.hubChainId);
console.log("HubPool address:", info.hubPool);
console.log("WETH address:", address(weth));
console.log("WETH address:", weth);
console.log("L2 Gateway Router:", l2GatewayRouter);
console.log("L2 Scroll Messenger:", l2ScrollMessenger);
console.log("Scroll_SpokePool proxy deployed to:", result.proxy);
Expand Down
7 changes: 3 additions & 4 deletions script/036DeployBlastSpokePool.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { Script } from "forge-std/Script.sol";
import { Test } from "forge-std/Test.sol";
import { console } from "forge-std/console.sol";
import { Blast_SpokePool } from "../contracts/Blast_SpokePool.sol";
import { WETH9Interface } from "../contracts/external/interfaces/WETH9Interface.sol";
import { DeploymentUtils } from "./utils/DeploymentUtils.sol";

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

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

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

// Prepare constructor arguments for Blast_SpokePool
bytes memory constructorArgs = abi.encode(
address(weth), // _wrappedNativeTokenAddress
weth, // _wrappedNativeTokenAddress
QUOTE_TIME_BUFFER(), // _depositQuoteTimeBuffer
FILL_DEADLINE_BUFFER(), // _fillDeadlineBuffer
address(0), // _l2Usdc
Expand Down Expand Up @@ -79,7 +78,7 @@ contract DeployBlastSpokePool is Script, Test, DeploymentUtils {
console.log("Chain ID:", info.spokeChainId);
console.log("Hub Chain ID:", info.hubChainId);
console.log("HubPool address:", info.hubPool);
console.log("WETH address:", address(weth));
console.log("WETH address:", weth);
console.log("USDB address:", usdb);
console.log("DAI address:", dai);
console.log("Yield Recipient:", YIELD_RECIPIENT);
Expand Down
7 changes: 3 additions & 4 deletions script/039DeployModeSpokePool.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { Script } from "forge-std/Script.sol";
import { Test } from "forge-std/Test.sol";
import { console } from "forge-std/console.sol";
import { Mode_SpokePool } from "../contracts/Mode_SpokePool.sol";
import { WETH9Interface } from "../contracts/external/interfaces/WETH9Interface.sol";
import { DeploymentUtils } from "./utils/DeploymentUtils.sol";

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

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

vm.startBroadcast(deployerPrivateKey);

// Prepare constructor arguments for Mode_SpokePool
bytes memory constructorArgs = abi.encode(
address(weth), // _wrappedNativeTokenAddress
weth, // _wrappedNativeTokenAddress
QUOTE_TIME_BUFFER(), // _depositQuoteTimeBuffer
FILL_DEADLINE_BUFFER(), // _fillDeadlineBuffer
address(0), // _l2Usdc
Expand Down Expand Up @@ -61,7 +60,7 @@ contract DeployModeSpokePool is Script, Test, DeploymentUtils {
console.log("Chain ID:", info.spokeChainId);
console.log("Hub Chain ID:", info.hubChainId);
console.log("HubPool address:", info.hubPool);
console.log("WETH address:", address(weth));
console.log("WETH address:", weth);
console.log("Mode_SpokePool proxy deployed to:", result.proxy);
console.log("Mode_SpokePool implementation deployed to:", result.implementation);

Expand Down
7 changes: 3 additions & 4 deletions script/047DeployRedstoneSpokePool.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { Script } from "forge-std/Script.sol";
import { Test } from "forge-std/Test.sol";
import { console } from "forge-std/console.sol";
import { Redstone_SpokePool } from "../contracts/Redstone_SpokePool.sol";
import { WETH9Interface } from "../contracts/external/interfaces/WETH9Interface.sol";
import { DeploymentUtils } from "./utils/DeploymentUtils.sol";

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

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

vm.startBroadcast(deployerPrivateKey);

// Prepare constructor arguments for Redstone_SpokePool
bytes memory constructorArgs = abi.encode(
address(weth), // _wrappedNativeTokenAddress
weth, // _wrappedNativeTokenAddress
QUOTE_TIME_BUFFER(), // _depositQuoteTimeBuffer
FILL_DEADLINE_BUFFER(), // _fillDeadlineBuffer
address(0), // _l2Usdc
Expand Down Expand Up @@ -59,7 +58,7 @@ contract DeployRedstoneSpokePool is Script, Test, DeploymentUtils {
console.log("Chain ID:", info.spokeChainId);
console.log("Hub Chain ID:", info.hubChainId);
console.log("HubPool address:", info.hubPool);
console.log("WETH address:", address(weth));
console.log("WETH address:", weth);
console.log("Redstone_SpokePool proxy deployed to:", result.proxy);
console.log("Redstone_SpokePool implementation deployed to:", result.implementation);

Expand Down
7 changes: 3 additions & 4 deletions script/049DeployZoraSpokePool.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { Script } from "forge-std/Script.sol";
import { Test } from "forge-std/Test.sol";
import { console } from "forge-std/console.sol";
import { Zora_SpokePool } from "../contracts/Zora_SpokePool.sol";
import { WETH9Interface } from "../contracts/external/interfaces/WETH9Interface.sol";
import { DeploymentUtils } from "./utils/DeploymentUtils.sol";

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

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

vm.startBroadcast(deployerPrivateKey);

// Prepare constructor arguments for Zora_SpokePool
bytes memory constructorArgs = abi.encode(
address(weth), // _wrappedNativeTokenAddress
weth, // _wrappedNativeTokenAddress
QUOTE_TIME_BUFFER(), // _depositQuoteTimeBuffer
FILL_DEADLINE_BUFFER(), // _fillDeadlineBuffer
address(0), // _l2Usdc
Expand Down Expand Up @@ -59,7 +58,7 @@ contract DeployZoraSpokePool is Script, Test, DeploymentUtils {
console.log("Chain ID:", info.spokeChainId);
console.log("Hub Chain ID:", info.hubChainId);
console.log("HubPool address:", info.hubPool);
console.log("WETH address:", address(weth));
console.log("WETH address:", weth);
console.log("Zora_SpokePool proxy deployed to:", result.proxy);
console.log("Zora_SpokePool implementation deployed to:", result.implementation);

Expand Down
7 changes: 3 additions & 4 deletions script/057DeployInkSpokePool.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { Script } from "forge-std/Script.sol";
import { Test } from "forge-std/Test.sol";
import { console } from "forge-std/console.sol";
import { Ink_SpokePool } from "../contracts/Ink_SpokePool.sol";
import { WETH9Interface } from "../contracts/external/interfaces/WETH9Interface.sol";
import { DeploymentUtils } from "./utils/DeploymentUtils.sol";

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

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

vm.startBroadcast(deployerPrivateKey);

// Prepare constructor arguments for Ink_SpokePool
bytes memory constructorArgs = abi.encode(
address(weth), // _wrappedNativeTokenAddress
weth, // _wrappedNativeTokenAddress
QUOTE_TIME_BUFFER(), // _depositQuoteTimeBuffer
FILL_DEADLINE_BUFFER(), // _fillDeadlineBuffer
address(0), // _l2Usdc
Expand Down Expand Up @@ -59,7 +58,7 @@ contract DeployInkSpokePool is Script, Test, DeploymentUtils {
console.log("Chain ID:", info.spokeChainId);
console.log("Hub Chain ID:", info.hubChainId);
console.log("HubPool address:", info.hubPool);
console.log("WETH address:", address(weth));
console.log("WETH address:", weth);
console.log("Ink_SpokePool proxy deployed to:", result.proxy);
console.log("Ink_SpokePool implementation deployed to:", result.implementation);

Expand Down
7 changes: 3 additions & 4 deletions script/060DeployCherSpokePool.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { Script } from "forge-std/Script.sol";
import { Test } from "forge-std/Test.sol";
import { console } from "forge-std/console.sol";
import { Cher_SpokePool } from "../contracts/Cher_SpokePool.sol";
import { WETH9Interface } from "../contracts/external/interfaces/WETH9Interface.sol";
import { DeploymentUtils } from "./utils/DeploymentUtils.sol";

// How to run:
Expand All @@ -27,7 +26,7 @@ contract DeployCherSpokePool is Script, Test, DeploymentUtils {
console.log("HubPool address:", info.hubPool);

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

// Get USDC address for Cher
address usdcAddress = getUSDCeAddress(info.spokeChainId);
Expand All @@ -36,7 +35,7 @@ contract DeployCherSpokePool is Script, Test, DeploymentUtils {

// Prepare constructor arguments for Cher_SpokePool
bytes memory constructorArgs = abi.encode(
address(weth), // _wrappedNativeTokenAddress
weth, // _wrappedNativeTokenAddress
QUOTE_TIME_BUFFER(), // _depositQuoteTimeBuffer
FILL_DEADLINE_BUFFER(), // _fillDeadlineBuffer
usdcAddress, // _l2Usdc (Cher's bridged USDC that's upgradeable to native)
Expand Down Expand Up @@ -64,7 +63,7 @@ contract DeployCherSpokePool is Script, Test, DeploymentUtils {
console.log("Chain ID:", info.spokeChainId);
console.log("Hub Chain ID:", info.hubChainId);
console.log("HubPool address:", info.hubPool);
console.log("WETH address:", address(weth));
console.log("WETH address:", weth);
console.log("USDC address:", usdcAddress);
console.log("Cher_SpokePool proxy deployed to:", result.proxy);
console.log("Cher_SpokePool implementation deployed to:", result.implementation);
Expand Down
Loading
Loading