You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/content/cre/llms-full-go.txt
+114Lines changed: 114 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -7112,6 +7112,120 @@ Yes. Once you call `runtime.Rand()` and get a `*rand.Rand` object, you can reuse
7112
7112
7113
7113
---
7114
7114
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
- 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:
| 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.
Copy file name to clipboardExpand all lines: src/content/cre/llms-full-ts.txt
+114Lines changed: 114 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -5754,6 +5754,120 @@ WebAssembly provides several benefits for CRE workflows:
5754
5754
5755
5755
---
5756
5756
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
- 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:
| 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.
0 commit comments