Skip to content

Commit fc8141f

Browse files
committed
add templates
1 parent 917cbcc commit fc8141f

File tree

5 files changed

+367
-13
lines changed

5 files changed

+367
-13
lines changed

reports/llms-report.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
{
2-
"startedAt": "2025-11-20T21:23:51.448Z",
2+
"startedAt": "2025-11-20T22:30:43.693Z",
33
"siteBase": "https://docs.chain.link",
44
"sections": [
55
{
66
"section": "cre-go",
7-
"pagesProcessed": 81,
7+
"pagesProcessed": 82,
88
"outputPath": "src/content/cre/llms-full-go.txt",
9-
"bytes": 639578,
10-
"prevBytes": 638965,
11-
"deltaBytes": 613
9+
"bytes": 646607,
10+
"prevBytes": 646607,
11+
"deltaBytes": 0
1212
},
1313
{
1414
"section": "cre-ts",
15-
"pagesProcessed": 76,
15+
"pagesProcessed": 77,
1616
"outputPath": "src/content/cre/llms-full-ts.txt",
17-
"bytes": 595085,
18-
"prevBytes": 594472,
19-
"deltaBytes": 613
17+
"bytes": 602114,
18+
"prevBytes": 602114,
19+
"deltaBytes": 0
2020
},
2121
{
2222
"section": "vrf",
@@ -123,5 +123,5 @@
123123
"deltaBytes": 0
124124
}
125125
],
126-
"finishedAt": "2025-11-20T21:23:55.431Z"
126+
"finishedAt": "2025-11-20T22:30:47.787Z"
127127
}

src/config/sidebar.ts

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -424,9 +424,15 @@ export const SIDEBAR: Partial<Record<Sections, SectionEntry[]>> = {
424424
section: "Templates",
425425
contents: [
426426
{
427-
title: "Running a Demo Workflow",
428-
url: "cre/templates/running-demo-workflow",
429-
highlightAsCurrent: ["cre/templates/running-demo-workflow-ts", "cre/templates/running-demo-workflow-go"],
427+
title: "Building Blocks & Starter Templates",
428+
url: "cre/templates",
429+
children: [
430+
{
431+
title: "Custom Data Feed Template",
432+
url: "cre/templates/running-demo-workflow",
433+
highlightAsCurrent: ["cre/templates/running-demo-workflow-ts", "cre/templates/running-demo-workflow-go"],
434+
},
435+
],
430436
},
431437
],
432438
},

src/content/cre/llms-full-go.txt

Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7112,6 +7112,120 @@ Yes. Once you call `runtime.Rand()` and get a `*rand.Rand` object, you can reuse
71127112

71137113
---
71147114

7115+
# CRE Templates
7116+
Source: https://docs.chain.link/cre/templates
7117+
Last Updated: 2025-11-20
7118+
7119+
CRE <a href="https://github.com/smartcontractkit/cre-templates" target="_blank" rel="noopener noreferrer">Templates</a> are workflow examples that help you learn CRE concepts and accelerate your development. They are curated and maintained
7120+
by Chainlink Labs, offering patterns you can use as references or starting points for your own workflows.
7121+
7122+
7123+
<Aside type="caution" title="Educational Example Disclaimer">
7124+
This page includes educational examples to use a Chainlink system, product, or service and is provided to
7125+
demonstrate how to interact with Chainlink's systems, products, and services to integrate them into your own. This
7126+
template is provided "AS IS" and "AS AVAILABLE" without warranties of any kind, it has not been audited, and it may be
7127+
missing key checks or error handling to make the usage of the system, product or service more clear. Do not use the
7128+
code in this example in a production environment without completing your own audits and application of best practices.
7129+
Neither Chainlink Labs, the Chainlink Foundation, nor Chainlink node operators are responsible for unintended outputs
7130+
that are generated due to errors in code.
7131+
</Aside>
7132+
7133+
## Template types
7134+
7135+
CRE Templates come in two flavors, each designed for different learning and development needs:
7136+
7137+
### 1. Building Blocks
7138+
7139+
Small, focused examples that teach **one concept at a time**. Each Building Block is self-contained and demonstrates a specific CRE capability or pattern. They feature minimal code, clear configuration, and are runnable locally with `cre workflow simulate`.
7140+
7141+
**Available Building Blocks:**
7142+
7143+
1. **`kv-store`** (Key-Value Store with AWS S3)
7144+
- Reads a value from an AWS S3 object, increments it, and writes it back
7145+
- Demonstrates: SigV4-signed HTTP requests, CRE secrets (`AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`), and consensus read → single write flow
7146+
- Use case: Learn offchain write patterns with secrets and consensus
7147+
7148+
2. **`read-data-feeds`** (Chainlink Data Feeds)
7149+
- Reads `decimals()` and `latestAnswer()` from <a href="https://docs.chain.link/data-feeds" target="_blank" rel="noopener noreferrer">Chainlink Data Feeds</a> on a cron schedule
7150+
- Demonstrates: Contract ABIs, Go bindings generation, RPC configuration, and onchain reads
7151+
- Use case: Learn how to read onchain data via contract calls
7152+
7153+
**When to use Building Blocks:**
7154+
7155+
- You want to learn a specific feature quickly (e.g., secrets + HTTP signing, reading a data feed, cron triggers)
7156+
- You need a focused code snippet to copy into your project
7157+
- You're exploring a new capability before integrating it into a larger workflow
7158+
7159+
### 2. Starter Templates
7160+
7161+
Complete, end-to-end workflows that combine multiple capabilities and mirror real-world use cases. These templates are more comprehensive than Building Blocks and include production-like configuration, optional precompiled smart contracts, and generated bindings. They can be adapted directly into your own projects.
7162+
7163+
**Available Starter Templates:**
7164+
7165+
1. **`custom-data-feed`** (Custom Data Feed)
7166+
- Periodically fetches offchain data via HTTP and pushes updates onchain
7167+
- Demonstrates: Cron scheduling, secrets management, contract bindings, and blockchain writes
7168+
- Use case: Build data feeds that combine offchain APIs with onchain smart contracts
7169+
7170+
2. **`bring-your-own-data`** (BYOD - NAV & PoR)
7171+
- End-to-end examples for publishing Net Asset Value (NAV) and Proof of Reserve (PoR) data onchain
7172+
- Demonstrates: Complete workflow with demo contracts for publishing institutional data
7173+
- Use case: Publish verified financial or reserve data to smart contracts
7174+
7175+
3. **`multi-chain-token-manager`** (Multi-Chain Token Manager)
7176+
- Orchestrates token operations and state across multiple blockchain networks
7177+
- Demonstrates: Multi-chain RPC configuration, bindings, and cross-chain coordination patterns
7178+
- Use case: Manage token operations across different EVM chains from a single workflow
7179+
7180+
**When to use Starter Templates:**
7181+
7182+
- You want a runnable reference architecture that shows production-ready patterns
7183+
- You're starting a new project and need a solid foundation
7184+
- You want to see how multiple CRE capabilities integrate in a real workflow
7185+
7186+
## How to access Templates
7187+
7188+
**CRE Templates Repository**
7189+
7190+
All templates are available on GitHub at <a href="https://github.com/smartcontractkit/cre-templates" target="_blank" rel="noopener noreferrer">github.com/smartcontractkit/cre-templates</a>
7191+
7192+
- Browse all Building Blocks and Starter Templates
7193+
- Clone or fork templates to customize them for your use case
7194+
- View individual READMEs for detailed usage instructions
7195+
7196+
<Aside type="tip" title="Quick Start: Custom Data Feed via CLI">
7197+
The **Custom Data Feed** starter template is also available through `cre init` for a guided, interactive setup
7198+
experience. We provide a step-by-step guide: [Running a Demo Workflow](/cre/templates/running-demo-workflow).
7199+
</Aside>
7200+
7201+
## When to use what
7202+
7203+
Choose the right template based on where you are in your CRE journey:
7204+
7205+
| Your Situation | Recommended Action |
7206+
| ------------------------------------------------------------------------ | -------------------------------------------------------------------------------- |
7207+
| Just finished the [Getting Started guide](/cre/getting-started/overview) | Run the **Custom Data Feed** demo to see a more complex, real-world example |
7208+
| Want to learn offchain writes with secrets and consensus | Clone the **`kv-store`** Building Block (AWS S3 example) |
7209+
| Need to read Chainlink Data Feeds in your workflow | Clone the **`read-data-feeds`** Building Block (onchain reads with ABIs) |
7210+
| Building a custom data feed for your protocol | Fork the **`custom-data-feed`** Starter Template and customize it |
7211+
| Publishing NAV or PoR data onchain | Fork the **`bring-your-own-data`** Starter Template (includes demo contracts) |
7212+
| Managing tokens across multiple chains | Fork the **`multi-chain-token-manager`** Starter Template (cross-chain patterns) |
7213+
7214+
## Next steps
7215+
7216+
Ready to explore templates? Here's where to go next:
7217+
7218+
- **[Run the Custom Data Feed Demo](/cre/templates/running-demo-workflow)** - Walk through this template with our step-by-step guide (available in Go and TypeScript)
7219+
7220+
- **[Browse all templates on GitHub](https://github.com/smartcontractkit/cre-templates)** - Explore the full collection of Building Blocks and Starter Templates
7221+
7222+
<Aside type="note" title="Contributing">
7223+
The CRE Templates repository is open source under the MIT license. If you've built a useful workflow pattern and want
7224+
to share it with the community, consider contributing.
7225+
</Aside>
7226+
7227+
---
7228+
71157229
# CLI Reference
71167230
Source: https://docs.chain.link/cre/reference/cli
71177231
Last Updated: 2025-11-20

src/content/cre/llms-full-ts.txt

Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5754,6 +5754,120 @@ WebAssembly provides several benefits for CRE workflows:
57545754

57555755
---
57565756

5757+
# CRE Templates
5758+
Source: https://docs.chain.link/cre/templates
5759+
Last Updated: 2025-11-20
5760+
5761+
CRE <a href="https://github.com/smartcontractkit/cre-templates" target="_blank" rel="noopener noreferrer">Templates</a> are workflow examples that help you learn CRE concepts and accelerate your development. They are curated and maintained
5762+
by Chainlink Labs, offering patterns you can use as references or starting points for your own workflows.
5763+
5764+
5765+
<Aside type="caution" title="Educational Example Disclaimer">
5766+
This page includes educational examples to use a Chainlink system, product, or service and is provided to
5767+
demonstrate how to interact with Chainlink's systems, products, and services to integrate them into your own. This
5768+
template is provided "AS IS" and "AS AVAILABLE" without warranties of any kind, it has not been audited, and it may be
5769+
missing key checks or error handling to make the usage of the system, product or service more clear. Do not use the
5770+
code in this example in a production environment without completing your own audits and application of best practices.
5771+
Neither Chainlink Labs, the Chainlink Foundation, nor Chainlink node operators are responsible for unintended outputs
5772+
that are generated due to errors in code.
5773+
</Aside>
5774+
5775+
## Template types
5776+
5777+
CRE Templates come in two flavors, each designed for different learning and development needs:
5778+
5779+
### 1. Building Blocks
5780+
5781+
Small, focused examples that teach **one concept at a time**. Each Building Block is self-contained and demonstrates a specific CRE capability or pattern. They feature minimal code, clear configuration, and are runnable locally with `cre workflow simulate`.
5782+
5783+
**Available Building Blocks:**
5784+
5785+
1. **`kv-store`** (Key-Value Store with AWS S3)
5786+
- Reads a value from an AWS S3 object, increments it, and writes it back
5787+
- Demonstrates: SigV4-signed HTTP requests, CRE secrets (`AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`), and consensus read → single write flow
5788+
- Use case: Learn offchain write patterns with secrets and consensus
5789+
5790+
2. **`read-data-feeds`** (Chainlink Data Feeds)
5791+
- Reads `decimals()` and `latestAnswer()` from <a href="https://docs.chain.link/data-feeds" target="_blank" rel="noopener noreferrer">Chainlink Data Feeds</a> on a cron schedule
5792+
- Demonstrates: Contract ABIs, Go bindings generation, RPC configuration, and onchain reads
5793+
- Use case: Learn how to read onchain data via contract calls
5794+
5795+
**When to use Building Blocks:**
5796+
5797+
- You want to learn a specific feature quickly (e.g., secrets + HTTP signing, reading a data feed, cron triggers)
5798+
- You need a focused code snippet to copy into your project
5799+
- You're exploring a new capability before integrating it into a larger workflow
5800+
5801+
### 2. Starter Templates
5802+
5803+
Complete, end-to-end workflows that combine multiple capabilities and mirror real-world use cases. These templates are more comprehensive than Building Blocks and include production-like configuration, optional precompiled smart contracts, and generated bindings. They can be adapted directly into your own projects.
5804+
5805+
**Available Starter Templates:**
5806+
5807+
1. **`custom-data-feed`** (Custom Data Feed)
5808+
- Periodically fetches offchain data via HTTP and pushes updates onchain
5809+
- Demonstrates: Cron scheduling, secrets management, contract bindings, and blockchain writes
5810+
- Use case: Build data feeds that combine offchain APIs with onchain smart contracts
5811+
5812+
2. **`bring-your-own-data`** (BYOD - NAV & PoR)
5813+
- End-to-end examples for publishing Net Asset Value (NAV) and Proof of Reserve (PoR) data onchain
5814+
- Demonstrates: Complete workflow with demo contracts for publishing institutional data
5815+
- Use case: Publish verified financial or reserve data to smart contracts
5816+
5817+
3. **`multi-chain-token-manager`** (Multi-Chain Token Manager)
5818+
- Orchestrates token operations and state across multiple blockchain networks
5819+
- Demonstrates: Multi-chain RPC configuration, bindings, and cross-chain coordination patterns
5820+
- Use case: Manage token operations across different EVM chains from a single workflow
5821+
5822+
**When to use Starter Templates:**
5823+
5824+
- You want a runnable reference architecture that shows production-ready patterns
5825+
- You're starting a new project and need a solid foundation
5826+
- You want to see how multiple CRE capabilities integrate in a real workflow
5827+
5828+
## How to access Templates
5829+
5830+
**CRE Templates Repository**
5831+
5832+
All templates are available on GitHub at <a href="https://github.com/smartcontractkit/cre-templates" target="_blank" rel="noopener noreferrer">github.com/smartcontractkit/cre-templates</a>
5833+
5834+
- Browse all Building Blocks and Starter Templates
5835+
- Clone or fork templates to customize them for your use case
5836+
- View individual READMEs for detailed usage instructions
5837+
5838+
<Aside type="tip" title="Quick Start: Custom Data Feed via CLI">
5839+
The **Custom Data Feed** starter template is also available through `cre init` for a guided, interactive setup
5840+
experience. We provide a step-by-step guide: [Running a Demo Workflow](/cre/templates/running-demo-workflow).
5841+
</Aside>
5842+
5843+
## When to use what
5844+
5845+
Choose the right template based on where you are in your CRE journey:
5846+
5847+
| Your Situation | Recommended Action |
5848+
| ------------------------------------------------------------------------ | -------------------------------------------------------------------------------- |
5849+
| Just finished the [Getting Started guide](/cre/getting-started/overview) | Run the **Custom Data Feed** demo to see a more complex, real-world example |
5850+
| Want to learn offchain writes with secrets and consensus | Clone the **`kv-store`** Building Block (AWS S3 example) |
5851+
| Need to read Chainlink Data Feeds in your workflow | Clone the **`read-data-feeds`** Building Block (onchain reads with ABIs) |
5852+
| Building a custom data feed for your protocol | Fork the **`custom-data-feed`** Starter Template and customize it |
5853+
| Publishing NAV or PoR data onchain | Fork the **`bring-your-own-data`** Starter Template (includes demo contracts) |
5854+
| Managing tokens across multiple chains | Fork the **`multi-chain-token-manager`** Starter Template (cross-chain patterns) |
5855+
5856+
## Next steps
5857+
5858+
Ready to explore templates? Here's where to go next:
5859+
5860+
- **[Run the Custom Data Feed Demo](/cre/templates/running-demo-workflow)** - Walk through this template with our step-by-step guide (available in Go and TypeScript)
5861+
5862+
- **[Browse all templates on GitHub](https://github.com/smartcontractkit/cre-templates)** - Explore the full collection of Building Blocks and Starter Templates
5863+
5864+
<Aside type="note" title="Contributing">
5865+
The CRE Templates repository is open source under the MIT license. If you've built a useful workflow pattern and want
5866+
to share it with the community, consider contributing.
5867+
</Aside>
5868+
5869+
---
5870+
57575871
# CLI Reference
57585872
Source: https://docs.chain.link/cre/reference/cli
57595873
Last Updated: 2025-11-20

0 commit comments

Comments
 (0)