Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: redeploy spoke pools to support depositExclusive #587

Merged
merged 1 commit into from
Aug 26, 2024
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 deploy/016_deploy_zksync_spokepool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
const proxy = getDeployedAddress("SpokePool", spokeChainId, false);
const implementationOnly = proxy !== undefined;
if (implementationOnly) {
console.log(`${name} deployment already detected @ ${proxy}, deploying new implementation.`);
console.log(`${contractName} deployment already detected @ ${proxy}, deploying new implementation.`);
const _deployment = await deployer.deploy(artifact, constructorArgs);
newAddress = _deployment.address;
console.log(`New ${contractName} implementation deployed @ ${newAddress}`);
Expand Down
1 change: 1 addition & 0 deletions deploy/036_deploy_blast_spokepool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { DeployFunction } from "hardhat-deploy/types";
import { HardhatRuntimeEnvironment } from "hardhat/types";
import { deployNewProxy, getSpokePoolDeploymentInfo } from "../utils/utils.hre";
import { FILL_DEADLINE_BUFFER, L1_ADDRESS_MAP, WETH, QUOTE_TIME_BUFFER, ZERO_ADDRESS } from "./consts";
import { TOKEN_SYMBOLS_MAP } from "@across-protocol/constants";

const USDB = TOKEN_SYMBOLS_MAP.USDB.addresses;

Expand Down
156 changes: 122 additions & 34 deletions deployments/arbitrum/Arbitrum_SpokePool.json

Large diffs are not rendered by default.

Large diffs are not rendered by default.

834 changes: 130 additions & 704 deletions deployments/base/Base_SpokePool.json

Large diffs are not rendered by default.

156 changes: 156 additions & 0 deletions deployments/base/solcInputs/e2f045d8ec5f7ad854179cef398688d6.json

Large diffs are not rendered by default.

199 changes: 159 additions & 40 deletions deployments/linea/Linea_SpokePool.json

Large diffs are not rendered by default.

151 changes: 151 additions & 0 deletions deployments/linea/solcInputs/5e8e44a415180b27bf6fe07882188ae3.json

Large diffs are not rendered by default.

187 changes: 153 additions & 34 deletions deployments/mainnet/Ethereum_SpokePool.json

Large diffs are not rendered by default.

553 changes: 553 additions & 0 deletions deployments/mainnet/solcInputs/2cc45423fd0828d019c5d9fb29bc6fa5.json

Large diffs are not rendered by default.

865 changes: 161 additions & 704 deletions deployments/mode/Mode_SpokePool.json

Large diffs are not rendered by default.

156 changes: 156 additions & 0 deletions deployments/mode/solcInputs/4f300126446b64fba7fba0514bc9640b.json

Large diffs are not rendered by default.

834 changes: 130 additions & 704 deletions deployments/optimism/Optimism_SpokePool.json

Large diffs are not rendered by default.

Large diffs are not rendered by default.

166 changes: 127 additions & 39 deletions deployments/polygon/Polygon_SpokePool.json

Large diffs are not rendered by default.

553 changes: 553 additions & 0 deletions deployments/polygon/solcInputs/2cc45423fd0828d019c5d9fb29bc6fa5.json

Large diffs are not rendered by default.

200 changes: 159 additions & 41 deletions deployments/zksync/ZkSync_SpokePool.json

Large diffs are not rendered by default.

528 changes: 528 additions & 0 deletions deployments/zksync/solcInputs/2caedf9a9ee211f229ac9b4c4d7d96ae.json

Large diffs are not rendered by default.

15 changes: 10 additions & 5 deletions hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@ const config: HardhatUserConfig = {
"contracts/Lisk_SpokePool.sol": LARGE_CONTRACT_COMPILER_SETTINGS,
"contracts/Redstone_SpokePool.sol": LARGE_CONTRACT_COMPILER_SETTINGS,
"contracts/Zora_SpokePool.sol": LARGE_CONTRACT_COMPILER_SETTINGS,
"contracts/Mode_SpokePool.sol": LARGE_CONTRACT_COMPILER_SETTINGS,
"contracts/Base_SpokePool.sol": LARGE_CONTRACT_COMPILER_SETTINGS,
"contracts/Optimism_SpokePool.sol": LARGE_CONTRACT_COMPILER_SETTINGS,
},
},
zksolc: {
Expand All @@ -105,6 +108,7 @@ const config: HardhatUserConfig = {
accounts: { mnemonic },
saveDeployments: true,
chainId: CHAIN_IDs.MAINNET,
companionNetworks: { l1: "mainnet" },
},
zksync: {
chainId: CHAIN_IDs.ZK_SYNC,
Expand All @@ -117,7 +121,7 @@ const config: HardhatUserConfig = {
verifyURL: "https://zksync2-mainnet-explorer.zksync.io/contract_verification",
},
optimism: {
url: getNodeUrl("optimism", true, CHAIN_IDs.OPTIMISM),
url: getNodeUrl("optimism-mainnet", true, CHAIN_IDs.OPTIMISM),
accounts: { mnemonic },
saveDeployments: true,
chainId: CHAIN_IDs.OPTIMISM,
Expand All @@ -132,7 +136,7 @@ const config: HardhatUserConfig = {
},
arbitrum: {
chainId: CHAIN_IDs.ARBITRUM,
url: getNodeUrl("arbitrum", true, CHAIN_IDs.ARBITRUM),
url: getNodeUrl("arbitrum-mainnet", true, CHAIN_IDs.ARBITRUM),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these were renamed by infura?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah they must have been. They now follow a naming convention given by [network_name]-[mainnet or sepolia].infura.io.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

huh ok that makes sense, does this just not work currently with the renamed network names?

saveDeployments: true,
accounts: { mnemonic },
companionNetworks: { l1: "mainnet" },
Expand All @@ -149,10 +153,11 @@ const config: HardhatUserConfig = {
accounts: { mnemonic },
saveDeployments: true,
chainId: CHAIN_IDs.SEPOLIA,
companionNetworks: { l1: "sepolia" },
},
polygon: {
chainId: CHAIN_IDs.POLYGON,
url: getNodeUrl("polygon-matic", true, CHAIN_IDs.POLYGON),
url: getNodeUrl("polygon-mainnet", true, CHAIN_IDs.POLYGON),
saveDeployments: true,
accounts: { mnemonic },
companionNetworks: { l1: "mainnet" },
Expand Down Expand Up @@ -404,8 +409,8 @@ const config: HardhatUserConfig = {
network: "mode",
chainId: CHAIN_IDs.MODE,
urls: {
apiURL: "https://api.routescan.io/v2/network/mainnet/evm/34443/etherscan",
browserURL: "https://modescan.io",
apiURL: "https://explorer.mode.network/api",
browserURL: "https://explorer.mode.network/",
},
},
{
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"prepublish": "yarn build && hardhat export --export-all ./cache/massExport.json && ts-node ./scripts/processHardhatExport.ts && prettier --write ./deployments/deployments.json && yarn generate-contract-types"
},
"dependencies": {
"@across-protocol/constants": "^3.1.13",
"@across-protocol/constants": "^3.1.15",
"@defi-wonderland/smock": "^2.3.4",
"@eth-optimism/contracts": "^0.5.40",
"@ethersproject/abstract-provider": "5.7.0",
Expand Down
3 changes: 2 additions & 1 deletion utils/utils.hre.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,8 @@ export async function deployNewProxy(
// is a proxy, hardhat will first verify the implementation and then the proxy and also link the proxy
// to the implementation's ABI on etherscan.
// https://docs.openzeppelin.com/upgrades-plugins/1.x/api-hardhat-upgrades#verify
await run("verify:verify", { address: instance, constructorArguments: constructorArgs });
const contract = `contracts/${name}.sol:${name}`;
await run("verify:verify", { address: instance, constructorArguments: constructorArgs, contract });
}

export { hre };
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
# yarn lockfile v1


"@across-protocol/constants@^3.1.13":
version "3.1.13"
resolved "https://registry.yarnpkg.com/@across-protocol/constants/-/constants-3.1.13.tgz#b4caf494e9d9fe50290cca91b7883ea408fdb90a"
integrity sha512-EsTJgQL5p+XXs40aBxOSbMOpQr/f4ty+Iyget8Oh6MT/cncCa2+W8a78fbqYqTtSpH6Sm7E8nvT8gPuSS6ef1w==
"@across-protocol/constants@^3.1.15":
version "3.1.15"
resolved "https://registry.yarnpkg.com/@across-protocol/constants/-/constants-3.1.15.tgz#b9fecef46209ad15f3c56c965977e3522b295b07"
integrity sha512-3BECNOWQReC/IIuI0a7GenYfdiZv9EyzWFK8n7y3SddcMZ2zW5TQHobfzjuccxOJ9nh+0ogrRw1gXFfESs00fg==

"@across-protocol/contracts@^0.1.4":
version "0.1.4"
Expand Down
Loading