Skip to content

Commit

Permalink
feat: redeploy spoke pools to support depositExclusive (#587)
Browse files Browse the repository at this point in the history
Signed-off-by: bennett <[email protected]>
  • Loading branch information
bmzig authored Aug 26, 2024
1 parent 89cbc03 commit d3cac8f
Show file tree
Hide file tree
Showing 22 changed files with 3,567 additions and 2,312 deletions.
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.

154 changes: 154 additions & 0 deletions deployments/arbitrum/solcInputs/c9721847688eb3e826dbe14ada1c9faf.json

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.

156 changes: 156 additions & 0 deletions deployments/optimism/solcInputs/1ae9c8797d35b3fff235f7a5e3e500ee.json

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),
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

0 comments on commit d3cac8f

Please sign in to comment.