Skip to content
Merged
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
1 change: 0 additions & 1 deletion benchmarks/fork-l2/encode-l2-routes.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// Generates Yul-router calldata for the L2 fresh-pool WETH/USDC legs with the yul-router SDK.
import { encodeRoute } from "/home/sendmoodz/Work/ekubo/yul-router/sdk/src/index.ts";
import { writeFileSync } from "node:fs";
const RECIPIENT = "0x7FA9385bE102ac3EAc297483Dd6233D62b3e1496"; // forge test contract address (asserted in the test)
Expand Down
1 change: 0 additions & 1 deletion benchmarks/fork-l2/quote-live-base.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import {
encodeRoute,
encodeQuoteCalldata,
} from "/home/sendmoodz/Work/ekubo/yul-router/sdk/src/index.ts";
// live Base pool from the Ekubo API poolKeys listing: native ETH / USDC, fee 0x20c49ba5e353f7 (0.05%), spacing 1000
const route = encodeRoute({
specifiedToken: "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
calculatedToken: "0x0000000000000000000000000000000000000000",
Expand Down
8 changes: 0 additions & 8 deletions benchmarks/page-numbers.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
#!/usr/bin/env node
// Derives every figure on the Gas efficiency page from the raw snapshot and measurement
// files in this directory, so each percentage can be re-checked without a calculator.
// Run: node page-numbers.mjs
import { readFileSync } from "node:fs";
const j = (p) => JSON.parse(readFileSync(new URL(p, import.meta.url)));
const ek = j("./prod/snapshots/ProdEkuboTest.json");
Expand All @@ -17,7 +14,6 @@ const tx = (snap, name) =>
const pct = (a, b) => ((100 * (b - a)) / b).toFixed(1);
const fmt = (n) => Math.round(n).toLocaleString("en-US");

// --- production routers and minimal lockers, 1 / 2 / 3 pools, fresh ERC20 pair
const legs = {
"Ekubo, Yul router": [1, 2, 3].map((n) =>
tx(
Expand Down Expand Up @@ -73,7 +69,6 @@ console.log(
` like-for-like minimal: Ekubo ${fmt(Em)} vs v4 ${fmt(V4m)} (${pct(Em, V4m)}%) vs v3 ${fmt(V3m)} (${pct(Em, V3m)}%)`,
);

// --- native ETH input
const nat = {
ekubo: tx(ek, "prod ekubo Yul router 1 pool ETH->B"),
v4: tx(v4, "prod v4 minimal locker 1 pool ETH->B"),
Expand All @@ -86,7 +81,6 @@ console.log(
` native ETH in: Ekubo ${fmt(nat.ekubo)} vs v4 minimal ${fmt(nat.v4)} (${pct(nat.ekubo, nat.v4)}%) vs v3 SwapRouter ${fmt(nat.v3)} (${pct(nat.ekubo, nat.v3)}%)`,
);

// --- marginal cost per extra pool (minimal routers, transaction gas incl. calldata growth) and blend
const marg = Object.fromEntries(
Object.entries(legs)
.filter(([, v]) => v.length === 3)
Expand Down Expand Up @@ -147,7 +141,6 @@ for (const p of rows) {
);
}

// --- pools per swap, 30-day sample
const r = month.receipts;
console.log(
`30-day sample: ${month.window.blocksRead} blocks, stride ${month.window.stride}, ${month.window.fromIso} .. ${month.window.toIso}, blocks ${month.window.fromBlock}..${month.window.toBlock}`,
Expand Down Expand Up @@ -177,7 +170,6 @@ if (month.calldata)
` router-only (calldata-decoded) txs ${month.calldata.decodedTxs}, avg ${month.calldata.avgPoolsPerSwapTx}`,
);

// --- chain-wide scenarios: share of block gas freed = share x saving
const shares = [
["4.2%, measured DEX-router burn, lower bound", 0.042],
["19.4%, ultrasound 'defi' bracket", 0.194],
Expand Down
7 changes: 0 additions & 7 deletions scripts/check-a11y.mjs
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
/**
* Runs axe's WCAG 2.1 AA and best-practice rules over every sitemap page in
* both themes. This deliberately mirrors the blog's accessibility gate.
*
* bun run check:a11y
* bun run check:a11y -- https://docs.example.com
*/
import { readFileSync } from "node:fs";
import AxeBuilder from "@axe-core/playwright";
import { chromium } from "playwright";
Expand Down
1 change: 0 additions & 1 deletion scripts/check-api.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ for (const scheme of ["light", "dark"]) {
exact: true,
});
try {
// Use real pointer actions so an overlay cannot silently intercept the UI.
await sourceButton.click({ timeout: 5_000 });
const quoterOption = page.getByRole("option", {
name: "Quoter API",
Expand Down
1 change: 0 additions & 1 deletion scripts/check-legacy-routes.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ const redirects = new Map(

for (const file of legacyFiles) {
const target = fileToTarget(file);
// Pages that moved off this site cannot be checked against the build output.
if (isExternalTarget(target)) continue;
const route = new URL(target, "https://docs.ekubo.org").pathname;
const output =
Expand Down
6 changes: 0 additions & 6 deletions scripts/check-overflow.mjs
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
/**
* Checks every sitemap page at the same six phone widths used by the blog.
*
* bun run check:overflow
* bun run check:overflow -- https://docs.example.com
*/
import { readFileSync } from "node:fs";
import { chromium } from "playwright";

Expand Down
2 changes: 0 additions & 2 deletions scripts/check-theme.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,6 @@ for (const scheme of ["light", "dark"]) {
await context.close();
}

// Simulate a cold connection and verify that fallback glyphs are never
// painted while the preloaded brand face is still downloading.
const coldContext = await browser.newContext({ colorScheme: "light" });
const coldPage = await coldContext.newPage();
await coldPage.route("**/fonts/*.woff2", async (route) => {
Expand Down
23 changes: 0 additions & 23 deletions scripts/legacy-routes.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,6 @@ export const legacyFiles = [
"user-guides/governance.md",
];

// GitBook published a page at its position in the table of contents, not at its
// file path, so a page nested under a parent it did not live beside got a URL
// no file name predicts. `concepts/extensions-vs-v4-hooks.md` sat under
// Extensions and was served at `/concepts/extensions/extensions-vs-v4-hooks`,
// which is the URL that was linked and shared.
export const movedRoutes = {
"concepts/extensions/extensions-vs-v4-hooks":
"concepts/extensions-vs-v4-hooks.md",
Expand Down Expand Up @@ -80,22 +75,11 @@ export const movedRoutes = {
"user-guides/governance/ekubo-inc": "products/governance.md",
};

/**
* URLs the GitBook site served for pages that were retired before the current
* structure existed, mapped to whatever now covers the subject. These have no
* file in `legacyFiles` because the file was deleted years ago; the URL is what
* survives, in old blog posts, Discord messages, and search results.
*
* Each target was chosen by reading the retired page, not by matching names.
*/
export const retiredRoutes = {
// Section prefixes with no index page of their own.
concepts: "/concepts/key-concepts/",
reference: "/reference/contracts/",
"user-guides": "/user-guides/add-liquidity/",

// "Background" and its "Key concepts" successor both explained the same
// primitives the current key concepts page covers.
"about-ekubo/background": "/concepts/key-concepts/",
"about-ekubo/key-concepts": "/concepts/key-concepts/",
"introduction/key-concepts": "/concepts/key-concepts/",
Expand All @@ -104,14 +88,11 @@ export const retiredRoutes = {
"introduction/features": "/about-ekubo/features/",
features: "/about-ekubo/features/",

// The FAQs were folded into the pages that answer their questions.
faq: "/",
"about-ekubo/faq": "/",
"introduction/faq": "/",
"integration-guides/reference/frequently-asked-questions-faq": "/",

// Starknet DeFi Spring was an incentive campaign; incentives are documented
// as rewards now.
"about-ekubo/starknet-defi-spring": "/products/rewards/",
"integration-guides/reference/starknet-defi-spring": "/products/rewards/",
"user-guides/incentives": "/products/rewards/",
Expand All @@ -120,7 +101,6 @@ export const retiredRoutes = {
"user-guides/leaderboard": "/products/rewards/",
"user-guides/swap": "/products/trading/",

// The till pattern and the core interfaces are the architecture page.
"integration-guides/core-interfaces": "/concepts/architecture/",
"integration-guides/core-interfaces/using-the-till-pattern":
"/concepts/architecture/",
Expand All @@ -129,13 +109,11 @@ export const retiredRoutes = {
"/concepts/architecture/",
"integration-guides/reference/till-pattern": "/concepts/architecture/",

// An example extension, and the pages that preceded the current structure.
"integration-guides/extensions/oracle": "/concepts/extensions/",
"integrations/extensions": "/concepts/extensions/",
"integrations/aggregators": "/integration-guides/aggregators/",
"integration-guides/swapping/by-example": "/integration-guides/swapping/",

// Contract and API reference pages, under the names they had at the time.
"integration-guides/contract-addresses": "/reference/contracts/",
"integration-guides/reference/error-codes": "/reference/contracts/",
"integration-guides/reference/evm-contracts": "/reference/contracts/evm-v3/",
Expand All @@ -152,7 +130,6 @@ export function fileToRoute(file) {
return `/${file.slice(0, -".md".length)}/`;
}

// Targets may be absolute URLs when a page moved off the documentation site.
const legacyTargetOverrides = {
"reference/ekubo-api/README.md": "/api/",
"reference/ekubo-api/endpoints.md": "/api/",
Expand Down
11 changes: 0 additions & 11 deletions scripts/lint.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,3 @@
// Runs oxlint over the repository and holds known violations to the per-file,
// per-rule counts in lint-suppressions.json. A file may not gain a violation of
// a recorded rule, and a count that is higher than the file needs fails too, so
// the file only ever shrinks.
//
// bun run lint lint; fails on any unrecorded violation
// bun run lint --fix extra arguments are passed to oxlint
// bun run lint:prune lower recorded counts to what remains
// bun run lint --suppress-rule=CODE record every current violation of CODE,
// e.g. "typescript(no-floating-promises)";
// only when introducing a rule
import { readFileSync, writeFileSync } from "node:fs";

const SUPPRESSIONS_FILE = "lint-suppressions.json";
Expand Down
6 changes: 0 additions & 6 deletions src/styles/fonts.css
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
/*
* Suisse Intl — the Ekubo brand typeface, self-hosted and subset.
* These are the same optimized faces used by blog.ekubo.org and are derived
* from the source fonts in the interface repository.
*/

@font-face {
font-family: "Suisse Intl";
src: url("/fonts/suisse-intl-400.f6cfafea4909.woff2") format("woff2");
Expand Down
Loading