Skip to content

Commit 245e9a6

Browse files
committed
delete outdated webhook docs and move webhooks to tokens (#8587)
<!-- ## title your PR with this format: "[SDK/Dashboard/Portal] Feature/Fix: Concise title for the changes" If you did not copy the branch name from Linear, paste the issue tag here (format is TEAM-0000): ## Notes for the reviewer Anything important to call out? Be sure to also clarify these in your comments. ## How to test Unit tests, playground, etc. --> <!-- start pr-codex --> --- ## PR-Codex overview This PR primarily focuses on the addition and enhancement of webhook documentation for both `Tokens` and `Bridge` functionalities in the application, while removing outdated files. ### Detailed summary - Deleted files related to `webhooks` in `portal/src/app`. - Added `webhooks` section in `tokens` documentation with use cases and configuration instructions. - Updated `bridge` documentation to reflect the correct title and description. - Enhanced explanations for creating webhooks in both `tokens` and `bridge` contexts. - Included images for `TokenWebhooksScreen` and `BridgeWebhookScreen`. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex --> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Documentation** * Reorganized webhooks docs into product-specific guides: Bridge (renamed from Payments Webhooks) and Tokens. * Added new Token Webhooks guide with use cases, setup steps, and an illustrative image. * Updated Bridge Webhooks content and dashboard guidance; added visuals and clarified structure and headings. * Removed the generic Webhooks overview in favor of the new guides. * Minor wording improvements in Wallets security docs. <sub>✏️ Tip: You can customize this high-level summary in your review settings.</sub> <!-- end of auto-generated comment: release notes by coderabbit.ai -->
1 parent 8bdc0c0 commit 245e9a6

File tree

9 files changed

+50
-202
lines changed

9 files changed

+50
-202
lines changed
699 KB
Loading

apps/portal/src/app/bridge/webhooks/page.mdx

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import {
22
Callout,
33
OpenSourceCard,
44
createMetadata,
5+
DocImage,
56
InstallTabs,
67
SDKCard,
78
Grid,
@@ -19,25 +20,31 @@ import {
1920
UnrealEngineIcon,
2021
} from "@/icons";
2122

23+
import BridgeWebhookScreen from "./assets/bridge-webhooks.png";
24+
2225
export const metadata = createMetadata({
2326
image: {
24-
title: "Payments Webhooks",
27+
title: "Bridge Webhooks",
2528
icon: "payments",
2629
},
27-
title: "Payments Webhooks",
28-
description: "Learn how to set up and handle webhooks for thirdweb Payments transactions.",
30+
title: "Bridge Webhooks",
31+
description: "Learn how to set up and handle webhooks for thirdweb Bridge transactions.",
2932
});
3033

31-
# Webhooks
34+
# Bridge Webhooks
35+
36+
Create webhooks to be notified on each bridge, swap, and onramp transaction.
3237

33-
Create webhooks to be notified each time a payment is completed in your app.
38+
## Dashboard
3439

35-
## Create a Webhook
40+
You can create a webhook in your project dashboard by navigating to Bridge > Webhooks tab.
3641

37-
You can create a webhook in your project dashboard under the Webhooks > Bridge tab. You'll be prompted to copy a secret key before saving the webhook. This will be used for verification on all webhook requests received by your backend.
42+
You'll be prompted to copy a secret key before saving the webhook. This will be used for verification on all webhook requests received by your backend.
3843

44+
<DocImage src={BridgeWebhookScreen} alt="Project Overview"/>
3945

40-
## Parse Webhook Payload with thirdweb SDK
46+
47+
## Parse Webhook Payload
4148

4249
The thirdweb SDK has a built-in function for parsing bridge webhook payloads
4350

@@ -103,7 +110,6 @@ const payload = await Bridge.Webhook.parse(
103110

104111
```
105112

106-
107113
## Example Payloads
108114

109115
<Tabs defaultValue="bridge">

apps/portal/src/app/tokens/sidebar.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@ export const sidebar: SideBar = {
3737
],
3838
name: "Deploy Tokens",
3939
},
40+
{
41+
href: `${slug}/webhooks`,
42+
name: "Webhooks",
43+
},
4044
],
4145
name: "Guides",
4246
},
695 KB
Loading
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
import { DocImage} from "@doc"
2+
import TokenWebhooksScreen from "./assets/token-webhooks.png"
3+
4+
# Webhooks
5+
6+
You can create webhooks to receive notifications for contract events such as token transfers or state changes or for blockchain transactions on any contract.
7+
8+
With webhooks, you'll receive event data in real-time without making constant requests, reducing RPC load and the risk of missing events.
9+
10+
## Use Cases
11+
12+
Your app may trigger an action when an onchain event occurs, such as:
13+
14+
- ETH or an ERC20 currency is transferred to or from a wallet.
15+
- A token is minted from your NFT collection.
16+
- A token in your NFT collection is burned or transferred.
17+
- Metadata for an oracle contract is updated.
18+
19+
## Create Webhooks
20+
21+
You can configure token webhooks from the dashboard by navigating to your project and selecting Tokens > Webhooks
22+
23+
<DocImage src={TokenWebhooksScreen} alt="Token Webhooks Screen" />
24+
25+
26+
27+
28+
29+
30+

apps/portal/src/app/wallets/security/page.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ The response also arrives in the same payload format. We just perform the steps
196196

197197
## Wallets Audits
198198

199-
View the full audit reports for any wallets related features and specs:
199+
View the full audit reports for any wallets-related features and specs:
200200

201201
- [7702 (Minimal Account)](https://0xmacro.com/library/audits/thirdweb-22)
202202
- [Managed Account Factory](https://ipfs.io/ipfs/Qmc36VUCuwG2u7kZrqmXmJsH5c8sF7SHySVbPnwVmo3XYX/thirdweb%20A-14%20_%20Macro%20Audits%20_%20The%200xMacro%20Library.pdf)

apps/portal/src/app/webhooks/layout.tsx

Lines changed: 0 additions & 19 deletions
This file was deleted.

apps/portal/src/app/webhooks/page.mdx

Lines changed: 0 additions & 160 deletions
This file was deleted.

apps/portal/src/app/webhooks/sidebar.tsx

Lines changed: 0 additions & 13 deletions
This file was deleted.

0 commit comments

Comments
 (0)