Skip to content
Open
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
6 changes: 5 additions & 1 deletion configs/envvars/src/genEnvVars.ts
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,8 @@ const EXPLORER_API_DEFAULTS: Record<string, string | undefined> = {
// Story
1514: "https://www.storyscan.xyz/api/v2/",
1315: "https://aeneid.storyscan.xyz/api/v2",
// Citrea
5115: "https://explorer.testnet.citrea.xyz",
};

/** API Keys are per-domain */
Expand Down Expand Up @@ -227,6 +229,8 @@ const EXPLORER_API_KEY_DEFAULTS: Record<string, string | undefined> = {
// TODO: support blockscout
// 1514: " ",
// 1315: " ",
// Citrea
// 5115
};

/**
Expand All @@ -248,7 +252,7 @@ export function getEnvVarsForNetworkId(networkId: string): EnvVarDef[] {
//const chainIds = allChains.map((c) => c.chainId);
const chainIds = [
1, 5, 1337, 11155111, 17000, 11155420, 59144, 59140, 137, 80001, 80002, 42161, 421614, 42170, 10, 43114, 43113, 56,
97, 168587773, 8453, 84532, 3441006, 204, 5611, 33139, 33111, 1329, 713715, 1868, 80094, 1514, 1315, 9001,
97, 168587773, 8453, 84532, 3441006, 204, 5611, 33139, 33111, 1329, 713715, 1868, 80094, 1514, 1315, 9001, 5115,
];
//TODO: For all networkIds, right now this breaks because file is too big. Is there a better way?
const NETWORK_ENVVARS: EnvVarDef[] = [];
Expand Down
31 changes: 31 additions & 0 deletions packages/chains/src/chains/citreaTestnet.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import { defineChain } from "viem/utils";
import { defineNetwork } from "../defineChain.js";

const citreaTestnetViem = /*#__PURE__*/ defineChain({
id: 5115,
name: "Citrea Testnet",
nativeCurrency: { name: "cBTC", symbol: "cBTC", decimals: 18 },
rpcUrls: {
default: {
http: ["https://rpc.testnet.citrea.xyz"],
},
},
blockExplorers: {
default: {
name: "Citrea Explorer",
url: "https://explorer.testnet.citrea.xyz",
apiUrl: "https://explorer.testnet.citrea.xyz/api",
},
},
testnet: true,
});

export const citreaTestnet = /*#__PURE__*/ defineNetwork({
...citreaTestnetViem,
rpcUrls: {
...citreaTestnetViem.rpcUrls,
public: citreaTestnetViem.rpcUrls.default,
},
slug: "citreaTestnet",
enabled: true,
});
1 change: 1 addition & 0 deletions packages/chains/src/chains/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export * from "./blast.js";
export * from "./blastSepolia.js";
export * from "./bsc.js";
export * from "./bscTestnet.js";
export * from "./citreaTestnet.js";
export * from "./coreDao.js";
export * from "./curtis.js";
export * from "./evmos.js";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import {
sei,
celo,
} from "viem/chains";
import { citreaTestnet } from "@owlprotocol/chains";
import { getExecutionResult } from "./simulateHandleOp.js";
import { calcPreVerificationGas } from "./calcPreVerificationGas.js";
import { getSupportedEntryPoints } from "./getSupportedEntryPoints.js";
Expand Down Expand Up @@ -172,7 +173,8 @@ export async function estimateUserOperationGas(
chainId === celo.id ||
chainId === sei.id ||
chainId === seiDevnet.id ||
chainId === seiTestnet.id
chainId === seiTestnet.id ||
chainId === citreaTestnet.chainId
) {
verificationGasLimit = 1_000_000n;
callGasLimit = 1_000_000n;
Expand Down
Loading