-
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' into f_toml_config
- Loading branch information
Showing
85 changed files
with
8,561 additions
and
838 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
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
27 changes: 0 additions & 27 deletions
27
charts/chainlink-cluster/templates/networkpolicy-default-deny.yaml
This file was deleted.
Oops, something went wrong.
41 changes: 41 additions & 0 deletions
41
charts/chainlink-cluster/templates/networkpolicy-default.yaml
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 @@ | ||
apiVersion: networking.k8s.io/v1 | ||
kind: NetworkPolicy | ||
metadata: | ||
name: default | ||
spec: | ||
podSelector: | ||
matchLabels: {} | ||
policyTypes: | ||
- Ingress | ||
- Egress | ||
ingress: | ||
{{- if and .Values.networkPolicyDefault.ingress.allowCustomCidrs (not (empty .Values.networkPolicyDefault.ingress.customCidrs)) }} | ||
# Using a comma separated list to make it easy to pass in with: | ||
# `helm template ... --set networkPolicyDefault.ingress.customCidrs=...` | ||
{{- $cidrs := splitList "," .Values.networkPolicyDefault.ingress.customCidrs }} | ||
- from: | ||
{{- range $cidr := $cidrs }} | ||
- ipBlock: | ||
cidr: {{ $cidr | quote }} | ||
{{- end }} | ||
{{- else }} | ||
# Deny all ingress if no rules are specified. Rules can still be specified in other templates. | ||
- {} | ||
{{- end }} | ||
egress: | ||
- to: | ||
- namespaceSelector: | ||
matchLabels: | ||
kubernetes.io/metadata.name: "{{ $.Release.Namespace }}" | ||
- to: | ||
- namespaceSelector: | ||
matchLabels: | ||
kubernetes.io/metadata.name: kube-system | ||
podSelector: | ||
matchLabels: | ||
k8s-app: kube-dns | ||
ports: | ||
- protocol: TCP | ||
port: 53 | ||
- protocol: UDP | ||
port: 53 |
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
117 changes: 117 additions & 0 deletions
117
contracts/src/v0.8/shared/test/helpers/ChainReaderTestContract.sol
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,117 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8; | ||
|
||
struct TestStruct { | ||
int32 Field; | ||
string DifferentField; | ||
uint8 OracleId; | ||
uint8[32] OracleIds; | ||
address Account; | ||
address[] Accounts; | ||
int192 BigField; | ||
MidLevelTestStruct NestedStruct; | ||
} | ||
|
||
struct MidLevelTestStruct { | ||
bytes2 FixedBytes; | ||
InnerTestStruct Inner; | ||
} | ||
|
||
struct InnerTestStruct { | ||
int64 IntVal; | ||
string S; | ||
} | ||
|
||
contract LatestValueHolder { | ||
event Triggered( | ||
int32 indexed field, | ||
string differentField, | ||
uint8 oracleId, | ||
uint8[32] oracleIds, | ||
address Account, | ||
address[] Accounts, | ||
int192 bigField, | ||
MidLevelTestStruct nestedStruct | ||
); | ||
|
||
event TriggeredEventWithDynamicTopic(string indexed fieldHash, string field); | ||
|
||
// First topic is event hash | ||
event TriggeredWithFourTopics(int32 indexed field1, int32 indexed field2, int32 indexed field3); | ||
|
||
TestStruct[] private s_seen; | ||
uint64[] private s_arr; | ||
|
||
constructor() { | ||
// See chain_reader_interface_tests.go in chainlink-relay | ||
s_arr.push(3); | ||
s_arr.push(4); | ||
} | ||
|
||
function addTestStruct( | ||
int32 field, | ||
string calldata differentField, | ||
uint8 oracleId, | ||
uint8[32] calldata oracleIds, | ||
address account, | ||
address[] calldata accounts, | ||
int192 bigField, | ||
MidLevelTestStruct calldata nestedStruct | ||
) public { | ||
s_seen.push(TestStruct(field, differentField, oracleId, oracleIds, account, accounts, bigField, nestedStruct)); | ||
} | ||
|
||
function returnSeen( | ||
int32 field, | ||
string calldata differentField, | ||
uint8 oracleId, | ||
uint8[32] calldata oracleIds, | ||
address account, | ||
address[] calldata accounts, | ||
int192 bigField, | ||
MidLevelTestStruct calldata nestedStruct | ||
) public pure returns (TestStruct memory) { | ||
return TestStruct(field, differentField, oracleId, oracleIds, account, accounts, bigField, nestedStruct); | ||
} | ||
|
||
function getElementAtIndex(uint256 i) public view returns (TestStruct memory) { | ||
// See chain_reader_interface_tests.go in chainlink-relay | ||
return s_seen[i - 1]; | ||
} | ||
|
||
function getPrimitiveValue() public pure returns (uint64) { | ||
// See chain_reader_interface_tests.go in chainlink-relay | ||
return 3; | ||
} | ||
|
||
function getDifferentPrimitiveValue() public pure returns (uint64) { | ||
// See chain_reader_interface_tests.go in chainlink-relay | ||
return 1990; | ||
} | ||
|
||
function getSliceValue() public view returns (uint64[] memory) { | ||
return s_arr; | ||
} | ||
|
||
function triggerEvent( | ||
int32 field, | ||
string calldata differentField, | ||
uint8 oracleId, | ||
uint8[32] calldata oracleIds, | ||
address account, | ||
address[] calldata accounts, | ||
int192 bigField, | ||
MidLevelTestStruct calldata nestedStruct | ||
) public { | ||
emit Triggered(field, differentField, oracleId, oracleIds, account, accounts, bigField, nestedStruct); | ||
} | ||
|
||
function triggerEventWithDynamicTopic(string calldata field) public { | ||
emit TriggeredEventWithDynamicTopic(field, field); | ||
} | ||
|
||
// first topic is the event signature | ||
function triggerWithFourTopics(int32 field1, int32 field2, int32 field3) public { | ||
emit TriggeredWithFourTopics(field1, field2, field3); | ||
} | ||
} |
Oops, something went wrong.