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/capabilities/http.mdx
+5-1Lines changed: 5 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ date: Last Modified
5
5
metadata:
6
6
description: "CRE HTTP capability: fetch offchain data with consensus validation for secure results in your workflows."
7
7
datePublished: "2025-11-04"
8
-
lastModified: "2025-11-04"
8
+
lastModified: "2026-03-17"
9
9
---
10
10
11
11
import { Aside } from"@components"
@@ -27,6 +27,10 @@ This provides cryptographically verified, tamper-proof execution for your offcha
27
27
28
28
</Aside>
29
29
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
+
30
34
## Learn more
31
35
32
36
-**[API Interactions Guide](/cre/guides/workflow/using-http-client)**: Learn how to use the SDK to invoke the HTTP capability.
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**.
15
15
16
16
<PageTabs
17
17
pages={[
@@ -65,7 +65,7 @@ After the script completes, **open a new PowerShell window** and verify the inst
Compare the `Hash` value in the output with the official checksum from the [CRE CLI releases page](https://github.com/smartcontractkit/cre-cli/releases):
97
97
98
98
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)
100
100
3. Under the **Assets** section, locate `cre_windows_amd64.zip`
101
101
4. Compare the SHA-256 checksum shown next to the file with the `Hash` value from your PowerShell output
102
102
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:
104
104
105
105
```
106
106
cre_windows_amd64.zip
@@ -114,7 +114,7 @@ If the checksums match, the file is authentic and safe to install. If they don't
114
114
1. Navigate to the directory where you downloaded the archive.
115
115
1. Right-click the `.zip` file and select **Extract All...**.
116
116
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`.
118
118
119
119
#### 3. Add the CLI to your PATH
120
120
@@ -139,7 +139,7 @@ Open a new **PowerShell** or **Command Prompt** window and run:
139
139
cre version
140
140
```
141
141
142
-
You should see version information: `cre version v1.0.11`.
142
+
You should see version information: `cre version v1.5.0`.
|`--target`| Sets the target environment from your configuration files (e.g., `production-settings`) |
72
72
|`--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 |
73
76
|`--unsigned`| Return the raw transaction instead of broadcasting it to the network |
74
77
|`--yes`| Skip confirmation prompts and proceed with the operation |
75
78
|`--project-root`| Path to the project root directory |
@@ -146,6 +149,86 @@ After a successful deployment, you can verify that your workflow was registered
146
149
147
150
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 <ahref="https://etherscan.io/address/0x4ac54353fa4fa961afcc5ec4b118596d3305e7e5#code"target="_blank"rel="noopener noreferrer">`0x4Ac54353FA4Fa961AfcC5ec4B118596d3305E7e5`</a>.
148
151
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
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
+
149
232
## Using multi-sig wallets
150
233
151
234
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.
Copy file name to clipboardExpand all lines: src/content/cre/guides/workflow/using-evm-client/generating-bindings-go.mdx
+8-3Lines changed: 8 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ date: Last Modified
7
7
metadata:
8
8
description: "Create type-safe contract interfaces: learn to generate Go bindings from smart contract ABIs for safer, cleaner workflow code."
9
9
datePublished: "2025-11-04"
10
-
lastModified: "2026-03-05"
10
+
lastModified: "2026-03-17"
11
11
---
12
12
13
13
import { Aside } from"@components"
@@ -38,7 +38,12 @@ cre generate-bindings evm --language go
38
38
39
39
### Step 1: Add your contract ABI
40
40
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.
42
47
43
48
### Step 2: Generate the bindings
44
49
@@ -48,7 +53,7 @@ From your **project root**, run the binding generator:
48
53
cre generate-bindings evm
49
54
```
50
55
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:
52
57
53
58
-`<ContractName>.go` — The main binding for interacting with the contract
54
59
-`<ContractName>_mock.go` — A mock implementation for testing your workflows without deploying contracts
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.
42
47
43
48
### Step 2: Generate the bindings
44
49
@@ -48,7 +53,7 @@ From your **project root**, run:
48
53
cre generate-bindings evm
49
54
```
50
55
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:
52
57
53
58
-`<ContractName>.ts` — The typed binding class with read, write, and event trigger methods.
54
59
-`<ContractName>_mock.ts` — A mock implementation for testing your workflows without deploying contracts.
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:
return0, 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
+
<Asidetype="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.
0 commit comments