Skip to content

Commit bd60e8d

Browse files
committed
update content up to 1.5.0, new features, small tickets, other feedback
1 parent 028facb commit bd60e8d

19 files changed

Lines changed: 1099 additions & 132 deletions

src/content/cre/capabilities/http.mdx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ date: Last Modified
55
metadata:
66
description: "CRE HTTP capability: fetch offchain data with consensus validation for secure results in your workflows."
77
datePublished: "2025-11-04"
8-
lastModified: "2025-11-04"
8+
lastModified: "2026-03-17"
99
---
1010

1111
import { Aside } from "@components"
@@ -27,6 +27,10 @@ This provides cryptographically verified, tamper-proof execution for your offcha
2727

2828
</Aside>
2929

30+
## Features
31+
32+
- **Multiple headers per request**: Use the `MultiHeaders` field to send multiple headers in a single HTTP request. This is useful for APIs that require multiple authentication or content negotiation headers simultaneously.
33+
3034
## Learn more
3135

3236
- **[API Interactions Guide](/cre/guides/workflow/using-http-client)**: Learn how to use the SDK to invoke the HTTP capability.

src/content/cre/getting-started/cli-installation/macos-linux.mdx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ title: "Installing the CRE CLI on macOS and Linux"
55
metadata:
66
description: "Install the CRE CLI on macOS or Linux: choose automatic script or manual setup, verify integrity, and get ready to build workflows."
77
datePublished: "2025-11-04"
8-
lastModified: "2026-02-26"
8+
lastModified: "2026-03-17"
99
---
1010

1111
import { Aside, CopyText, PageTabs } from "@components"
1212
import { DownloadButton } from "~/components/DownloadButton.tsx"
1313

14-
This page explains how to install the CRE CLI on macOS or Linux. The recommended version at the time of writing is **v1.2.0**.
14+
This page explains how to install the CRE CLI on macOS or Linux. The recommended version at the time of writing is **v1.5.0**.
1515

1616
<PageTabs
1717
pages={[
@@ -66,7 +66,7 @@ After the script completes, verify the installation:
6666
cre version
6767
```
6868

69-
**Expected output:** `CRE CLI version v1.2.0`
69+
**Expected output:** `CRE CLI version v1.5.0`
7070

7171
<Aside type="note" title="macOS Gatekeeper">
7272
If you see warnings about "unrecognized developer/source" on macOS, run:{" "}
@@ -120,11 +120,11 @@ shasum -a 256 cre_darwin_arm64.zip
120120
Compare the output with the official checksum from the [CRE CLI releases page](https://github.com/smartcontractkit/cre-cli/releases):
121121

122122
1. Go to https://github.com/smartcontractkit/cre-cli/releases
123-
1. Find the release version you downloaded (e.g., v1.0.11)
123+
1. Find the release version you downloaded (e.g., v1.5.0)
124124
1. Under the **Assets** section, locate your downloaded file
125125
1. Compare the SHA-256 checksum shown next to the file with your command output
126126

127-
**Example:** For `cre_darwin_arm64.zip` in release v1.0.11, you'll see something like:
127+
**Example:** For `cre_darwin_arm64.zip` in release v1.5.0, you'll see something like:
128128

129129
```
130130
cre_darwin_arm64.zip
@@ -154,7 +154,7 @@ If the checksums match, the file is authentic and safe to install. If they don't
154154
1. **Rename the extracted binary to `cre`**
155155

156156
```bash
157-
mv cre_v1.0.11_darwin_arm64 cre
157+
mv cre_v1.5.0_darwin_arm64 cre
158158
```
159159

160160
1. **Make it executable**:
@@ -227,7 +227,7 @@ cre version
227227

228228
**Expected output:**
229229

230-
You should see version information: `cre version v1.0.11`.
230+
You should see version information: `cre version v1.5.0`.
231231

232232
**If it doesn't work:**
233233

src/content/cre/getting-started/cli-installation/windows.mdx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ title: "Installing the CRE CLI on Windows"
55
metadata:
66
description: "Install the CRE CLI on Windows: use PowerShell for quick setup or manual installation, verify integrity, and start building workflows."
77
datePublished: "2025-11-04"
8-
lastModified: "2026-02-26"
8+
lastModified: "2026-03-17"
99
---
1010

1111
import { Aside, CopyText, PageTabs } from "@components"
1212
import { DownloadButton } from "~/components/DownloadButton.tsx"
1313

14-
This page explains how to install the Chainlink Developer Platform CLI (also referred to as the CRE CLI) on Windows. The recommended version at the time of writing is **v1.2.0**.
14+
This page explains how to install the Chainlink Developer Platform CLI (also referred to as the CRE CLI) on Windows. The recommended version at the time of writing is **v1.5.0**.
1515

1616
<PageTabs
1717
pages={[
@@ -65,7 +65,7 @@ After the script completes, **open a new PowerShell window** and verify the inst
6565
cre version
6666
```
6767

68-
**Expected output:** `CRE CLI version v1.2.0`
68+
**Expected output:** `CRE CLI version v1.5.0`
6969

7070
### Manual installation
7171

@@ -96,11 +96,11 @@ Get-FileHash cre_windows_amd64.zip -Algorithm SHA256
9696
Compare the `Hash` value in the output with the official checksum from the [CRE CLI releases page](https://github.com/smartcontractkit/cre-cli/releases):
9797

9898
1. Go to https://github.com/smartcontractkit/cre-cli/releases
99-
2. Find the release version you downloaded (e.g., v1.0.11)
99+
2. Find the release version you downloaded (e.g., v1.5.0)
100100
3. Under the **Assets** section, locate `cre_windows_amd64.zip`
101101
4. Compare the SHA-256 checksum shown next to the file with the `Hash` value from your PowerShell output
102102

103-
**Example:** For `cre_windows_amd64.zip` in release v1.0.11, you'll see something like:
103+
**Example:** For `cre_windows_amd64.zip` in release v1.5.0, you'll see something like:
104104

105105
```
106106
cre_windows_amd64.zip
@@ -114,7 +114,7 @@ If the checksums match, the file is authentic and safe to install. If they don't
114114
1. Navigate to the directory where you downloaded the archive.
115115
1. Right-click the `.zip` file and select **Extract All...**.
116116
1. Choose a permanent location for the extracted folder (e.g., `C:\Program Files\cre-cli`).
117-
1. Inside the extracted folder, rename the file `cre_v1.0.11_windows_amd64.exe` to `cre.exe`.
117+
1. Inside the extracted folder, rename the file `cre_v1.5.0_windows_amd64.exe` to `cre.exe`.
118118

119119
#### 3. Add the CLI to your PATH
120120

@@ -139,7 +139,7 @@ Open a new **PowerShell** or **Command Prompt** window and run:
139139
cre version
140140
```
141141

142-
You should see version information: `cre version v1.0.11`.
142+
You should see version information: `cre version v1.5.0`.
143143

144144
## Next steps
145145

src/content/cre/guides/operations/deploying-workflows.mdx

Lines changed: 84 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ title: "Deploying Workflows"
55
metadata:
66
description: "Deploy your workflow: learn how to register your workflow and start running it across a Decentralized Oracle Network (DON)."
77
datePublished: "2025-11-04"
8-
lastModified: "2026-02-12"
8+
lastModified: "2026-03-17"
99
---
1010

1111
import { Aside } from "@components"
@@ -70,6 +70,9 @@ cre workflow deploy my-workflow --target production-settings
7070
| ---------------- | --------------------------------------------------------------------------------------- |
7171
| `--target` | Sets the target environment from your configuration files (e.g., `production-settings`) |
7272
| `--output` | The output file for the compiled WASM binary (default: `"./binary.wasm.br.b64"`) |
73+
| `--wasm` | Path to a pre-built WASM binary (skips compilation). Useful in CI/CD pipelines |
74+
| `--config` | Override the config file path from `workflow.yaml` |
75+
| `--no-config` | Deploy without a config file |
7376
| `--unsigned` | Return the raw transaction instead of broadcasting it to the network |
7477
| `--yes` | Skip confirmation prompts and proceed with the operation |
7578
| `--project-root` | Path to the project root directory |
@@ -146,6 +149,86 @@ After a successful deployment, you can verify that your workflow was registered
146149

147150
1. **Block Explorer**: Check the Workflow Registry contract on a block explorer. The CLI output will provide the transaction hash for the registration. The `WorkflowRegistry` contract is deployed on **Ethereum Mainnet** at the address <a href="https://etherscan.io/address/0x4ac54353fa4fa961afcc5ec4b118596d3305e7e5#code" target="_blank" rel="noopener noreferrer">`0x4Ac54353FA4Fa961AfcC5ec4B118596d3305E7e5`</a>.
148151

152+
## CI/CD pipeline integration
153+
154+
The `cre workflow build` and `cre workflow deploy` commands can be run as independent steps, making it straightforward to integrate CRE deployments into CI/CD pipelines.
155+
156+
The separation gives you two key benefits:
157+
158+
- **Build once, deploy many times** — Compile your workflow to a WASM binary in a build step, then promote that exact binary to staging and production without recompiling. This ensures the artifact you tested is the artifact you deploy.
159+
- **Verify before deploying** — Use `cre workflow hash` after building to record and verify content hashes before submitting a deployment transaction.
160+
161+
### Example: GitHub Actions
162+
163+
The following example shows a two-job pipeline: a `build` job that compiles and uploads the WASM artifact, and a `deploy` job that downloads and deploys that exact binary.
164+
165+
```yaml
166+
# .github/workflows/deploy.yml
167+
name: Deploy Workflow
168+
169+
on:
170+
push:
171+
branches: [main]
172+
173+
jobs:
174+
build:
175+
runs-on: ubuntu-latest
176+
steps:
177+
- uses: actions/checkout@v4
178+
179+
- name: Install CRE CLI
180+
run: curl -sSL https://github.com/smartcontractkit/cre-cli/releases/latest/download/install.sh | sh
181+
182+
- name: Build workflow
183+
run: cre workflow build ./my-workflow --output ./my-workflow/binary.wasm
184+
env:
185+
CRE_API_KEY: ${{ secrets.CRE_API_KEY }}
186+
187+
- name: Display content hashes
188+
run: cre workflow hash ./my-workflow --wasm ./my-workflow/binary.wasm --target production-settings
189+
env:
190+
CRE_API_KEY: ${{ secrets.CRE_API_KEY }}
191+
CRE_ETH_PRIVATE_KEY: ${{ secrets.CRE_ETH_PRIVATE_KEY }}
192+
193+
- name: Upload artifact
194+
uses: actions/upload-artifact@v4
195+
with:
196+
name: workflow-binary
197+
path: ./my-workflow/binary.wasm
198+
199+
deploy:
200+
needs: build
201+
runs-on: ubuntu-latest
202+
steps:
203+
- uses: actions/checkout@v4
204+
205+
- name: Install CRE CLI
206+
run: curl -sSL https://github.com/smartcontractkit/cre-cli/releases/latest/download/install.sh | sh
207+
208+
- name: Download artifact
209+
uses: actions/download-artifact@v4
210+
with:
211+
name: workflow-binary
212+
path: ./my-workflow
213+
214+
- name: Deploy workflow
215+
run: cre workflow deploy ./my-workflow --wasm ./my-workflow/binary.wasm --target production-settings --yes
216+
env:
217+
CRE_API_KEY: ${{ secrets.CRE_API_KEY }}
218+
CRE_ETH_PRIVATE_KEY: ${{ secrets.CRE_ETH_PRIVATE_KEY }}
219+
INFURA_API_KEY: ${{ secrets.INFURA_API_KEY }}
220+
```
221+
222+
{/* prettier-ignore */}
223+
<Aside type="note" title="API key authentication">
224+
Use `CRE_API_KEY` for non-interactive authentication in CI/CD pipelines instead of `cre login`. Create an API key from the CRE platform under **Organization → APIs**. See [Authentication](/cre/reference/cli/authentication#api-key-authentication) for setup instructions.
225+
</Aside>
226+
227+
{/* prettier-ignore */}
228+
<Aside type="note" title="RPC URLs in CI/CD">
229+
Use `${VAR_NAME}` syntax in your `project.yaml` RPC URLs to inject secrets from your CI/CD environment. See [Environment variable interpolation in RPC URLs](/cre/reference/project-configuration#environment-variable-interpolation-in-rpc-urls) for details.
230+
</Aside>
231+
149232
## Using multi-sig wallets
150233

151234
The `deploy` command supports multi-sig wallets through the `--unsigned` flag. When using this flag, the CLI generates raw transaction data that you can submit through your multi-sig wallet interface instead of sending the transaction directly.

src/content/cre/guides/workflow/using-evm-client/generating-bindings-go.mdx

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ date: Last Modified
77
metadata:
88
description: "Create type-safe contract interfaces: learn to generate Go bindings from smart contract ABIs for safer, cleaner workflow code."
99
datePublished: "2025-11-04"
10-
lastModified: "2026-03-05"
10+
lastModified: "2026-03-17"
1111
---
1212

1313
import { Aside } from "@components"
@@ -38,7 +38,12 @@ cre generate-bindings evm --language go
3838

3939
### Step 1: Add your contract ABI
4040

41-
Place your contract's ABI JSON file into the `contracts/evm/src/abi/` directory. For example, to generate bindings for a `PriceUpdater` contract, you would create `contracts/evm/src/abi/PriceUpdater.abi` with your ABI content.
41+
Place your contract ABI file into the `contracts/evm/src/abi/` directory. Two file formats are supported:
42+
43+
- **`*.abi`** — A raw JSON array of ABI entries, as produced by `solc` or extracted from a compiled artifact
44+
- **`*.json`** — A compiled artifact file (Hardhat, Foundry, or similar) with a top-level `"abi"` field
45+
46+
For example, to generate bindings for a `PriceUpdater` contract, create either `contracts/evm/src/abi/PriceUpdater.abi` or `contracts/evm/src/abi/PriceUpdater.json`. Both formats can coexist in the same directory.
4247

4348
### Step 2: Generate the bindings
4449

@@ -48,7 +53,7 @@ From your **project root**, run the binding generator:
4853
cre generate-bindings evm
4954
```
5055

51-
This command scans all `.abi` files in `contracts/evm/src/abi/` and generates corresponding Go packages in `contracts/evm/src/generated/`. For each contract, two files are generated:
56+
This command scans all `.abi` and `.json` files in `contracts/evm/src/abi/` and generates corresponding Go packages in `contracts/evm/src/generated/`. For each contract, two files are generated:
5257

5358
- `<ContractName>.go` — The main binding for interacting with the contract
5459
- `<ContractName>_mock.go` — A mock implementation for testing your workflows without deploying contracts

src/content/cre/guides/workflow/using-evm-client/generating-bindings-ts.mdx

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ date: Last Modified
77
metadata:
88
description: "Create type-safe contract interfaces: learn to generate TypeScript bindings from smart contract ABIs for safer, cleaner workflow code."
99
datePublished: "2026-03-05"
10-
lastModified: "2026-03-05"
10+
lastModified: "2026-03-17"
1111
---
1212

1313
import { Aside } from "@components"
@@ -38,7 +38,12 @@ cre generate-bindings evm --language typescript
3838

3939
### Step 1: Add your contract ABI
4040

41-
Place your contract's ABI JSON file into the `contracts/evm/src/abi/` directory. For example, to generate bindings for a `PriceUpdater` contract, create `contracts/evm/src/abi/PriceUpdater.abi` with your ABI content.
41+
Place your contract ABI file into the `contracts/evm/src/abi/` directory. Two file formats are supported:
42+
43+
- **`*.abi`** — A raw JSON array of ABI entries, as produced by `solc` or extracted from a compiled artifact
44+
- **`*.json`** — A compiled artifact file (Hardhat, Foundry, or similar) with a top-level `"abi"` field
45+
46+
For example, to generate bindings for a `PriceUpdater` contract, create either `contracts/evm/src/abi/PriceUpdater.abi` or `contracts/evm/src/abi/PriceUpdater.json`. Both formats can coexist in the same directory.
4247

4348
### Step 2: Generate the bindings
4449

@@ -48,7 +53,7 @@ From your **project root**, run:
4853
cre generate-bindings evm
4954
```
5055

51-
This scans all `.abi` files in `contracts/evm/src/abi/` and generates corresponding TypeScript files in `contracts/evm/ts/generated/`. For each contract, three files are generated:
56+
This scans all `.abi` and `.json` files in `contracts/evm/src/abi/` and generates corresponding TypeScript files in `contracts/evm/ts/generated/`. For each contract, three files are generated:
5257

5358
- `<ContractName>.ts` — The typed binding class with read, write, and event trigger methods.
5459
- `<ContractName>_mock.ts` — A mock implementation for testing your workflows without deploying contracts.

src/content/cre/guides/workflow/using-http-client/get-request-go.mdx

Lines changed: 52 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ pageId: "guides-workflow-http-get-request"
77
metadata:
88
description: "Fetch data from APIs in Go: learn to make GET requests with consensus validation to bring offchain data into your workflow."
99
datePublished: "2025-11-04"
10-
lastModified: "2026-02-03"
10+
lastModified: "2026-03-17"
1111
---
1212

1313
import { Aside } from "@components"
@@ -221,3 +221,54 @@ func onCronTrigger(config *Config, runtime cre.Runtime, trigger *cron.Payload) (
221221
## Customizing your requests
222222

223223
The `http.Request` struct provides several fields to customize your request. See the [HTTP Client SDK Reference](/cre/reference/sdk/http-client) for a full list of options.
224+
225+
## Best practices
226+
227+
### Parse inside the node function, not outside it
228+
229+
When using a numeric aggregation method such as `ConsensusMedianAggregation` or a median field tag, the value returned from your node function must be a numeric type. If your node function returns a raw HTTP response body (a string), consensus will fail with an error like:
230+
231+
```
232+
unsupported type for median aggregation: *pb.Value_StringValue
233+
```
234+
235+
This commonly happens when an endpoint returns an error body — for example, `"error"` or a JSON error object — and the node function passes that string directly to the aggregation step instead of parsing it first.
236+
237+
**Incorrect pattern** — returning a raw string that gets passed to median:
238+
239+
```go
240+
func fetchData(config *Config, nodeRuntime cre.NodeRuntime) (string, error) {
241+
// ...
242+
return resp.Body, nil // ❌ raw string; will fail if aggregation is median
243+
}
244+
```
245+
246+
**Correct pattern** — parse inside the node function and return a numeric value:
247+
248+
```go
249+
func fetchData(config *Config, nodeRuntime cre.NodeRuntime) (float64, error) {
250+
client := &http.Client{}
251+
resp, err := client.SendRequest(nodeRuntime, &http.Request{
252+
Url: config.ApiUrl,
253+
Method: "GET",
254+
}).Await()
255+
if err != nil {
256+
return 0, fmt.Errorf("request failed: %w", err) // ✓ return error, not a string
257+
}
258+
259+
var data struct {
260+
Price float64 `json:"price"`
261+
}
262+
if err := json.Unmarshal([]byte(resp.Body), &data); err != nil {
263+
return 0, fmt.Errorf("failed to parse response body %q: %w", resp.Body, err) // ✓ return error
264+
}
265+
return data.Price, nil // ✓ return the numeric value
266+
}
267+
```
268+
269+
If the endpoint is down or returns an unexpected body, returning an error (rather than the raw string) causes the node to report a failure to the consensus mechanism, which handles node-level failures gracefully.
270+
271+
{/* prettier-ignore */}
272+
<Aside type="note" title="Confidential HTTP">
273+
This parsing requirement applies to standard HTTP requests. When using the [Confidential HTTP capability](/cre/capabilities/confidential-http), requests run in a Trusted Execution Environment and the response is not accessible for parsing in node mode.
274+
</Aside>

0 commit comments

Comments
 (0)