diff --git a/components/BlueprintIntroCards.tsx b/components/CardGrid.tsx similarity index 69% rename from components/BlueprintIntroCards.tsx rename to components/CardGrid.tsx index f861301a..246f286c 100644 --- a/components/BlueprintIntroCards.tsx +++ b/components/CardGrid.tsx @@ -2,28 +2,17 @@ import React from "react"; import Link from "next/link"; import { FaChevronRight } from "react-icons/fa"; -const BlueprintIntroCards = () => { - const cards = [ - { - title: "Tangle's Blueprint Gadget SDK", - description: - "Learn about the Gadget SDK and how to get started building your own gadgets.", - link: "/developers/gadget-sdk", - }, - { - title: "Hello World Blueprint", - description: - "Get started with a simple Hello World example using Tangle Blueprints.", - link: "/developers/tangle-avs", - }, - { - title: "Build an Eigenlayer AVS", - description: - "Build an Eigenlayer AVS with the Tangle Blueprint SDK and hook into a variety of EVM compatible utilities for task automation, slashing, and more.", - link: "/developers/eigenlayer-avs", - }, - ]; +interface Card { + title: string; + description: string; + link: string; +} +interface CardGridProps { + cards: Card[]; +} + +const CardGrid: React.FC = ({ cards }) => { return (
{cards.map((card, index) => ( @@ -65,4 +54,4 @@ const BlueprintIntroCards = () => { ); }; -export default BlueprintIntroCards; +export default CardGrid; diff --git a/components/GithubFileReaderDisplay.tsx b/components/GithubFileReaderDisplay.tsx index bf416f63..82d39b45 100644 --- a/components/GithubFileReaderDisplay.tsx +++ b/components/GithubFileReaderDisplay.tsx @@ -1,20 +1,18 @@ import React, { useEffect, useState } from "react"; import { FaGithub, FaLink, FaSpinner } from "react-icons/fa"; -import { Prism as SyntaxHighlighter } from "react-syntax-highlighter"; -import { - nightOwl, - oneLight, -} from "react-syntax-highlighter/dist/cjs/styles/prism"; import { useTheme } from "next-themes"; - -let lightTheme = oneLight; -let darkTheme = nightOwl; +import { + dedentCode, + getLanguage, + getShikiHighlighter, +} from "@/components/shiki"; interface GithubFileReaderDisplayProps { url: string; fromLine?: number; toLine?: number; title?: string; + dedent?: boolean; } const GithubFileReaderDisplay: React.FC = ({ @@ -22,83 +20,25 @@ const GithubFileReaderDisplay: React.FC = ({ fromLine = 1, toLine, title, + dedent = true, }) => { const [content, setContent] = useState(""); const [loading, setLoading] = useState(true); const [error, setError] = useState(null); - const { theme } = useTheme(); - - const getLanguage = (url: string) => { - const extension = url.split(".").pop()?.toLowerCase(); - switch (extension) { - case "rs": - return "rust"; - case "ts": - case "tsx": - return "typescript"; - case "js": - case "jsx": - return "javascript"; - case "sol": - return "solidity"; - case "md": - case "mdx": - return "markdown"; - case "toml": - return "toml"; - case "yaml": - case "yml": - return "yaml"; - case "json": - return "json"; - case "sh": - return "bash"; - case "py": - return "python"; - case "go": - return "go"; - case "cpp": - case "c++": - case "cc": - return "cpp"; - case "c": - return "c"; - case "java": - return "java"; - case "php": - return "php"; - case "rb": - return "ruby"; - case "swift": - return "swift"; - case "kt": - return "kotlin"; - case "cs": - return "csharp"; - case "html": - return "html"; - case "css": - return "css"; - case "scss": - return "scss"; - case "sql": - return "sql"; - case "graphql": - case "gql": - return "graphql"; - default: - return "text"; - } - }; + const { theme: currentTheme } = useTheme(); useEffect(() => { - const fetchGithubContent = async () => { + const fetchAndHighlightContent = async () => { try { const rawUrl = url .replace("github.com", "raw.githubusercontent.com") .replace("/blob/", "/"); - const response = await fetch(rawUrl); + const [response, highlighter] = await Promise.all([ + fetch(rawUrl), + getShikiHighlighter(), + ]); + if (!response.ok) { throw new Error("Failed to fetch file content"); } @@ -106,16 +46,35 @@ const GithubFileReaderDisplay: React.FC = ({ const text = await response.text(); const lines = text.split("\n"); const selectedLines = lines.slice(fromLine - 1, toLine || lines.length); - setContent(selectedLines.join("\n")); + let codeContent = selectedLines.join("\n"); + + // Apply dedentation if enabled + if (dedent) { + codeContent = dedentCode(codeContent); + } + + // Set the theme based on current theme + const theme = currentTheme === "dark" ? "github-dark" : "github-light"; + + // Highlight the code with the current theme and line numbers + const highlightedCode = highlighter.codeToHtml(codeContent, { + lang: getLanguage(url), + theme: theme, + }); + + // Wrap the highlighted code with a div that sets the starting line number + const wrappedCode = `
${highlightedCode}
`; + setContent(wrappedCode); setLoading(false); } catch (err) { + console.error("Highlighting error:", err); setError(err instanceof Error ? err.message : "An error occurred"); setLoading(false); } }; - fetchGithubContent(); - }, [url, fromLine, toLine]); + fetchAndHighlightContent(); + }, [url, fromLine, toLine, currentTheme, dedent]); if (loading) { return ( @@ -158,23 +117,12 @@ const GithubFileReaderDisplay: React.FC = ({
- - {content} - +
+
+
); }; diff --git a/components/LandingPage.tsx b/components/LandingPage.tsx index c8a3055a..c265749b 100644 --- a/components/LandingPage.tsx +++ b/components/LandingPage.tsx @@ -46,7 +46,7 @@ const resourcesCards = [ icon: , title: "TNT, Wallets and More", description: "Your source for Wallets, apps, staking and more.", - link: "../resources", + link: "/resources", }, { icon: , diff --git a/components/NonuniformTableOfContentCards.tsx b/components/NonuniformTableOfContentCards.tsx new file mode 100644 index 00000000..5300c91d --- /dev/null +++ b/components/NonuniformTableOfContentCards.tsx @@ -0,0 +1,96 @@ +import React from "react"; +import Link from "next/link"; +import { FaChevronRight } from "react-icons/fa"; + +interface TOCItem { + title: string; + href: string; + subItems?: { + title: string; + description?: string; + href?: string; + }[]; +} + +interface NonuniformTableOfContentCardsProps { + items: TOCItem[]; +} + +const NonuniformTableOfContentCards: React.FC< + NonuniformTableOfContentCardsProps +> = ({ items }) => { + return ( +
+ {items.map((item, index) => ( +
+ +
+

+ {item.title} +

+ +
+ + + {item.subItems && ( +
    + {item.subItems.map((subItem, subIndex) => ( +
  • + +
    + +
    + {subItem.title} + {subItem.description && ( + + {subItem.description} + + )} +
    +
    + +
  • + ))} +
+ )} + +
+
+ ))} +
+ ); +}; + +export default NonuniformTableOfContentCards; diff --git a/components/StakingIntroCards.tsx b/components/StakingIntroCards.tsx deleted file mode 100644 index 9e520e71..00000000 --- a/components/StakingIntroCards.tsx +++ /dev/null @@ -1,50 +0,0 @@ -import React from "react"; -import { GrNodes } from "react-icons/gr"; -import { BetweenVerticalEnd } from "lucide-react"; -import Link from "next/link"; - -const StakingIntroCards = () => { - const cards = [ - { - icon: , - title: "Validator Staking", - description: - "Learn about Tangle's Nominated Proof of Stake (NPoS) system for validator selection and rewards.", - link: "../restake/staking-intro", - }, - { - icon: , - title: "Restaking", - description: - "Discover Tangle's permissionless and asset-configurable restaking system for Blueprints and shared security.", - link: "../restake/restake-introduction", - }, - { - icon: , - title: "Liquid Staking", - description: - "Explore Tangle's liquid staking protocols for validator-specific staking operations and liquid staked tokens (LSTs).", - link: "../restake/lst-concepts", - }, - ]; - - return ( -
- {cards.map((card, index) => ( - -
-
{card.icon}
-

- {card.title} -

-

- {card.description} -

-
- - ))} -
- ); -}; - -export default StakingIntroCards; diff --git a/components/shiki.tsx b/components/shiki.tsx new file mode 100644 index 00000000..1368b7d6 --- /dev/null +++ b/components/shiki.tsx @@ -0,0 +1,56 @@ +import { createHighlighter, type Highlighter, bundledLanguages } from "shiki"; + +// Create a singleton promise for the highlighter +let highlighterPromise: Promise | null = null; + +// Singleton function to get or create the highlighter +export const getShikiHighlighter = () => { + if (!highlighterPromise) { + highlighterPromise = createHighlighter({ + themes: ["github-dark", "github-light"], + langs: Object.keys(bundledLanguages), + }); + } + return highlighterPromise; +}; + +// Language detection utility +export const getLanguage = (url: string) => { + const extension = url.split(".").pop()?.toLowerCase(); + switch (extension) { + case "rs": + return "rust"; + case "ts": + case "tsx": + return "typescript"; + case "js": + case "jsx": + return "javascript"; + default: + return "plaintext"; + } +}; + +export const dedentCode = (code: string): string => { + const lines = code.split("\n"); + + // Filter out empty lines for calculating minimum indentation + const nonEmptyLines = lines.filter((line) => line.trim().length > 0); + + if (nonEmptyLines.length === 0) return code; + + // Find the minimum indentation level across all non-empty lines + const minIndent = Math.min( + ...nonEmptyLines.map((line) => { + const match = line.match(/^[ \t]*/); + return match ? match[0].length : 0; + }), + ); + + // Remove the common indentation from all lines + if (minIndent > 0) { + return lines.map((line) => line.slice(minIndent)).join("\n"); + } + + return code; +}; diff --git a/globals.css b/globals.css index aafd28fd..cfc49ae9 100644 --- a/globals.css +++ b/globals.css @@ -133,6 +133,35 @@ } } +/* Add these styles for line numbers */ +.shiki { + background-color: transparent !important; + padding: 1rem 0; +} + +.shiki code { + counter-reset: step; + counter-increment: step calc(var(--start-line, 1) - 1); +} + +.shiki .line::before { + content: counter(step); + counter-increment: step; + width: 3rem; + margin-right: 1.5rem; + display: inline-block; + text-align: right; + color: #666; + border-right: 1px solid #404040; + padding-right: 1rem; +} + +/* Dark mode adjustments */ +.dark .shiki .line::before { + color: #888; + border-right-color: #404040; +} + @supports ( (-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px)) ) { diff --git a/next.config.mjs b/next.config.mjs index 4d608930..b487cd01 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -10,6 +10,7 @@ const nextConfig = { legacyBrowsers: false, }, trailingSlash: false, + staticPageGenerationTimeout: 120, async redirects() { return [ { diff --git a/package.json b/package.json index 5e32f6aa..68833414 100644 --- a/package.json +++ b/package.json @@ -62,7 +62,7 @@ "remark-math": "4.0.0", "shadcn-ui": "^0.8.0", "sharp": "^0.31.3", - "shiki": "^1.2.1", + "shiki": "^1.22.2", "styled-components": "^6.1.8", "swr": "1.3.0", "tailwind-merge": "^2.3.0", diff --git a/pages/_app.tsx b/pages/_app.tsx index f8f475fa..114c386d 100644 --- a/pages/_app.tsx +++ b/pages/_app.tsx @@ -7,6 +7,7 @@ import type { ReactElement, ReactNode } from "react"; import "../globals.css"; import { GoogleAnalytics } from "@next/third-parties/google"; import { AskCookbook } from "../components/AskCookbook"; +import { getShikiHighlighter } from "../components/shiki"; export type NextPageWithLayout

= NextPage & { getLayout?: (page: ReactElement) => ReactNode; @@ -24,6 +25,9 @@ if (typeof window !== "undefined" && !("requestIdleCallback" in window)) { window.cancelIdleCallback = (id) => clearTimeout(id); } +// Initialize the highlighter when the app starts +getShikiHighlighter(); + export default function Nextra({ Component, pageProps }: NextraAppProps) { // Define a layout if it doesn't exist in the page component const getLayout = Component.getLayout || ((page) => page); diff --git a/pages/developers/_meta.json b/pages/developers/_meta.json index a8878044..30440faf 100644 --- a/pages/developers/_meta.json +++ b/pages/developers/_meta.json @@ -15,6 +15,8 @@ "blueprint-contexts": "Blueprint SDK Contexts", "tangle-avs": "Build a Tangle Blueprint AVS", "eigenlayer-avs": "Build an Eigenlayer AVS", + "testing-with-tangle": "Testing with Tangle", + "troubleshooting": "Troubleshooting", "-- solution-developers": { "type": "separator", "title": "Solution Developers" diff --git a/pages/developers/blueprint-contexts/_meta.json b/pages/developers/blueprint-contexts/_meta.json index 364c0283..448cc572 100644 --- a/pages/developers/blueprint-contexts/_meta.json +++ b/pages/developers/blueprint-contexts/_meta.json @@ -3,6 +3,6 @@ "keystore-context": "Keystore Context", "evm-provider-context": "EVM Provider Context", "tangle-client-context": "Tangle Client Context", - "services-context": "Tangle Services Context", + "service-context": "Tangle Services Context", "eigenlayer-context": "Eigenlayer Context" } diff --git a/pages/developers/blueprint-contexts/eigenlayer-context.mdx b/pages/developers/blueprint-contexts/eigenlayer-context.mdx index 671ffb10..8f54d5a9 100644 --- a/pages/developers/blueprint-contexts/eigenlayer-context.mdx +++ b/pages/developers/blueprint-contexts/eigenlayer-context.mdx @@ -39,7 +39,7 @@ You can then use this context in your jobs to access Eigenlayer functionality: diff --git a/pages/developers/blueprint-event-listeners/custom-listeners.mdx b/pages/developers/blueprint-event-listeners/custom-listeners.mdx index 55db3899..010372ee 100644 --- a/pages/developers/blueprint-event-listeners/custom-listeners.mdx +++ b/pages/developers/blueprint-event-listeners/custom-listeners.mdx @@ -66,13 +66,11 @@ Finally, register the event listener inside the `job` macro using `event_listene id = 0, params(x), result(_), - event_listener(Ticker::<6000>), // <-- Register the event listener here - verifier(evm = "IncredibleSquaringBlueprint") + event_listener(listener = Ticker::<6000>), // <-- Register the event listener here )] pub fn hello_event_listener( x: u64, context: MyContext, // <-- The context type must be the first additional parameter - env: GadgetConfiguration, ) -> Result { Ok(x.saturating_pow(2u32)) } diff --git a/pages/developers/blueprint-event-listeners/evm-contracts.mdx b/pages/developers/blueprint-event-listeners/evm-contracts.mdx index 56c8af98..db1b26dc 100644 --- a/pages/developers/blueprint-event-listeners/evm-contracts.mdx +++ b/pages/developers/blueprint-event-listeners/evm-contracts.mdx @@ -1,6 +1,8 @@ +import GithubFileReaderDisplay from '@/components/GithubFileReaderDisplay' + --- -title: EVM Contract Listeners ---- + +## title: EVM Contract Listeners # EVM Contract Listeners @@ -20,22 +22,20 @@ The `EvmContractEventListener` is a type that listens to the Ethereum Virtual Ma Like the `TangleEventListener`, the `EvmContractEventListener` is already implemented and ready to use. Simply register it in the `job` macro, and your application will automatically work with the EVM. -```rust -/// Returns x^2 saturating to [`u64::MAX`] if overflow occurs. -#[job( - id = 0, - params(x), - result(_), - event_listener(EvmContractEventListener( - instance = IncredibleSquaringTaskManager, - event = IncredibleSquaringTaskManager::NewTaskCreated, - event_converter = convert_event_to_inputs, - callback = IncredibleSquaringTaskManager::IncredibleSquaringTaskManagerCalls::respondToTask - )), -)] -pub fn xsquare( - x: u64, -) -> Result { - Ok(x.saturating_pow(2u32)) -} -``` + + +## Pre-processor + +EVM Contract events benefit from a simple pre-processor that extracts the parameters you need from the raw event data. An example of this is shown below: + + diff --git a/pages/developers/blueprint-event-listeners/introduction.mdx b/pages/developers/blueprint-event-listeners/introduction.mdx index d47c945f..281d9d32 100644 --- a/pages/developers/blueprint-event-listeners/introduction.mdx +++ b/pages/developers/blueprint-event-listeners/introduction.mdx @@ -1,28 +1,102 @@ ---- -title: Introduction to Event listeners ---- +import GithubFileReaderDisplay from '@/components/GithubFileReaderDisplay'; -# Event Listeners +## Event Listeners When building a blueprint, your application may require to listen to events. Events can be of any type, and handling those events is entirely up to your discretion. -In general, when defining your job, you must register any event listeners and provide a context as such: +In general, when defining your job, you must register an event listeners and provide a context as such: + + + +In order to understand how to build an event listener, begin with a custom implementation [here](./custom-listeners.mdx) + +## Event Listener Lifecycle + +Event listeners in the SDK are designed to be flexible and allow developers to customize the behavior of their applications. Event listeners must implement the `EventListener` trait, which defines the following methods: + + + +### Initialization + +When a blueprint instance runs, the event listeners are constructed and executed as part of the job handler. Executing the listeners is handled by the `BlueprintRunner` + + + +### Processing (pre/job/post) + +The SDK supports pre-processors and post-processors to handle event data before and after job execution. This allows developers to customize the behavior of their applications based on the event data and reuse code across projects, reducing development time and complexity. + +1. **Pre-Processing Stage** + + - Event listener's `next_event()` retrieves the next event + - Optional pre-processor transforms raw event data: + + ```rust + #[job( + id = 0, + event_listener( + listener = TangleEventListener, + pre_processor = transform_event, // Pre-process raw event + ), + )] + ``` + +2. **Job Execution Stage** + + - Job function executes with the processed event data + - Core business logic processes the event: + + ```rust + #[job( + id = 0, + params(x), + event_listener( + listener = TangleEventListener, + ), + )] + pub fn execute( + x: u64, + ctx: Context, + ) -> Result { + Ok(x.saturating_pow(2u32)) + } + ``` + +3. **Post-Processing Stage** + - Optional post-processor handles job output + - Performs cleanup or additional processing: + ```rust + #[job( + id = 0, + event_listener( + listener = TangleEventListener, + post_processor = handle_result, // Process job output + ), + )] + ``` + +When no processors are specified, events flow directly from listener to job and output is ignored: ```rust #[job( id = 0, - params(x), - result(_), - event_listener(TangleEventListener, MyEventListener1, MyEventListener2, ...), // <-- Register all event listeners here - verifier(evm = "MyVerifier") + event_listener( + listener = TangleEventListener, + ), )] -pub fn hello_event_listener( - x: u64, - context: MyContext, // <-- The context type must be the first additional parameter - env: GadgetConfiguration, -) -> Result { - Ok(x.saturating_pow(2u32)) -} ``` - -In order to understand how to build an event listener, begin with a custom implementation [here](./custom-listeners.mdx) diff --git a/pages/developers/blueprint-event-listeners/periodic-listeners.mdx b/pages/developers/blueprint-event-listeners/periodic-listeners.mdx index 3552385c..5102b850 100644 --- a/pages/developers/blueprint-event-listeners/periodic-listeners.mdx +++ b/pages/developers/blueprint-event-listeners/periodic-listeners.mdx @@ -1,7 +1,9 @@ ---- -title: Periodic Listeners +import GithubFileReaderDisplay from "../../../components/GithubFileReaderDisplay"; + --- +## title: Periodic Listeners + # Periodic Listeners Periodic listeners are event listeners that trigger at specific time intervals. They are useful for tasks that need to be executed regularly, such as quality of service metrics/uptime checkers, data updates, and subscription style services. @@ -21,7 +23,7 @@ Periodic Listeners are particularly useful for tasks such as: - Periodic health checks - Automated reporting at set intervals -### PeriodicEventListener +# PeriodicEventListener Some programs may only be interested in checking for events at regular intervals. In this case, the `PeriodicEventListener` can be used to simplify the process. @@ -29,82 +31,43 @@ A `PeriodicEventListener` is a wrapper that takes 4 type parameters: - `MSEC`: The number of milliseconds between each event check. - `T`: The inner event listener type -- `Event`: The event type - `Ctx`: The context type +- `Event`: The event type + + + +We can make a `PeriodicEventListener` that ticks every 6000ms to check the status of a web server using [reqwest](https://crates.io/crates/reqwest). + +Start by defining our inner event listener (`T` = `WebPoller`, in this case), and implement the `EventListener` trait. + + + +## Using it in a Blueprint + +Implement the pre-processor and post-processors for the event listener: + + + +Integrate the event listener inside the `job`: -```rust -pub struct PeriodicEventListener -``` - -We can make a `PeriodicEventListener` that ticks every 5000ms to check the status of a web server using [reqwest](https://crates.io/crates/reqwest). - -Start by defining our inner event listener (`T` = `WebPoller`, in this case) - -```rust -use gadget_sdk::event_listener::periodic::PeriodicEventListener; - -/// Define an event listener that polls a webserver -pub struct WebPoller { - pub client: reqwest::Client, -} -``` - -Then, implement `EventListener` for `WebPoller`: - -```rust -// We don't need a context here, so use () -pub type MyContext = (); - -impl EventListener for WebPoller { - /// Build the event listener. Note that this time, we don't necessarily need the context - async fn new(_context: &MyContext) -> Result - where - Self: Sized, - { - let client = reqwest::Client::new(); - Ok(Self { client }) - } - - /// Implement the logic that polls the web server - async fn next_event(&mut self) -> Option { - // Send a GET request to the JSONPlaceholder API - let response = self.client - .get("https://jsonplaceholder.typicode.com/todos/1") - .send() - .await?; - - // Check if the request was successful - if response.status().is_success() { - // Parse the JSON response - let resp: serde_json::Value = response.json().await?; - Some(resp) - } else { - None - } - } - - /// Implement any handler logic when an event is received - async fn handle_event(&mut self, _event: serde_json::Value) -> Result<(), Error> { - Ok(()) - } -} -``` - -Finally, register the event listener inside the `job` macro using `event_listener`: - -```rust -#[job( - id = 0, - params(x), - result(_), - event_listener(PeriodicEventListener::<6000, WebPoller, serde_json::Value, MyContext>), // <-- Register the event listener here - verifier(evm = "IncredibleSquaringBlueprint") -)] -pub fn hello_event_listener( - x: u64, - context: MyContext, - env: GadgetConfiguration, -) -> Result { - Ok(x.saturating_pow(2u32)) -} -``` + diff --git a/pages/developers/blueprint-event-listeners/tangle-job-calls.mdx b/pages/developers/blueprint-event-listeners/tangle-job-calls.mdx index e5582e4b..1a558f98 100644 --- a/pages/developers/blueprint-event-listeners/tangle-job-calls.mdx +++ b/pages/developers/blueprint-event-listeners/tangle-job-calls.mdx @@ -1,7 +1,9 @@ ---- -title: Tangle Job Call Listeners +import GithubFileReaderDisplay from '@/components/GithubFileReaderDisplay'; + --- +## title: Tangle Job Call Listeners + # Tangle Job Call Listeners Tangle Job Call Listeners are a powerful feature in the Gadget SDK that allow your blueprint to react to job calls on the Tangle network. These listeners leverage Rust's async capabilities and the `tokio` runtime to efficiently handle incoming job requests. @@ -30,18 +32,43 @@ The `TangleEventListener` is a type that listens to the Tangle network for event The `TangleEventListener` is already implemented and ready to use. Simply register it in the `job` macro, and your application will automatically work with the Tangle network. -```rust -/// Returns x^2 saturating to [`u64::MAX`] if overflow occurs. -#[job( - id = 0, - params(x), - result(_), - event_listener(TangleEventListener), - verifier(evm = "IncredibleSquaringBlueprint") -)] -pub fn xsquare( - x: u64, -) -> Result { - Ok(x.saturating_pow(2u32)) -} -``` + + +## Service pre/post processors + +The SDK also provides a ready-to-use pre-processor and post-processor for the JobCalled event on Tangle. The pre-processor destructures the arguments of blueprint jobs so that jobs can be executed with the arguments they are defined with. The post-processors + +### Pre-processor + +The pre-processor for Tangle job calls handles the following tasks: + +1. Extracts and validates the job parameters from the raw event data +2. Deserializes the parameters into the expected types +3. Prepares the data for processing by the job handler + + + +### Post-processor + +The post-processor for Tangle job calls handles the following tasks: + +1. Takes the output from the job execution +2. Formats and prepares the result for on-chain storage +3. Handles any cleanup or finalization required after job execution + + diff --git a/pages/developers/blueprint-macros/context.mdx b/pages/developers/blueprint-macros/context.mdx index c1798a20..1f899977 100644 --- a/pages/developers/blueprint-macros/context.mdx +++ b/pages/developers/blueprint-macros/context.mdx @@ -161,6 +161,7 @@ Creating a custom Context Extension involves the following steps: Here's an improved example of a custom `HttpClientContext` extension: ```rust +use context_with_a_client::Context; use reqwest::Client; // Define the HttpClientContext trait diff --git a/pages/developers/blueprint-macros/jobs.mdx b/pages/developers/blueprint-macros/jobs.mdx index 5967ef93..db2de565 100644 --- a/pages/developers/blueprint-macros/jobs.mdx +++ b/pages/developers/blueprint-macros/jobs.mdx @@ -1,6 +1,4 @@ ---- -title: Jobs Macro ---- +import GithubFileReaderDisplay from '/components/GithubFileReaderDisplay'; # Blueprint Jobs Macro System Documentation @@ -20,38 +18,27 @@ We welcome you to share feature requests and PRs on [our github](https://github. The `#[job]` macro is used to define individual tasks or jobs within a blueprint. It allows you to specify various parameters and metadata for each job. -```rust -#[job( - id = , - params(), - result(), - event_listener(TangleJobCallListener) - verifier(evm = "") -)] -pub fn job_name() -> Result<, > { - // Job implementation -} -``` + - **_`id`_**: A unique identifier for the job. - **_`params`_**: A list of parameters that the job accepts. - **_`result`_**: The type of result the job produces (often represented by an underscore \_). - **_`event_listener`_**: Specifies the event listener that triggers the job. -- **_`verifier`_**: Specifies an EVM contract for job verification (for use w/ Tangle). - -### Tangle Blueprint Jobs - -The default implementation targets deployment on Tangle and specifies an EVM contract for verification specified with -the **_`verifier`_** parameter. -The contract name is cross-referenced with the name of a contract in a [`foundry`](https://book.getfoundry.sh/) project -and should be identical in order to integrate seamlessly to Tangle. +### Non-Tangle Blueprint Jobs For other restaking protocols and job verification mechanisms, developers should use or implement custom handlers. An example of doing this to replicate Tangle's default implementation is as follows: ```rust +struct Context; + struct CustomTangleJobCallListener { instance: , } @@ -63,43 +50,62 @@ impl EventListener for CustomJobCallListener { #[job( id = , - params(), + params(), result(), - event_listener(CustomTangleJobCallListener) + event_listener( + listener = CustomTangleJobCallListener, + ) )] -pub fn job_name() -> Result<, > { +pub fn job_name(, ctx: Context) -> Result<, > { // Job implementation } ``` -### Examples +## Examples -#### Keygen Job +### Incredible Squaring Simple -```rust -#[job(id = 0, params(n, t), result(_))] -pub fn keygen(ctx: &MyContext, n: u16, t: u16) -> Result, Error> { - let _ = (n, t, ctx); - Ok(vec![0; 33]) -} -``` + -#### Sign Job +### Incredible Squaring Eigenlayer -```rust -#[job(id = 1, params(keygen_id, data), result(_))] -pub async fn sign(keygen_id: u64, data: Vec) -> Result, Error> { - let _ = (keygen_id, data); - Ok(vec![0; 65]) -} -``` +#### Squaring Job -#### Run Gaia Node Job + -```rust -#[sdk::job(id = 1, params(data), result(_), verifier(evm = "GaiaAiAgentBlueprint"))] -pub async fn run_gaia_node_job(data: Vec) -> Result { - let (_, outputs) = runner::run_gaia_node().await?; - Ok(serde_json::to_string(&outputs)?) -} -``` +#### Initialize Task Job + + + +### MPC Keygen + + + +### MPC Threshold Signature + + diff --git a/pages/developers/blueprint-macros/reports.mdx b/pages/developers/blueprint-macros/reports.mdx index 15708d50..4763c2a3 100644 --- a/pages/developers/blueprint-macros/reports.mdx +++ b/pages/developers/blueprint-macros/reports.mdx @@ -13,13 +13,15 @@ Reports are crucial for maintaining the integrity and security of the AVS by ide The `#[report]` macro is used to define individual reporting functions within a blueprint. It allows you to specify various parameters and metadata for each report. ```rust +struct Context; + #[report( id = , - params(), + params(), result(), - event_listener(), + event_listener(listener = ), )] -pub fn report_name() -> Result<, > { +pub fn report_name(, ctx: Context) -> Result<, > { // Report implementation } ``` @@ -48,34 +50,47 @@ For more information on implementing custom event listeners, refer to the [Event 1. Job-specific Slashing Report: ```rust +use my_special_slashing_context::Context; + #[report( id = 0, - params(job_id, operator_address), + params(submission, job_id, operator_address), result(), - event_listener(JobSpecificListener), + event_listener(TangleEventListener), )] -pub fn job_failure_report(job_id: u64, operator_address: Address) -> Result<(), Error> { - // Implementation to generate and submit a report for a failed job - println!("Generating report for failed job {} by operator {}", job_id, operator_address); +pub fn job_failure_report(submission: Vec, job_id: u64, operator_address: Address, ctx: Context) -> Result<(), Error> { // Submit report to Tangle protocol - Ok(()) + let (proof, valid)) = ctx.validate_submission(submission, job_id, operator_address)?; + + if valid { + Ok(()) + } else { + ctx.submit_slashing_report(submission, proof, job_id, operator_address) + } } ``` 2. Periodic Uptime Report: ```rust +use my_special_web_polling_context::Context; + #[report( id = 1, - params(), - result(), - event_listener(PeriodicListener), + params(value), + result(_), + event_listener( + listener = PeriodicEventListener<2000, WebPoller, serde_json::Value, reqwest::Client> + ), )] -pub async fn uptime_report() -> Result<(), Error> { - // Implementation to generate and submit a periodic uptime report - let uptime_data = collect_uptime_data().await?; - println!("Submitting uptime report: {:?}", uptime_data); - // Submit report to Eigenlayer protocol +pub async fn uptime_report(url: String, ctx: Context) -> Result<(), Error> { + let response = ctx.client.get(url.parse()?).send().await?; + let status = response.status(); + if !status.is_success() { + let epoch = ctx.get_current_epoch(); + let signature = ctx.sign_report(url, epoch)?; + ctx.submit_report(url, status, epoch, signature)?; + } Ok(()) } ``` @@ -83,48 +98,30 @@ pub async fn uptime_report() -> Result<(), Error> { 3. EVM Contract Event Report: ```rust -#[report( - id = 2, - params(event_data), - result(), - event_listener(EVMContractEventListener), +use my_math_verification_context::Context; +use IncredibleSquaringTaskManager::{TaskResponded, TaskResponse, TaskResponseMetadata, Task}; + +#[job( + id = 1, + params(task, task_index), + event_listener( + listener = EvmContractEventListener, + instance = IncredibleSquaringTaskManager, + abi = INCREDIBLE_SQUARING_TASK_MANAGER_ABI_STRING, + pre_processor = convert_event_to_inputs, + ), )] -pub async fn contract_violation_report(event_data: Vec) -> Result<(), Error> { - // Implementation to generate and submit a report based on a contract event - let violation = parse_contract_event(event_data)?; - println!("Reporting contract violation: {:?}", violation); - // Submit report to Tangle protocol +pub async fn contract_violation_report(task: Task, task_response: TaskResponse, metadata: TaskResponseMetadata, ctx: Context) -> Result<(), Error> { + if task.numberToBeSquared * task.numberToBeSquared != task_response.numberSquared { + let signature = ctx.sign_invalid_square_result(task.numberToBeSquared, task_response.numberSquared, metadata.submitter)?; + ctx.submit_report(task, task_response, metadata, epoch, signature)?; + } Ok(()) } + + ``` ## Integration with Jobs Reports can be closely integrated with the [Jobs system](./jobs.mdx) to provide comprehensive monitoring and slashing capabilities. For example, you can create reports that are triggered by specific job outcomes or that monitor the overall performance of your AVS jobs. - -## Custom Protocol Integration - -While the examples above use Tangle and Eigenlayer as the target protocols, the report macro system is designed to be flexible. Developers can implement custom protocol handlers to submit reports to other systems or to handle report data in specific ways. - -```rust -struct CustomProtocolHandler; -impl ProtocolHandler for CustomProtocolHandler { - fn submit_report(&self, report_data: ReportData) -> Result<(), Error> { - // Custom implementation for submitting reports - } -} - -#[report( - id = 3, - params(custom_data), - result(), - event_listener(CustomEventListener), -)] -pub fn custom_protocol_report(custom_data: CustomData) -> Result<(), Error> { - // Implementation using a custom protocol handler - let report = generate_custom_report(custom_data)?; - CustomProtocolHandler.submit_report(report) -} -``` - -By leveraging the report macro system, developers can create robust and flexible reporting mechanisms for their AVS, ensuring the integrity and security of their service across various protocols and use cases. diff --git a/pages/developers/blueprints/introduction.mdx b/pages/developers/blueprints/introduction.mdx index 61fb5772..23968baf 100644 --- a/pages/developers/blueprints/introduction.mdx +++ b/pages/developers/blueprints/introduction.mdx @@ -1,10 +1,30 @@ import { Callout } from 'nextra/components' -import BlueprintIntroCards from "../../../components/BlueprintIntroCards.tsx" +import CardGrid from "../../../components/CardGrid.tsx" import ExpandableImage from "../../../components/ExpandableImage.tsx" # Blueprints -## +## Getting Started + + **Blueprints** are specifications for Actively Validated Services (AVS) or **Instances** on the Tangle Network. Developers build blueprints using our [Gadget SDK](https://github.com/tangle-network/gadget) and deploy them to the Tangle Network. Once deployed, users can create Instances of the Blueprint, which are run by Tangle Operators. The Tangle Network incentivizes operators to run these instances by rewarding them with TNT tokens and fees from instancing and instance exeuction. Developers incentivize operators to run instances by specifying additional rewards for operators in the Blueprint. diff --git a/pages/developers/blueprints/use-cases.mdx b/pages/developers/blueprints/use-cases.mdx index 6dd09c66..fe356265 100644 --- a/pages/developers/blueprints/use-cases.mdx +++ b/pages/developers/blueprints/use-cases.mdx @@ -1,5 +1,6 @@ import ExpandableImage from "../../../components/ExpandableImage"; import TableOfContentCards from "../../../components/TableOfContentCards"; +import NonuniformTableOfContentCards from "../../../components/NonuniformTableOfContentCards"; import GithubRepoCard, { GithubRepoList } from "../../../components/GithubRepoCard"; # Use Cases @@ -10,7 +11,7 @@ Tangle Network enables developers to rapidly build and deploy secure multi-party The Blueprint SDK supports building complex distributed systems. Jump to a section: - @@ -34,56 +34,55 @@ Use the [`#[job]`](./blueprint-macros/jobs.mdx) macro to define a function that -### 3. Event Converter Function +### 3. Event Converter Preprocessor Function -Implement a function to convert the event data into the format expected by your job function: +Implement a preprocessor function to convert the event data into the format expected by your job function: ## Implementing the Event Listener ### 1. Set Up the Provider -Create an HTTP provider to connect to the Ethereum network: +Create an HTTP provider to connect to the Ethereum network w/ a wallet enabled for transacting: -```rust -let http_provider = ProviderBuilder::new() - .with_recommended_fillers() - .wallet(wallet.clone()) - .on_http(self.env.rpc_endpoint.parse()?) - .root() - .clone() - .boxed(); -``` + -### 2. Create the Contract Instance +### 2. Create the Contract Instances and Event Listeners Instantiate the contract using the generated bindings: -```rust -let contract: IncredibleSquaringTaskManager::IncredibleSquaringTaskManagerInstance = - IncredibleSquaringTaskManager::IncredibleSquaringTaskManagerInstance::new(contract_address, provider); -``` + ### 3. Set up the BlueprintRunner -Use the `EventWatcher` to listen for and handle events: +Use the `BlueprintRunner` to execute the jobs and background services: ## Best Practices and Considerations diff --git a/pages/developers/tangle-avs.mdx b/pages/developers/tangle-avs.mdx index 3c5dcb7d..e99d4b6d 100644 --- a/pages/developers/tangle-avs.mdx +++ b/pages/developers/tangle-avs.mdx @@ -1,3 +1,5 @@ +import GithubFileReaderDisplay from "../../components/GithubFileReaderDisplay"; + # Getting Started with Tangle Blueprints Welcome to the Tangle Blueprint tutorial! This guide will walk you through creating a simple `Hello World` Blueprint for Tangle. By the end of this tutorial, you'll have a basic understanding of how to create, build, and deploy a Tangle Blueprint. @@ -33,20 +35,12 @@ This file contains the core logic of your Blueprint, including job definitions, Here's a basic example incorporating these elements: -```rust -use gadget_sdk as sdk; -use sdk::job; -use std::convert::Infallible; - -/// Returns "Hello World!" if who is None, otherwise returns "Hello, !" -#[job(id = 0, params(who), result(), verifier(evm = "HelloBlueprint"))] -pub fn say_hello(who: Option) -> Result { - match who { - Some(who) => Ok(format!("Hello, {}!", who)), - None => Ok("Hello World!".to_string()), - } -} -``` + This job takes an optional `who` parameter and returns a greeting. @@ -60,53 +54,12 @@ This file serves as the entry point for your Actively Validated Service (AVS) no 4. **Event Handler Creation**: It instantiates the event handler for the `say_hello` job. 5. **Event Watcher**: It starts the Substrate event watcher, which listens for relevant events on the Tangle Network. -```rust -use color_eyre::Result; -use gadget_sdk as sdk; -use hello_world_blueprint as blueprint; -use sdk::{ - config::ContextConfig, events_watcher::substrate::SubstrateEventWatcher, - events_watcher::tangle::TangleEventsWatcher, tangle_subxt::, -}; -use structopt::StructOpt; - -#[tokio::main] -async fn main() -> Result<()> { - init_logger(); - color_eyre::install()?; - // Initialize the environment - let config = ContextConfig::from_args(); - let env = sdk::config::load(config)?; - let signer = env.first_sr25519_signer()?; - let client = subxt::OnlineClient::from_url(&env.rpc_endpoint).await?; - if env.should_run_registration() { - todo!(); - } - - let service_id = env.service_id.expect("should exist"); - - // Create the event handler from the job - let say_hello_job = blueprint::SayHelloEventHandler { service_id, signer }; - tracing::info!("Starting the event watcher ..."); - SubstrateEventWatcher::run( - &TangleEventsWatcher { - span: env.span.clone(), - }, - client, - vec![Box::new(say_hello_job)], - ).await?; - Ok(()) -} - -fn init_logger() { - let env_filter = tracing_subscriber::EnvFilter::from_default_env(); - tracing_subscriber::fmt() - .compact() - .with_target(true) - .with_env_filter(env_filter) - .init(); -} -``` + This sets up the AVS node, initializes the environment, and starts the event watcher. diff --git a/pages/developers/testing-with-tangle.mdx b/pages/developers/testing-with-tangle.mdx new file mode 100644 index 00000000..b7265d38 --- /dev/null +++ b/pages/developers/testing-with-tangle.mdx @@ -0,0 +1,86 @@ +# Testing with Tangle + +## How to test your blueprint with Tangle + +This guide will walk you through the process of setting and running Tangle node locally to test your blueprint with Tangle. + +### Prerequisites + +First install and configure `rustup`: + +```bash +# Install +curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh +# Configure +source ~/.cargo/env +``` + +### Clone the tangle node + +```bash +git clone https://github.com/tangle-network/tangle +cd tangle +``` + +### Build the node for instant-seal + +This is different from the production tangle runtime which produces a block every 6 seconds. The instant-seal node produces a block only when a transaction is available. +This allows for faster testing cycles. + +```bash +cargo build --release --features manual-seal,txpool,testnet +``` + +### Run the node + +```bash +./target/release/tangle --tmp --dev --validator -linfo \ +--alice --rpc-cors all --rpc-methods=unsafe --rpc-external \ +--rpc-port 9944 -levm=debug -lgadget=trace --sealing instant +``` + +If successful, you should see output indicating that the node is running: + +```bash +./target/release/tangle --tmp --dev --validator -linfo --alice --rpc-cors all --rpc-methods=unsafe --rpc-external --rpc-port 9944 -levm=debug -lgadget=trace --sealing instant + ++++++++++++++++++++++++ + +++++++++++++++++++++++++++ + +++++++++++++++++++++++++++ + +++ ++++++ +++ @%%%%%%%%%%% %%% + ++++++ ++++ +++++ %%%%%%%%%%%% %%%@ + ++++++++++++++++++++++++++ %%%% %%%%@ %%% %%@ @%%%%%%% %%%@ %%%%@ + ++++++++ %%%% @%%%%%%%@ %%%%%%%%% @%%%%%%%%% %%%@ %%%%%%%%% + ++++++++ %%%% %%%%%%%%% %%%% @%%%@ %%%% %%%% %%%@ %%%%%%%%%% + ++++++++++++++++++++++++++ %%%% %%%%%%%%% %%% %%%% %%% @%%% %%%@ @%%%%% %%%%% + ++++++ ++++ ++++++ %%%% %%%%%%%%% %%% %%%% %%%%%%%%%% %%%@ %%%%%%%%%@ + +++ ++++++ +++ %%%% %%%%%%%%% %%% %%%@ %%%%%%%%% %%% %%%%%%%@ + ++++ +++++++++ +++ %%%% %%%% + ++++++++++++++++++++++++++++ %%%%%%%%% + +++++++++++++++++++++++ %%%%% + +2024-10-30 16:00:54.306 INFO main sc_cli::runner: Tangle Node +2024-10-30 16:00:54.306 INFO main sc_cli::runner: ✌️ version 1.2.0-cedde5d83a0 +2024-10-30 16:00:54.306 INFO main sc_cli::runner: ❤️ by Webb Technologies Inc., 2023-2024 +2024-10-30 16:00:54.306 INFO main sc_cli::runner: 📋 Chain specification: Local Testnet +2024-10-30 16:00:54.306 INFO main sc_cli::runner: 🏷 Node name: Alice +2024-10-30 16:00:54.306 INFO main sc_cli::runner: 👤 Role: AUTHORITY +2024-10-30 16:00:54.306 INFO main sc_cli::runner: 💾 Database: RocksDb at /var/folders/ht/41y18g597_9_1035dlw0m3700000gn/T/substrateGSJexb/chains/local_testnet/db/full +2024-10-30 16:00:55.347 INFO main runtime::staking: [0] 💸 generated 5 npos voters, 5 from validators and 0 nominators +2024-10-30 16:00:55.347 INFO main runtime::staking: [0] 💸 generated 5 npos targets +``` + +### How to build testnet runtime (without instant-seal) + +To build tangle node, without instant-seal, you can run: + +```bash +cargo build --release --features txpool,testnet +``` + +And use the following command to run the node: + +```bash +./target/release/tangle --tmp --dev --validator -linfo \ +--alice --rpc-cors all --rpc-methods=unsafe --rpc-external \ +--rpc-port 9944 -levm=debug -lgadget=trace +``` diff --git a/pages/developers/troubleshooting.mdx b/pages/developers/troubleshooting.mdx new file mode 100644 index 00000000..3137b3f4 --- /dev/null +++ b/pages/developers/troubleshooting.mdx @@ -0,0 +1,46 @@ +import GithubFileReaderDisplay from "../../components/GithubFileReaderDisplay"; + +# Troubleshooting Guide + +This guide helps developers troubleshoot common issues when working with Tangle Network blueprints and AVS development. + +## Common Issues + +### Blueprint Metadata Build Failures + +If you encounter build failures when developing blueprints: + +```bash +error: failed to run custom build command for ` v0.1.0 ()` + +Caused by: + process didn't exit successfully: `/target/release/build/-/build-script-build` (exit status: 101) + --- stdout + cargo:rerun-if-changed=src/main.rs + + --- stderr + Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.75s + Generated /target/blueprint/doc/.json + Reading JSON from /target/blueprint/doc/.json + thread 'main' panicked at /Users/drew/.cargo/registry/src/index.crates.io-6f17d22bba15001f/blueprint-metadata-0.1.6/src/lib.rs:410:59: + Failed to parse rustdoc JSON: Error("invalid type: string \"0:0:2495\", expected u32", line: 1, column: 18) + note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace +``` + +1. Verify your `gadget` version and compare your `rust_toolchain.toml` against the [Blueprint Template](https://github.com/tangle-network/blueprint-template) repository. + + + +2. Verify that your blueprint's jobs and reports are implemented correctly. Occasionally, our SDK may have breaking changes to the error reporting. You will want to consider commenting out metadata generation and then rebuilding to check for errors in the blueprint. + + diff --git a/pages/operators/node-basics/faq.mdx b/pages/operators/node-basics/faq.mdx index 37aa3eff..5f76f248 100644 --- a/pages/operators/node-basics/faq.mdx +++ b/pages/operators/node-basics/faq.mdx @@ -18,7 +18,7 @@ We recommend that you run two machines with the same specifications, in differen ## What are the different networks? -There are two networks, each will require dedicated hardware. The Tangle Testnet is free and should be used to familiarize yourself with the setup. See [Resources for more details.](../../resources.mdx) +There are two networks, each will require dedicated hardware. The Tangle Testnet is free and should be used to familiarize yourself with the setup. See [Resources for more details.](/resources.mdx) ## What ports do I allow on my firewall? diff --git a/pages/resources.mdx b/pages/resources.mdx deleted file mode 100644 index aba3f245..00000000 --- a/pages/resources.mdx +++ /dev/null @@ -1,6 +0,0 @@ -import NetworkInfo from "../components/NetworkResources" -import WalletTable from "../components/WalletTable" - -# Resources and Tools - - diff --git a/pages/resources/_meta.json b/pages/resources/_meta.json index ea76f9d1..94ff3685 100644 --- a/pages/resources/_meta.json +++ b/pages/resources/_meta.json @@ -1,3 +1,22 @@ { - "network-information-configuration": "Resources and Tools" + "-- intro": { + "type": "separator", + "title": "Introduction" + }, + "resources": "Resources and Tools", + "-- bridges": { + "type": "separator", + "title": "Bridges" + }, + "bridge": "Tangle dApp Bridge", + "hyperlane": "Hyperlane", + "router": "Router", + "chainport": "Chainport", + "-- developer-tools": { + "type": "separator", + "title": "Developer Tools" + }, + "biconomy": "Biconomy", + "sablier": "Sablier", + "safe": "Gnosis Safe" } diff --git a/pages/resources/biconomy.mdx b/pages/resources/biconomy.mdx new file mode 100644 index 00000000..e69de29b diff --git a/pages/restake/bridge.mdx b/pages/resources/bridge.mdx similarity index 80% rename from pages/restake/bridge.mdx rename to pages/resources/bridge.mdx index aa74fb8e..c22b5a34 100644 --- a/pages/restake/bridge.mdx +++ b/pages/resources/bridge.mdx @@ -6,17 +6,9 @@ In order to participate in Tangle's restaking infrastructure, users need to firs [Access Tangle DApp's Bridge page here](https://app.tangle.tools/bridge) -## Supported Assets - -As of the time of writing of this page, the bridge only supports WETH for testnet transfers between Holesky and Tangle. - -Soon, users will be able to create and deploy a Hyperlane Warp Route blueprint instance to support additional assets. [Learn more about Blueprints here](/developers/blueprints/introduction.mdx). - -More information about adding support for additional assets will be provided in the near future. For now, make sure you've joined our Discord server & Telegram channel to stay updated. - ## How the Bridge Works -Bridging from EVM-based blockchains into Tangle EVM works by leveraging Hyperlane, a permissionless interoperability layer that allows smart contract developers to send arbitrary data between blockchains. [Learn more about Hyperlane here](https://docs.hyperlane.xyz/docs/protocol/protocol-overview). +Bridging from EVM-based blockchains into Tangle EVM works by leveraging [Hyperlane](/resources/hyperlane) and [Router Protocol](/resources/router). Currently the Tangle dApp is configured against Hyperlane but plans to support our other bridges is in the works. ## How to Use the Bridge diff --git a/pages/resources/chainport.mdx b/pages/resources/chainport.mdx new file mode 100644 index 00000000..e69de29b diff --git a/pages/resources/hyperlane.mdx b/pages/resources/hyperlane.mdx new file mode 100644 index 00000000..db07db59 --- /dev/null +++ b/pages/resources/hyperlane.mdx @@ -0,0 +1,57 @@ +# Hyperlane Deployments + +Hyperlane is a protocol for seamless cross-chain communication and interoperability, enabling decentralized applications (dApps) to operate across multiple blockchain networks. It features interchain messaging and routing for secure data transmission. Learn more on the [Hyperlane GitHub](https://github.com/hyperlane-xyz) and explore its [documentation](https://docs.hyperlane.xyz/). + +## Mainnet Deployment Contracts + +Below are the addresses for the various contracts deployed on the mainnet for Hyperlane. You can view each contract on our [Blockscout Mainnet Explorer](https://explorer.tangle.tools/). + +| Contract Name | Address | +| ---------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | +| **Aggregation Hook** | [`0xDC995884ec53b6Bc809ed614f5E92084600002ed`](https://explorer.tangle.tools/address/0xDC995884ec53b6Bc809ed614f5E92084600002ed) | +| **Domain Routing ISM** | [`0xaDc0cB48E8DB81855A930C0C1165ea3dCe4Ba5C7`](https://explorer.tangle.tools/address/0xaDc0cB48E8DB81855A930C0C1165ea3dCe4Ba5C7) | +| **Domain Routing ISM Factory** | [`0x1052eF3419f26Bec74Ed7CEf4a4FA6812Bc09908`](https://explorer.tangle.tools/address/0x1052eF3419f26Bec74Ed7CEf4a4FA6812Bc09908) | +| **Fallback Routing Hook** | [`0xd21192429df453021e896f2897Dc8B1167DD61E5`](https://explorer.tangle.tools/address/0xd21192429df453021e896f2897Dc8B1167DD61E5) | +| **Interchain Account ISM** | [`0x45285463352c53a481e882cD5E2AF2E25BBdAd0D`](https://explorer.tangle.tools/address/0x45285463352c53a481e882cD5E2AF2E25BBdAd0D) | +| **Interchain Account Router** | [`0x67F36550b73B731e5b2FC44E4F8f250d89c87bD6`](https://explorer.tangle.tools/address/0x67F36550b73B731e5b2FC44E4F8f250d89c87bD6) | +| **Interchain Gas Paymaster** | [`0x9844aFFaBE17c37F791ff99ABa58B0FbB75e22AF`](https://explorer.tangle.tools/address/0x9844aFFaBE17c37F791ff99ABa58B0FbB75e22AF) | +| **Interchain Security Module** | [`0x336306ADB3c510A318107c01D109D2072c7abB6B`](https://explorer.tangle.tools/address/0x336306ADB3c510A318107c01D109D2072c7abB6B) | +| **Mailbox** | [`0x2f2aFaE1139Ce54feFC03593FeE8AB2aDF4a85A7`](https://explorer.tangle.tools/address/0x2f2aFaE1139Ce54feFC03593FeE8AB2aDF4a85A7) | +| **Merkle Tree Hook** | [`0xF5da68b2577EF5C0A0D98aA2a58483a68C2f232a`](https://explorer.tangle.tools/address/0xF5da68b2577EF5C0A0D98aA2a58483a68C2f232a) | +| **Pausable Hook** | [`0x61594D2cA900C44ab51d07776465397FefC643C6`](https://explorer.tangle.tools/address/0x61594D2cA900C44ab51d07776465397FefC643C6) | +| **Pausable ISM** | [`0x5d69BC38eF3eDb491c0b7186BEc4eC45c4013f93`](https://explorer.tangle.tools/address/0x5d69BC38eF3eDb491c0b7186BEc4eC45c4013f93) | +| **Protocol Fee** | [`0x4E55aDA3ef1942049EA43E904EB01F4A0a9c39bd`](https://explorer.tangle.tools/address/0x4E55aDA3ef1942049EA43E904EB01F4A0a9c39bd) | +| **Proxy Admin** | [`0x0761b0827849abbf7b0cC09CE14e1C93D87f5004`](https://explorer.tangle.tools/address/0x0761b0827849abbf7b0cC09CE14e1C93D87f5004) | +| **Static Aggregation Hook Factory** | [`0xEb9FcFDC9EfDC17c1EC5E1dc085B98485da213D6`](https://explorer.tangle.tools/address/0xEb9FcFDC9EfDC17c1EC5E1dc085B98485da213D6) | +| **Static Aggregation ISM** | [`0xB0525d808721426c56377469B92db16857384deF`](https://explorer.tangle.tools/address/0xB0525d808721426c56377469B92db16857384deF) | +| **Static Aggregation ISM Factory** | [`0x8F7454AC98228f3504Bb91eA3D8Adafe6406110A`](https://explorer.tangle.tools/address/0x8F7454AC98228f3504Bb91eA3D8Adafe6406110A) | +| **Static Merkle Root Multisig ISM Factory** | [`0x2C1FAbEcd7bFBdEBF27CcdB67baADB38b6Df90fC`](https://explorer.tangle.tools/address/0x2C1FAbEcd7bFBdEBF27CcdB67baADB38b6Df90fC) | +| **Static Merkle Root Weighted Multisig ISM Factory** | [`0x148CF67B8A242c1360bb2C93fCe203EC4d4f9B56`](https://explorer.tangle.tools/address/0x148CF67B8A242c1360bb2C93fCe203EC4d4f9B56) | +| **Static Message ID Multisig ISM Factory** | [`0x8b83fefd896fAa52057798f6426E9f0B080FCCcE`](https://explorer.tangle.tools/address/0x8b83fefd896fAa52057798f6426E9f0B080FCCcE) | +| **Static Message ID Weighted Multisig ISM Factory** | [`0xcd849e612Aaa138f03698C3Edb42a34117BFF631`](https://explorer.tangle.tools/address/0xcd849e612Aaa138f03698C3Edb42a34117BFF631) | +| **Storage Gas Oracle** | [`0x7b2e996742fA42d223652A344252B725D1bC428C`](https://explorer.tangle.tools/address/0x7b2e996742fA42d223652A344252B725D1bC428C) | +| **Test Recipient** | [`0x2c61Cda929e4e2174cb10cd8e2724A9ceaD62E67`](https://explorer.tangle.tools/address/0x2c61Cda929e4e2174cb10cd8e2724A9ceaD62E67) | +| **Timelock Controller** | [`0x0000000000000000000000000000000000000000`](https://explorer.tangle.tools/address/0x0000000000000000000000000000000000000000) | +| **Validator Announce** | [`0x062200d92dF6bB7bA89Ce4D6800110450f94784e`](https://explorer.tangle.tools/address/0x062200d92dF6bB7bA89Ce4D6800110450f94784e) | + +## Testnet Deployment Contracts + +Below are the addresses for the various contracts deployed on the testnet for Hyperlane. You can view each contract on our [Blockscout Testnet Explorer](https://testnet-explorer.tangle.tools/). + +| Contract Name | Address | +| ---------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | +| **Domain Routing ISM Factory** | [`0x89dC5328147BA17aF9feb76DbEdb1182916f2438`](https://testnet-explorer.tangle.tools/address/0x89dC5328147BA17aF9feb76DbEdb1182916f2438) | +| **Interchain Account ISM** | [`0xa464A27Db7Dd67651681147b8bb22eFfA2e7FC76`](https://testnet-explorer.tangle.tools/address/0xa464A27Db7Dd67651681147b8bb22eFfA2e7FC76) | +| **Interchain Account Router** | [`0xF26bd3FDF7D84a9A2800fF6e992E7075f5dBA6C0`](https://testnet-explorer.tangle.tools/address/0xF26bd3FDF7D84a9A2800fF6e992E7075f5dBA6C0) | +| **Mailbox** | [`0x0096a17ff0a55D35DfE9D98BEA2104Ff7b830E23`](https://testnet-explorer.tangle.tools/address/0x0096a17ff0a55D35DfE9D98BEA2104Ff7b830E23) | +| **Proxy Admin** | [`0xC40785D391dcC7Cf77ba7C54f0C8cF8F60877B14`](https://testnet-explorer.tangle.tools/address/0xC40785D391dcC7Cf77ba7C54f0C8cF8F60877B14) | +| **Static Aggregation Hook Factory** | [`0xB2A23781c75F06767d8F8BAe382d78f989C492c6`](https://testnet-explorer.tangle.tools/address/0xB2A23781c75F06767d8F8BAe382d78f989C492c6) | +| **Static Aggregation ISM Factory** | [`0x6BB99502D4867aA401E337315D24fdc3f783388D`](https://testnet-explorer.tangle.tools/address/0x6BB99502D4867aA401E337315D24fdc3f783388D) | +| **Static Merkle Root Multisig ISM Factory** | [`0xcFCC8EdE6aBf99EcDE0C818DA7357f7206DE08e9`](https://testnet-explorer.tangle.tools/address/0xcFCC8EdE6aBf99EcDE0C818DA7357f7206DE08e9) | +| **Static Merkle Root Weighted Multisig ISM Factory** | [`0x380d7E7b20E5Df5893a44E2328732fF1a9525818`](https://testnet-explorer.tangle.tools/address/0x380d7E7b20E5Df5893a44E2328732fF1a9525818) | +| **Static Message ID Multisig ISM Factory** | [`0x315480F385d416c0723FbE2858c7b8Dd7b03A9B4`](https://testnet-explorer.tangle.tools/address/0x315480F385d416c0723FbE2858c7b8Dd7b03A9B4) | +| **Static Message ID Weighted Multisig ISM Factory** | [`0x6245cdDe964B65d9ee2a40f802cBd88842205C61`](https://testnet-explorer.tangle.tools/address/0x6245cdDe964B65d9ee2a40f802cBd88842205C61) | +| **Test Recipient** | [`0x384d44f775A5f273d6c8e2A3740A8238598f1557`](https://testnet-explorer.tangle.tools/address/0x384d44f775A5f273d6c8e2A3740A8238598f1557) | +| **Validator Announce** | [`0x24F4d9fF532B05844e6c984107899d944812540B`](https://testnet-explorer.tangle.tools/address/0x24F4d9fF532B05844e6c984107899d944812540B) | + +These addresses are essential for interacting with the Hyperlane protocol on the testnet. Ensure you have the correct permissions and configurations when deploying or interacting with these contracts. diff --git a/pages/resources/resources.mdx b/pages/resources/resources.mdx new file mode 100644 index 00000000..3a933d18 --- /dev/null +++ b/pages/resources/resources.mdx @@ -0,0 +1,6 @@ +import NetworkInfo from "../../components/NetworkResources" +import WalletTable from "../../components/WalletTable" + +# Resources and Tools + + diff --git a/pages/resources/router.mdx b/pages/resources/router.mdx new file mode 100644 index 00000000..28455bc9 --- /dev/null +++ b/pages/resources/router.mdx @@ -0,0 +1,16 @@ +# Router Deployments + +Router is a protocol designed to facilitate seamless cross-chain transactions and interoperability, allowing decentralized applications (dApps) to operate across multiple blockchain networks. It provides efficient routing and liquidity management for secure and fast transactions. Explore more on the [Router Nitro App](https://app.routernitro.com/). + +## Mainnet Supported Tokens + +Below are the token addresses supported on the Tangle mainnet for Router. You can view each token on our [Blockscout Mainnet Explorer](https://explorer.tangle.tools/). + +| Token Name | Address | +| ---------- | -------------------------------------------------------------------------------------------------------------------------------- | +| **USDT** | [`0xb6dc6c8b71e88642cead3be1025565a9ee74d1c6`](https://explorer.tangle.tools/address/0xb6dc6c8b71e88642cead3be1025565a9ee74d1c6) | +| **USDC** | [`0x97eec1c29f745dc7c267f90292aa663d997a601d`](https://explorer.tangle.tools/address/0x97eec1c29f745dc7c267f90292aa663d997a601d) | +| **WETH** | [`0x01b4ce0d48ce91eb6bcaf5db33870c65d641b894`](https://explorer.tangle.tools/address/0x01b4ce0d48ce91eb6bcaf5db33870c65d641b894) | +| **AVAIL** | [`0xb8a09939F27908505C4241C3c251f3DA33a207A9`](https://explorer.tangle.tools/address/0xb8a09939F27908505C4241C3c251f3DA33a207A9) | + +These token addresses are essential for interacting with the Router protocol on the mainnet. Ensure you have the correct permissions and configurations when deploying or interacting with these tokens. diff --git a/pages/resources/sablier.mdx b/pages/resources/sablier.mdx new file mode 100644 index 00000000..e69de29b diff --git a/pages/resources/safe.mdx b/pages/resources/safe.mdx new file mode 100644 index 00000000..e69de29b diff --git a/pages/restake/_meta.json b/pages/restake/_meta.json index c5ea0c75..def6bfe3 100644 --- a/pages/restake/_meta.json +++ b/pages/restake/_meta.json @@ -6,18 +6,15 @@ "introduction": "Overview", "staking-intro": "Introduction to Staking", "nominator": "Nominating your TNT", - "restake-concepts": "Restaking core concepts", - "bridge": "Bridge", + "restake-concepts": "Core concepts", "-- restaking": { "type": "separator", "title": "Restaking" }, - "restake-introduction": "Introduction to Restaking", + "restake-introduction": "Tangle Restaking", "incentives": "Incentives", - "assets": "Supported Assets", "join_operator": "Operator Docs", - "how_to_restake_tangle": "How to Restake: Tangle DApp", - "how_to_restake_polkadotjs": "How to Restake: PolkadotJS", + "how_to_restake": "How to Restake on Tangle", "restake_developers": "Developer Docs", "-- liquid staking": { "type": "separator", diff --git a/pages/restake/assets.mdx b/pages/restake/assets.mdx deleted file mode 100644 index b7c32c8c..00000000 --- a/pages/restake/assets.mdx +++ /dev/null @@ -1,9 +0,0 @@ -# Supported Assets on Tangle Restaking - -Supported assets include all "liquid" assets on Tangle network, including liquid staked TNT tokens. The network does not limit or restrict the assets that can be used for restaking, but assets are preferred by adding them to a reward pool. - -## Integrate New Assets - -New assets may be added through on-chain governance and TNT community approval. - -To propose new assets, [join the community discussion](https://commonwealth.im/tangle/discussions). diff --git a/pages/restake/how_to_restake/_meta.json b/pages/restake/how_to_restake/_meta.json new file mode 100644 index 00000000..9dcf8c5f --- /dev/null +++ b/pages/restake/how_to_restake/_meta.json @@ -0,0 +1,4 @@ +{ + "how_to_restake_tangle": "How to Restake: Tangle DApp", + "how_to_restake_polkadotjs": "How to Restake: PolkadotJS" +} diff --git a/pages/restake/how_to_restake_polkadotjs/_meta.json b/pages/restake/how_to_restake/how_to_restake_polkadotjs/_meta.json similarity index 100% rename from pages/restake/how_to_restake_polkadotjs/_meta.json rename to pages/restake/how_to_restake/how_to_restake_polkadotjs/_meta.json diff --git a/pages/restake/how_to_restake_polkadotjs/delegate.mdx b/pages/restake/how_to_restake/how_to_restake_polkadotjs/delegate.mdx similarity index 100% rename from pages/restake/how_to_restake_polkadotjs/delegate.mdx rename to pages/restake/how_to_restake/how_to_restake_polkadotjs/delegate.mdx diff --git a/pages/restake/how_to_restake_polkadotjs/deposit.mdx b/pages/restake/how_to_restake/how_to_restake_polkadotjs/deposit.mdx similarity index 100% rename from pages/restake/how_to_restake_polkadotjs/deposit.mdx rename to pages/restake/how_to_restake/how_to_restake_polkadotjs/deposit.mdx diff --git a/pages/restake/how_to_restake_polkadotjs/unstake.mdx b/pages/restake/how_to_restake/how_to_restake_polkadotjs/unstake.mdx similarity index 100% rename from pages/restake/how_to_restake_polkadotjs/unstake.mdx rename to pages/restake/how_to_restake/how_to_restake_polkadotjs/unstake.mdx diff --git a/pages/restake/how_to_restake_polkadotjs/withdraw.mdx b/pages/restake/how_to_restake/how_to_restake_polkadotjs/withdraw.mdx similarity index 100% rename from pages/restake/how_to_restake_polkadotjs/withdraw.mdx rename to pages/restake/how_to_restake/how_to_restake_polkadotjs/withdraw.mdx diff --git a/pages/restake/how_to_restake_tangle/_meta.json b/pages/restake/how_to_restake/how_to_restake_tangle/_meta.json similarity index 100% rename from pages/restake/how_to_restake_tangle/_meta.json rename to pages/restake/how_to_restake/how_to_restake_tangle/_meta.json diff --git a/pages/restake/how_to_restake_tangle/delegate.mdx b/pages/restake/how_to_restake/how_to_restake_tangle/delegate.mdx similarity index 100% rename from pages/restake/how_to_restake_tangle/delegate.mdx rename to pages/restake/how_to_restake/how_to_restake_tangle/delegate.mdx diff --git a/pages/restake/how_to_restake_tangle/deposit.mdx b/pages/restake/how_to_restake/how_to_restake_tangle/deposit.mdx similarity index 100% rename from pages/restake/how_to_restake_tangle/deposit.mdx rename to pages/restake/how_to_restake/how_to_restake_tangle/deposit.mdx diff --git a/pages/restake/how_to_restake_tangle/unstake.mdx b/pages/restake/how_to_restake/how_to_restake_tangle/unstake.mdx similarity index 100% rename from pages/restake/how_to_restake_tangle/unstake.mdx rename to pages/restake/how_to_restake/how_to_restake_tangle/unstake.mdx diff --git a/pages/restake/how_to_restake_tangle/withdraw.mdx b/pages/restake/how_to_restake/how_to_restake_tangle/withdraw.mdx similarity index 100% rename from pages/restake/how_to_restake_tangle/withdraw.mdx rename to pages/restake/how_to_restake/how_to_restake_tangle/withdraw.mdx diff --git a/pages/restake/introduction.mdx b/pages/restake/introduction.mdx index a592f4e8..68859625 100644 --- a/pages/restake/introduction.mdx +++ b/pages/restake/introduction.mdx @@ -1,10 +1,26 @@ -import StakingIntroCards from "../../components/StakingIntroCards"; +import CardGrid from "../../components/CardGrid"; # Staking & Restaking Tangle's core staking infrastructure is composed of three major pieces. The first is the base nominator proof of stake (NPos) mechanism for validator selection. The second is a native liquid staking protocol for validator specific staking operations and liquid staked tokens (LSTs). The third is the shared security restaking infrastructure for Tangle Blueprints that leverages any asset, especially the LSTs. - + ## Nominated Staking diff --git a/pages/restake/restake-introduction.mdx b/pages/restake/restake-introduction.mdx index fe538243..e1031b09 100644 --- a/pages/restake/restake-introduction.mdx +++ b/pages/restake/restake-introduction.mdx @@ -8,8 +8,10 @@ Tangle provides permissionless asset restaking to developers and customers build The restaking infrastructure divides assets into pools, which can be created to represent a single asset or a basket of similarly valued assets. Pools of assets are used to secure Tangle Blueprint service instances and are rewarded collectively as pools. This is beneficial when integrating many liquid staked tokens of a single protocol, such as validator-specific liquid staking protocols, or when bundling lots of different LSTs of a single ecosystem such as a basket of ETH LSTs. -## Benefits of restaking include: +## Benefits of Tangle Restaking include: +- Restaking any asset +- On-demand service instances - Increased efficiency of staked capital by sharing it across instances - Additional revenue streams for stakers and operators - Boosted security for protocols leveraging new assets as security capital @@ -23,14 +25,13 @@ Tangle Network has implemented a unique restaking system to allow its validator Tangle noderunners can opt-in to restake a portion of their staked TNT tokens to provide AVS instances such as oracles, privacy-preserving computation, and more. In return, they earn service fees and additional inflation rewards on top of their base validation rewards. -### Here's how it works: +### Lifecycle of an AVS Instance 1. Developers create blueprints that define the specifications and requirements for AVS instances. -2. Operators create a restaking profile by allocating their restaked TNT to specific blueprints they want to support. -3. Users can request AVS instances from Tangle's restaked Operators for a fee. Requested instances are assigned to restaked operators based on the blueprint's criteria. -4. Operators must execute the AVS instances they are assigned. Failure to do so may result in penalties or reduced rewards. -5. Participating operators earn the service fees and proportional inflation rewards based on their restaked amounts and instances executed. +2. Operators create a restaking profile and register to blueprints they want to operate. +3. Users instance Tangle Blueprints and select from the set of registered operators and restaked assets. +4. Operators then execute the AVS instances they approve and earn rewards. Failure to do so may result in penalties or reduced rewards. -This restaking model allows Tangle to offer unique AVS instances powered by its decentralized validator set. Developers can leverage these services to easily deploy advanced decentralized applications like trustless cross-chain bridges, privacy solutions, identity systems, and more. +This restaking model allows Tangle to offer unique AVS instances powered by its decentralized validator and operator set. Developers can leverage these services to easily deploy advanced decentralized applications like trustless cross-chain bridges, privacy solutions, identity systems, and more. -By restaking, Tangle noderunners gain additional revenue, the network gains efficiency from its staked supply, and the ecosystem gains access to powerful new primitives to fuel innovation. Restaking helps align incentives and harness the security of the underlying proof-of-stake blockchain for exciting new use cases. +By restaking, Tangle operators gain additional revenue, the network gains efficiency from its staked supply, and the ecosystem gains access to powerful new primitives to fuel innovation. Restaking helps align incentives and harness the security of the underlying proof-of-stake blockchain for exciting new use cases. diff --git a/pages/restake/restake_developers/_meta.json b/pages/restake/restake_developers/_meta.json index aaff8f9b..64fbf8a9 100644 --- a/pages/restake/restake_developers/_meta.json +++ b/pages/restake/restake_developers/_meta.json @@ -1,4 +1,5 @@ { - "intro": "Introduction", - "restake_precompile": "Restake Precompile" + "integration": "Integration", + "restake_precompile": "Restake Precompile", + "services_precompile": "Services Precompile" } diff --git a/pages/restake/restake_developers/intro.mdx b/pages/restake/restake_developers/integration.mdx similarity index 74% rename from pages/restake/restake_developers/intro.mdx rename to pages/restake/restake_developers/integration.mdx index 24742765..9ca98d16 100644 --- a/pages/restake/restake_developers/intro.mdx +++ b/pages/restake/restake_developers/integration.mdx @@ -1,4 +1,6 @@ -# Using Tangle Restake in your project +# Integrating with Tangle Restaking + +To integrate with Tangle Restaking for the purposes of building a DApp or interacting with the restake functionality, you can use the Tangle MultiAssetDelegation and Services precompiles. These contracts provide logic to build new liquid restaking token pools and UIs over Tangle Restaking. Tangle MultiAssetDelegation data provides information about the current state of the Tangle network restake functionality. If you are looking to use this restake data in your project or build your DAPP, you can use the tangle-restake-precompile library to interact with the restake functionality. @@ -8,7 +10,7 @@ The precompiles allow you to call the Substrate runtime directly which is not no ### How to use the precompile -Precompile can be used like any other Solidity interface. +The precompile can be used like any other Solidity interface. You can import the precompile in your Solidity project like this: diff --git a/pages/restake/restake_developers/services_precompile.mdx b/pages/restake/restake_developers/services_precompile.mdx new file mode 100644 index 00000000..bf62193e --- /dev/null +++ b/pages/restake/restake_developers/services_precompile.mdx @@ -0,0 +1 @@ +https://github.com/tangle-network/tangle/blob/main/precompiles/services/Services.sol diff --git a/public/robots.txt b/public/robots.txt new file mode 100644 index 00000000..df0fe870 --- /dev/null +++ b/public/robots.txt @@ -0,0 +1,9 @@ +# * +User-agent: * +Allow: / + +# Host +Host: https://docs.tangle.tools + +# Sitemaps +Sitemap: https://docs.tangle.tools/sitemap.xml diff --git a/public/sitemap-0.xml b/public/sitemap-0.xml new file mode 100644 index 00000000..9ecb1329 --- /dev/null +++ b/public/sitemap-0.xml @@ -0,0 +1,116 @@ + + +https://docs.tangle.tools2024-11-07T16:58:46.928Zdaily0.7 +https://docs.tangle.tools/developers/blueprint-contexts/eigenlayer-context2024-11-07T16:58:46.929Zdaily0.7 +https://docs.tangle.tools/developers/blueprint-contexts/evm-provider-context2024-11-07T16:58:46.929Zdaily0.7 +https://docs.tangle.tools/developers/blueprint-contexts/introduction2024-11-07T16:58:46.929Zdaily0.7 +https://docs.tangle.tools/developers/blueprint-contexts/keystore-context2024-11-07T16:58:46.929Zdaily0.7 +https://docs.tangle.tools/developers/blueprint-contexts/service-context2024-11-07T16:58:46.929Zdaily0.7 +https://docs.tangle.tools/developers/blueprint-contexts/tangle-client-context2024-11-07T16:58:46.929Zdaily0.7 +https://docs.tangle.tools/developers/blueprint-event-listeners/custom-listeners2024-11-07T16:58:46.929Zdaily0.7 +https://docs.tangle.tools/developers/blueprint-event-listeners/evm-contracts2024-11-07T16:58:46.929Zdaily0.7 +https://docs.tangle.tools/developers/blueprint-event-listeners/introduction2024-11-07T16:58:46.929Zdaily0.7 +https://docs.tangle.tools/developers/blueprint-event-listeners/periodic-listeners2024-11-07T16:58:46.929Zdaily0.7 +https://docs.tangle.tools/developers/blueprint-event-listeners/tangle-job-calls2024-11-07T16:58:46.929Zdaily0.7 +https://docs.tangle.tools/developers/blueprint-macros/context2024-11-07T16:58:46.929Zdaily0.7 +https://docs.tangle.tools/developers/blueprint-macros/event-listeners2024-11-07T16:58:46.929Zdaily0.7 +https://docs.tangle.tools/developers/blueprint-macros/jobs2024-11-07T16:58:46.929Zdaily0.7 +https://docs.tangle.tools/developers/blueprint-macros/reports2024-11-07T16:58:46.929Zdaily0.7 +https://docs.tangle.tools/developers/blueprints/introduction2024-11-07T16:58:46.929Zdaily0.7 +https://docs.tangle.tools/developers/blueprints/manager2024-11-07T16:58:46.929Zdaily0.7 +https://docs.tangle.tools/developers/blueprints/use-cases2024-11-07T16:58:46.929Zdaily0.7 +https://docs.tangle.tools/developers/cli/installation2024-11-07T16:58:46.929Zdaily0.7 +https://docs.tangle.tools/developers/cli/quickstart2024-11-07T16:58:46.929Zdaily0.7 +https://docs.tangle.tools/developers/cli/reference2024-11-07T16:58:46.929Zdaily0.7 +https://docs.tangle.tools/developers/contribute2024-11-07T16:58:46.929Zdaily0.7 +https://docs.tangle.tools/developers/eigenlayer-avs2024-11-07T16:58:46.929Zdaily0.7 +https://docs.tangle.tools/developers/endpoints2024-11-07T16:58:46.929Zdaily0.7 +https://docs.tangle.tools/developers/gadget-sdk2024-11-07T16:58:46.929Zdaily0.7 +https://docs.tangle.tools/developers/tangle-avs2024-11-07T16:58:46.929Zdaily0.7 +https://docs.tangle.tools/developers/technicals/addresses2024-11-07T16:58:46.929Zdaily0.7 +https://docs.tangle.tools/developers/technicals/deploy-using-hardhat2024-11-07T16:58:46.929Zdaily0.7 +https://docs.tangle.tools/developers/technicals/evm-substrate-transfers2024-11-07T16:58:46.929Zdaily0.7 +https://docs.tangle.tools/developers/technicals/json-rpc-endpoints2024-11-07T16:58:46.929Zdaily0.7 +https://docs.tangle.tools/developers/technicals/precompiles2024-11-07T16:58:46.929Zdaily0.7 +https://docs.tangle.tools/developers/technicals/transaction-fees2024-11-07T16:58:46.929Zdaily0.7 +https://docs.tangle.tools/developers/testing-with-tangle2024-11-07T16:58:46.929Zdaily0.7 +https://docs.tangle.tools/developers/troubleshooting2024-11-07T16:58:46.929Zdaily0.7 +https://docs.tangle.tools/network/account-manage2024-11-07T16:58:46.929Zdaily0.7 +https://docs.tangle.tools/network/claim-airdrop2024-11-07T16:58:46.929Zdaily0.7 +https://docs.tangle.tools/network/differences2024-11-07T16:58:46.929Zdaily0.7 +https://docs.tangle.tools/network/governance/democracy-voting2024-11-07T16:58:46.929Zdaily0.7 +https://docs.tangle.tools/network/governance/governance-parameters2024-11-07T16:58:46.929Zdaily0.7 +https://docs.tangle.tools/network/governance/governance-procedures2024-11-07T16:58:46.929Zdaily0.7 +https://docs.tangle.tools/network/governance/overview2024-11-07T16:58:46.929Zdaily0.7 +https://docs.tangle.tools/network/governance/proposal-creation2024-11-07T16:58:46.929Zdaily0.7 +https://docs.tangle.tools/network/launch2024-11-07T16:58:46.929Zdaily0.7 +https://docs.tangle.tools/network/network-parameters2024-11-07T16:58:46.929Zdaily0.7 +https://docs.tangle.tools/network/overview2024-11-07T16:58:46.929Zdaily0.7 +https://docs.tangle.tools/network/set-identity2024-11-07T16:58:46.929Zdaily0.7 +https://docs.tangle.tools/network/tokenomics/allocation2024-11-07T16:58:46.929Zdaily0.7 +https://docs.tangle.tools/network/tokenomics/inflation2024-11-07T16:58:46.929Zdaily0.7 +https://docs.tangle.tools/network/tokenomics/usage2024-11-07T16:58:46.929Zdaily0.7 +https://docs.tangle.tools/operators/introduction2024-11-07T16:58:46.929Zdaily0.7 +https://docs.tangle.tools/operators/monitoring/alert-manager2024-11-07T16:58:46.929Zdaily0.7 +https://docs.tangle.tools/operators/monitoring/grafana2024-11-07T16:58:46.929Zdaily0.7 +https://docs.tangle.tools/operators/monitoring/loki2024-11-07T16:58:46.929Zdaily0.7 +https://docs.tangle.tools/operators/monitoring/prometheus2024-11-07T16:58:46.929Zdaily0.7 +https://docs.tangle.tools/operators/monitoring/quickstart2024-11-07T16:58:46.929Zdaily0.7 +https://docs.tangle.tools/operators/node-basics/docker-node2024-11-07T16:58:46.929Zdaily0.7 +https://docs.tangle.tools/operators/node-basics/faq2024-11-07T16:58:46.929Zdaily0.7 +https://docs.tangle.tools/operators/node-basics/flags2024-11-07T16:58:46.929Zdaily0.7 +https://docs.tangle.tools/operators/node-basics/hardware2024-11-07T16:58:46.929Zdaily0.7 +https://docs.tangle.tools/operators/node-basics/node-software2024-11-07T16:58:46.929Zdaily0.7 +https://docs.tangle.tools/operators/node-basics/quickstart2024-11-07T16:58:46.929Zdaily0.7 +https://docs.tangle.tools/operators/node-basics/systemd2024-11-07T16:58:46.929Zdaily0.7 +https://docs.tangle.tools/operators/node-basics/troubleshooting2024-11-07T16:58:46.929Zdaily0.7 +https://docs.tangle.tools/operators/tangle-avs/cross-chain2024-11-07T16:58:46.929Zdaily0.7 +https://docs.tangle.tools/operators/tangle-avs/quickstart2024-11-07T16:58:46.929Zdaily0.7 +https://docs.tangle.tools/operators/validator/introduction2024-11-07T16:58:46.929Zdaily0.7 +https://docs.tangle.tools/operators/validator/npos2024-11-07T16:58:46.929Zdaily0.7 +https://docs.tangle.tools/operators/validator/proxyaccount2024-11-07T16:58:46.929Zdaily0.7 +https://docs.tangle.tools/operators/validator/upgrade-node2024-11-07T16:58:46.929Zdaily0.7 +https://docs.tangle.tools/operators/validator/validator-rewards2024-11-07T16:58:46.929Zdaily0.7 +https://docs.tangle.tools/resources/biconomy2024-11-07T16:58:46.929Zdaily0.7 +https://docs.tangle.tools/resources/bridge2024-11-07T16:58:46.929Zdaily0.7 +https://docs.tangle.tools/resources/chainport2024-11-07T16:58:46.929Zdaily0.7 +https://docs.tangle.tools/resources/hyperlane2024-11-07T16:58:46.929Zdaily0.7 +https://docs.tangle.tools/resources/resources2024-11-07T16:58:46.929Zdaily0.7 +https://docs.tangle.tools/resources/router2024-11-07T16:58:46.929Zdaily0.7 +https://docs.tangle.tools/resources/sablier2024-11-07T16:58:46.929Zdaily0.7 +https://docs.tangle.tools/resources/safe2024-11-07T16:58:46.929Zdaily0.7 +https://docs.tangle.tools/restake/create_a_pool/benefits-and-risks2024-11-07T16:58:46.929Zdaily0.7 +https://docs.tangle.tools/restake/create_a_pool/lst-pool-create2024-11-07T16:58:46.929Zdaily0.7 +https://docs.tangle.tools/restake/create_a_pool/lst-pool-create-tangle2024-11-07T16:58:46.929Zdaily0.7 +https://docs.tangle.tools/restake/create_a_pool/pool-roles2024-11-07T16:58:46.929Zdaily0.7 +https://docs.tangle.tools/restake/how_to_restake/how_to_restake_polkadotjs/delegate2024-11-07T16:58:46.929Zdaily0.7 +https://docs.tangle.tools/restake/how_to_restake/how_to_restake_polkadotjs/deposit2024-11-07T16:58:46.929Zdaily0.7 +https://docs.tangle.tools/restake/how_to_restake/how_to_restake_polkadotjs/unstake2024-11-07T16:58:46.929Zdaily0.7 +https://docs.tangle.tools/restake/how_to_restake/how_to_restake_polkadotjs/withdraw2024-11-07T16:58:46.929Zdaily0.7 +https://docs.tangle.tools/restake/how_to_restake/how_to_restake_tangle/delegate2024-11-07T16:58:46.929Zdaily0.7 +https://docs.tangle.tools/restake/how_to_restake/how_to_restake_tangle/deposit2024-11-07T16:58:46.929Zdaily0.7 +https://docs.tangle.tools/restake/how_to_restake/how_to_restake_tangle/unstake2024-11-07T16:58:46.929Zdaily0.7 +https://docs.tangle.tools/restake/how_to_restake/how_to_restake_tangle/withdraw2024-11-07T16:58:46.929Zdaily0.7 +https://docs.tangle.tools/restake/incentives/configs2024-11-07T16:58:46.929Zdaily0.7 +https://docs.tangle.tools/restake/incentives/how_rewards_work2024-11-07T16:58:46.929Zdaily0.7 +https://docs.tangle.tools/restake/incentives/vaults2024-11-07T16:58:46.929Zdaily0.7 +https://docs.tangle.tools/restake/introduction2024-11-07T16:58:46.929Zdaily0.7 +https://docs.tangle.tools/restake/join_a_pool/polkadotjs2024-11-07T16:58:46.929Zdaily0.7 +https://docs.tangle.tools/restake/join_a_pool/tangle2024-11-07T16:58:46.929Zdaily0.7 +https://docs.tangle.tools/restake/join_operator/join2024-11-07T16:58:46.929Zdaily0.7 +https://docs.tangle.tools/restake/join_operator/leave2024-11-07T16:58:46.929Zdaily0.7 +https://docs.tangle.tools/restake/join_operator/stake2024-11-07T16:58:46.929Zdaily0.7 +https://docs.tangle.tools/restake/lst-assets2024-11-07T16:58:46.929Zdaily0.7 +https://docs.tangle.tools/restake/lst-concepts2024-11-07T16:58:46.929Zdaily0.7 +https://docs.tangle.tools/restake/lst-rewards2024-11-07T16:58:46.929Zdaily0.7 +https://docs.tangle.tools/restake/lst-working2024-11-07T16:58:46.929Zdaily0.7 +https://docs.tangle.tools/restake/lst_developers/intro2024-11-07T16:58:46.929Zdaily0.7 +https://docs.tangle.tools/restake/lst_developers/lst_precompile2024-11-07T16:58:46.929Zdaily0.7 +https://docs.tangle.tools/restake/nominator2024-11-07T16:58:46.929Zdaily0.7 +https://docs.tangle.tools/restake/restake-concepts2024-11-07T16:58:46.929Zdaily0.7 +https://docs.tangle.tools/restake/restake-introduction2024-11-07T16:58:46.929Zdaily0.7 +https://docs.tangle.tools/restake/restake_developers/integration2024-11-07T16:58:46.929Zdaily0.7 +https://docs.tangle.tools/restake/restake_developers/restake_precompile2024-11-07T16:58:46.929Zdaily0.7 +https://docs.tangle.tools/restake/restake_developers/services_precompile2024-11-07T16:58:46.929Zdaily0.7 +https://docs.tangle.tools/restake/staking-intro2024-11-07T16:58:46.929Zdaily0.7 + \ No newline at end of file diff --git a/public/sitemap.xml b/public/sitemap.xml new file mode 100644 index 00000000..510d6291 --- /dev/null +++ b/public/sitemap.xml @@ -0,0 +1,4 @@ + + +https://docs.tangle.tools/sitemap-0.xml + \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index b6f4b306..b0f5f631 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2818,10 +2818,17 @@ "@types/hast" "^3.0.4" hast-util-to-html "^9.0.2" -"@shikijs/core@1.2.1": - version "1.2.1" - resolved "https://registry.yarnpkg.com/@shikijs/core/-/core-1.2.1.tgz#df4bdfd20e0492681716eaca51c086a018b2bdb9" - integrity sha512-KaIS0H4EQ3KI2d++TjYqRNgwp8E3M/68e9veR4QtInzA7kKFgcjeiJqb80fuXW+blDy5fmd11PN9g9soz/3ANQ== +"@shikijs/core@1.22.2": + version "1.22.2" + resolved "https://registry.yarnpkg.com/@shikijs/core/-/core-1.22.2.tgz#9c22bd4cc8a4d6c062461cfd35e1faa6c617ca25" + integrity sha512-bvIQcd8BEeR1yFvOYv6HDiyta2FFVePbzeowf5pPS1avczrPK+cjmaxxh0nx5QzbON7+Sv0sQfQVciO7bN72sg== + dependencies: + "@shikijs/engine-javascript" "1.22.2" + "@shikijs/engine-oniguruma" "1.22.2" + "@shikijs/types" "1.22.2" + "@shikijs/vscode-textmate" "^9.3.0" + "@types/hast" "^3.0.4" + hast-util-to-html "^9.0.3" "@shikijs/engine-javascript@1.17.7": version "1.17.7" @@ -2832,6 +2839,15 @@ "@shikijs/vscode-textmate" "^9.2.2" oniguruma-to-js "0.4.3" +"@shikijs/engine-javascript@1.22.2": + version "1.22.2" + resolved "https://registry.yarnpkg.com/@shikijs/engine-javascript/-/engine-javascript-1.22.2.tgz#62e90dbd2ed1d78b972ad7d0a1f8ffaaf5e43279" + integrity sha512-iOvql09ql6m+3d1vtvP8fLCVCK7BQD1pJFmHIECsujB0V32BJ0Ab6hxk1ewVSMFA58FI0pR2Had9BKZdyQrxTw== + dependencies: + "@shikijs/types" "1.22.2" + "@shikijs/vscode-textmate" "^9.3.0" + oniguruma-to-js "0.4.3" + "@shikijs/engine-oniguruma@1.17.7": version "1.17.7" resolved "https://registry.yarnpkg.com/@shikijs/engine-oniguruma/-/engine-oniguruma-1.17.7.tgz#ed5a890a156cb29803368d3506e6cf239e7057bd" @@ -2840,6 +2856,14 @@ "@shikijs/types" "1.17.7" "@shikijs/vscode-textmate" "^9.2.2" +"@shikijs/engine-oniguruma@1.22.2": + version "1.22.2" + resolved "https://registry.yarnpkg.com/@shikijs/engine-oniguruma/-/engine-oniguruma-1.22.2.tgz#b12a44e3faf486e19fbcf8952f4b56b9b9b8d9b8" + integrity sha512-GIZPAGzQOy56mGvWMoZRPggn0dTlBf1gutV5TdceLCZlFNqWmuc7u+CzD0Gd9vQUTgLbrt0KLzz6FNprqYAxlA== + dependencies: + "@shikijs/types" "1.22.2" + "@shikijs/vscode-textmate" "^9.3.0" + "@shikijs/rehype@^1.12.1": version "1.17.7" resolved "https://registry.yarnpkg.com/@shikijs/rehype/-/rehype-1.17.7.tgz#44045fa1b6366f2074eec598f1a7a04769ffb93b" @@ -2868,11 +2892,24 @@ "@shikijs/vscode-textmate" "^9.2.2" "@types/hast" "^3.0.4" +"@shikijs/types@1.22.2": + version "1.22.2" + resolved "https://registry.yarnpkg.com/@shikijs/types/-/types-1.22.2.tgz#695a283f19963fe0638fc2646862ba5cfc4623a8" + integrity sha512-NCWDa6LGZqTuzjsGfXOBWfjS/fDIbDdmVDug+7ykVe1IKT4c1gakrvlfFYp5NhAXH/lyqLM8wsAPo5wNy73Feg== + dependencies: + "@shikijs/vscode-textmate" "^9.3.0" + "@types/hast" "^3.0.4" + "@shikijs/vscode-textmate@^9.2.2": version "9.2.2" resolved "https://registry.yarnpkg.com/@shikijs/vscode-textmate/-/vscode-textmate-9.2.2.tgz#24571f50625c7cd075f9efe0def8b9d2c0930ada" integrity sha512-TMp15K+GGYrWlZM8+Lnj9EaHEFmOen0WJBrfa17hF7taDOYthuPPV0GWzfd/9iMij0akS/8Yw2ikquH7uVi/fg== +"@shikijs/vscode-textmate@^9.3.0": + version "9.3.0" + resolved "https://registry.yarnpkg.com/@shikijs/vscode-textmate/-/vscode-textmate-9.3.0.tgz#b2f1776e488c1d6c2b6cd129bab62f71bbc9c7ab" + integrity sha512-jn7/7ky30idSkd/O5yDBfAnVt+JJpepofP/POZ1iMOxK59cOfqIgg/Dj0eFsjOTMw+4ycJN0uhZH/Eb0bs/EUA== + "@substrate/ss58-registry@^1.44.0": version "1.47.0" resolved "https://registry.yarnpkg.com/@substrate/ss58-registry/-/ss58-registry-1.47.0.tgz#99b11fd3c16657f5eae483b3df7c545ca756d1fc" @@ -6206,7 +6243,7 @@ hast-util-to-estree@^2.0.0: unist-util-position "^4.0.0" zwitch "^2.0.0" -hast-util-to-html@^9.0.2: +hast-util-to-html@^9.0.2, hast-util-to-html@^9.0.3: version "9.0.3" resolved "https://registry.yarnpkg.com/hast-util-to-html/-/hast-util-to-html-9.0.3.tgz#a9999a0ba6b4919576a9105129fead85d37f302b" integrity sha512-M17uBDzMJ9RPCqLMO92gNNUDuBSq10a25SDBI08iCCxmorf4Yy6sYHK57n9WAbRAAaU+DuR4W6GN9K4DFZesYg== @@ -10251,12 +10288,17 @@ shiki@^0.14.3: vscode-oniguruma "^1.7.0" vscode-textmate "^8.0.0" -shiki@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/shiki/-/shiki-1.2.1.tgz#d48bc631f4172afff62a36b2f395f29403b50e71" - integrity sha512-u+XW6o0vCkUNlneZb914dLO+AayEIwK5tI62WeS//R5HIXBFiYaj/Hc5xcq27Yh83Grr4JbNtUBV8W6zyK4hWg== +shiki@^1.22.2: + version "1.22.2" + resolved "https://registry.yarnpkg.com/shiki/-/shiki-1.22.2.tgz#ed109a3d0850504ad5a1edf8496470a2121c5b7b" + integrity sha512-3IZau0NdGKXhH2bBlUk4w1IHNxPh6A5B2sUpyY+8utLu2j/h1QpFkAaUA1bAMxOWWGtTWcAh531vnS4NJKS/lA== dependencies: - "@shikijs/core" "1.2.1" + "@shikijs/core" "1.22.2" + "@shikijs/engine-javascript" "1.22.2" + "@shikijs/engine-oniguruma" "1.22.2" + "@shikijs/types" "1.22.2" + "@shikijs/vscode-textmate" "^9.3.0" + "@types/hast" "^3.0.4" side-channel@^1.0.4, side-channel@^1.0.6: version "1.0.6" @@ -10448,6 +10490,7 @@ stream-length@^1.0.1, stream-length@^1.0.2: bluebird "^2.6.2" "string-width-cjs@npm:string-width@^4.2.0", string-width@^4.1.0: + name string-width-cjs version "4.2.3" resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==