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

fix: added arbitrum sepolia to get retryable tickets #253

Merged
merged 2 commits into from
Nov 24, 2023
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
16 changes: 13 additions & 3 deletions src/mappings/helpers/bridge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {
ethereum,
crypto,
ByteArray,
log,
} from "@graphprotocol/graph-ts";
import { DepositInitiated } from "../../types/L1GraphTokenGateway/L1GraphTokenGateway";
import { bigIntToBytes, padZeros } from "./byte";
Expand Down Expand Up @@ -50,9 +51,18 @@ export function getRetryableTicketId(
let fields: ByteArray[] = [];

// Get the L2 chain id based on the L1 network
// 0x066EED = 421613 (Arbitrum Goerli)
// 0xA4B1 = 42161 (Arbitrum One)
let l2ChainIdHex = addresses.network === "mainnet" ? "0xA4B1" : "0x066EED";
let l2ChainIdHex = "";
if (addresses.network === "mainnet") {
l2ChainIdHex = "0xA4B1"; // 0xA4B1 = 42161 (Arbitrum One)
} else if (addresses.network === "goerli") {
l2ChainIdHex = "0x066EED"; // 0x066EED = 421613 (Arbitrum Goerli)
} else if (addresses.network === "sepolia") {
l2ChainIdHex = "0x066EEE"; // 0x066EEE = 421614 (Arbitrum Sepolia)
} else {
log.warning('Unsupported network: {}', [addresses.network]);
return null;
}

let l2ChainId = Bytes.fromHexString(l2ChainIdHex);
fields.push(l2ChainId);

Expand Down
Loading