Skip to content
Merged
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
6 changes: 5 additions & 1 deletion tasks/enableL1TokenAcrossEcosystem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ const getChainsFromList = (taskArgInput: string): number[] =>

task("enable-l1-token-across-ecosystem", "Enable a provided token across the entire ecosystem of supported chains")
.addFlag("execute", "Provide this flag if you would like to actually execute the transaction from the EOA")
.addFlag("disableRoutes", "Set to disable deposit routes for the specified chains")
.addParam("token", "Symbol of token to enable")
.addOptionalParam("chains", "Comma-delimited list of chains to enable the token on. Defaults to all supported chains")
.addOptionalParam(
Expand All @@ -35,6 +36,7 @@ task("enable-l1-token-across-ecosystem", "Enable a provided token across the ent
.setAction(async function (taskArguments, hre_) {
const hre = hre_ as any;
const { chains, token: symbol } = taskArguments;
const enableRoute = !taskArguments.disableRoutes;

const hubChainId = parseInt(await hre.getChainId());
if (hubChainId === 31337) {
Expand Down Expand Up @@ -141,7 +143,9 @@ task("enable-l1-token-across-ecosystem", "Enable a provided token across the ent
) {
const n = (++i).toString().padStart(2, " ");
console.log(`\t${n} Added route for ${inputToken} from ${formattedFromId} -> ${formatChainId(toId)}.`);
callData.push(hubPool.interface.encodeFunctionData("setDepositRoute", [fromId, toId, inputToken, true]));
callData.push(
hubPool.interface.encodeFunctionData("setDepositRoute", [fromId, toId, inputToken, enableRoute])
);
} else {
skipped[fromId].push(toId);
}
Expand Down
Loading