-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' of github.com:smartcontractkit/chainlink into …
…develop
- Loading branch information
Showing
184 changed files
with
2,735 additions
and
1,639 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"chainlink": minor | ||
--- | ||
|
||
#internal Updates required to work with chainlink-common changes to support grpc streams for capabilities |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"chainlink": patch | ||
--- | ||
|
||
core/services/keystore: switch to sqlutil.DataStore #internal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"chainlink": patch | ||
--- | ||
|
||
#wip Regenerate Keystone wrappers |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,24 +9,29 @@ on: | |
jobs: | ||
ci-lint-helm-charts: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
id-token: write | ||
contents: read | ||
actions: read | ||
steps: | ||
- name: Add repositories | ||
run: | | ||
helm repo add mockserver https://www.mock-server.com | ||
helm repo add opentelemetry-collector https://open-telemetry.github.io/opentelemetry-helm-charts | ||
helm repo add tempo https://grafana.github.io/helm-charts | ||
helm repo add grafana https://grafana.github.io/helm-charts | ||
- name: ci-lint-helm-charts | ||
uses: smartcontractkit/.github/actions/ci-lint-charts@6b08487b176ef7cad086526d0b54ddff6691c044 # ci-lint-charts@0.1.2 | ||
uses: smartcontractkit/.github/actions/ci-lint-charts@7fa39741b11e66ed59f8aad786d4b9356c389f3f # ci-lint-charts@0.2.0 | ||
with: | ||
# chart testing inputs | ||
chart-testing-extra-args: "--lint-conf=lintconf.yaml" | ||
charts-dir: charts/chainlink-cluster | ||
# grafana inputs | ||
metrics-job-name: ci-lint-helm-charts | ||
gc-basic-auth: ${{ secrets.GRAFANA_INTERNAL_BASIC_AUTH }} | ||
gc-host: ${{ secrets.GRAFANA_INTERNAL_HOST }} | ||
gc-org-id: ${{ secrets.GRAFANA_INTERNAL_TENANT_ID }} | ||
|
||
ci-kubeconform: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: ci-kubeconform | ||
uses: smartcontractkit/.github/actions/ci-kubeconform@1ae8a9a984814c4daf50aa96f03be2cba0ef3fec # [email protected] | ||
with: | ||
# kubeform inputs | ||
charts-dir: charts/chainlink-cluster | ||
# grafana inputs | ||
metrics-job-name: ci-kubeconform | ||
gc-basic-auth: ${{ secrets.GRAFANA_INTERNAL_BASIC_AUTH }} | ||
gc-host: ${{ secrets.GRAFANA_INTERNAL_HOST }} | ||
gc-org-id: ${{ secrets.GRAFANA_INTERNAL_TENANT_ID }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@chainlink/contracts": patch | ||
--- | ||
|
||
#wip Add Capability Registry skeleton |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.0; | ||
|
||
import {TypeAndVersionInterface} from "../interfaces/TypeAndVersionInterface.sol"; | ||
import {OwnerIsCreator} from "../shared/access/OwnerIsCreator.sol"; | ||
|
||
struct Capability { | ||
// Capability type, e.g. "data-streams-reports" | ||
// bytes32(string); validation regex: ^[a-z0-9_\-:]{1,32}$ | ||
// Not "type" because that's a reserved keyword in Solidity. | ||
bytes32 capabilityType; | ||
// Semver, e.g., "1.2.3" | ||
// bytes32(string); must be valid Semver + max 32 characters. | ||
bytes32 version; | ||
} | ||
|
||
contract CapabilityRegistry is OwnerIsCreator, TypeAndVersionInterface { | ||
mapping(bytes32 => Capability) private s_capabilities; | ||
|
||
event CapabilityAdded(bytes32 indexed capabilityId); | ||
|
||
function typeAndVersion() external pure override returns (string memory) { | ||
return "CapabilityRegistry 1.0.0"; | ||
} | ||
|
||
function addCapability(Capability calldata capability) external onlyOwner { | ||
bytes32 capabilityId = getCapabilityID(capability.capabilityType, capability.version); | ||
s_capabilities[capabilityId] = capability; | ||
emit CapabilityAdded(capabilityId); | ||
} | ||
|
||
function getCapability(bytes32 capabilityID) public view returns (Capability memory) { | ||
return s_capabilities[capabilityID]; | ||
} | ||
|
||
/// @notice This functions returns a Capability ID packed into a bytes32 for cheaper access | ||
/// @return A unique identifier for the capability | ||
function getCapabilityID(bytes32 capabilityType, bytes32 version) public pure returns (bytes32) { | ||
return keccak256(abi.encodePacked(capabilityType, version)); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.19; | ||
|
||
import {Test} from "forge-std/Test.sol"; | ||
import {Capability, CapabilityRegistry} from "../CapabilityRegistry.sol"; | ||
|
||
contract CapabilityRegistryTest is Test { | ||
function setUp() public virtual {} | ||
|
||
function testAddCapability() public { | ||
CapabilityRegistry capabilityRegistry = new CapabilityRegistry(); | ||
|
||
capabilityRegistry.addCapability(Capability("data-streams-reports", "1.0.0")); | ||
|
||
bytes32 capabilityId = capabilityRegistry.getCapabilityID(bytes32("data-streams-reports"), bytes32("1.0.0")); | ||
Capability memory capability = capabilityRegistry.getCapability(capabilityId); | ||
|
||
assertEq(capability.capabilityType, "data-streams-reports"); | ||
assertEq(capability.version, "1.0.0"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.