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: Support Blast constants #550

Merged
merged 2 commits into from
Jul 9, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@across-protocol/contracts",
"version": "3.0.4",
"version": "3.0.5",
"author": "UMA Team",
"license": "AGPL-3.0-only",
"repository": {
Expand Down 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.3",
"@across-protocol/constants": "^3.1.5",
"@defi-wonderland/smock": "^2.3.4",
"@eth-optimism/contracts": "^0.5.40",
"@ethersproject/abstract-provider": "5.7.0",
Expand Down
7 changes: 5 additions & 2 deletions tasks/enableL1TokenAcrossEcosystem.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { task } from "hardhat/config";
import assert from "assert";
import { askYesNoQuestion, minimalSpokePoolInterface } from "./utils";
import { TOKEN_SYMBOLS_MAP } from "../utils/constants";
import { TOKEN_SYMBOLS_MAP, CHAIN_IDs } from "../utils/constants";

const enabledChainIds = [1, 10, 137, 42161, 324, 8453, 59144, 34443, 1135]; // Supported mainnet chain IDs.
const enabledChainIds = [1, 10, 137, 42161, 324, 1135, 8453, 34443, 59144, 81457]; // Supported mainnet chain IDs.

const getChainsFromList = (taskArgInput: string): number[] =>
taskArgInput
Expand Down Expand Up @@ -78,7 +78,10 @@ task("enable-l1-token-across-ecosystem", "Enable a provided token across the ent
`Could not find token address on chain ${chainId} in TOKEN_SYMBOLS_MAP for USDC.e or Native USDC`
);
}
} else if (matchedSymbol === "DAI" && chainId === CHAIN_IDs.BLAST) {
return TOKEN_SYMBOLS_MAP.USDB.addresses[chainId]; // DAI maps to USDB on Blast.
}

const l2Address = TOKEN_SYMBOLS_MAP[matchedSymbol].addresses[chainId];
if (l2Address === undefined) {
throw new Error(`Could not find token address on chain ${chainId} in TOKEN_SYMBOLS_MAP`);
Expand Down
Loading