Skip to content

Commit

Permalink
Merge branch 'develop' into chore/vrf-881-vrf-882
Browse files Browse the repository at this point in the history
  • Loading branch information
iljapavlovs authored Feb 15, 2024
2 parents 72c46f5 + 009c998 commit 2ad88c2
Show file tree
Hide file tree
Showing 29 changed files with 187 additions and 361 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/ci-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,15 @@ jobs:
pushd $(go list -m -f "{{.Dir}}" github.com/smartcontractkit/chainlink-feeds)
go install ./cmd/chainlink-feeds
popd
pushd $(go list -m -f "{{.Dir}}" github.com/smartcontractkit/chainlink-data-streams)
go install ./mercury/cmd/chainlink-mercury
popd
pushd $(go list -m -f "{{.Dir}}" github.com/smartcontractkit/chainlink-solana)
go install ./pkg/solana/cmd/chainlink-solana
popd
pushd $(go list -m -f "{{.Dir}}" github.com/smartcontractkit/chainlink-starknet/relayer)
go install ./pkg/chainlink/cmd/chainlink-starknet
popd
make install-mercury-loop
- name: Increase Race Timeout
if: github.event.schedule != ''
run: |
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ jobs:
- '.github/workflows/integration-tests.yml'
- '**/*Dockerfile'
- 'core/**/config/**/*.toml'
- 'integration-tests/**/*.toml'
- name: Collect Metrics
if: always()
id: collect-gha-metrics
Expand Down
5 changes: 0 additions & 5 deletions GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,6 @@ chainlink-local-start:
install-medianpoc: ## Build & install the chainlink-medianpoc binary.
go install $(GOFLAGS) ./plugins/cmd/chainlink-medianpoc

.PHONY: install-mercury-loop
install-mercury-loop: ## Build & install the chainlink-medianpoc binary.
go install $(GOFLAGS) ./plugins/cmd/chainlink-mercury


.PHONY: docker ## Build the chainlink docker image
docker:
docker buildx build \
Expand Down
2 changes: 1 addition & 1 deletion charts/chainlink-cluster/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ replace (
github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1

// until merged upstream: https://github.com/hashicorp/go-plugin/pull/257
github.com/hashicorp/go-plugin => github.com/smartcontractkit/go-plugin v0.0.0-20231003134350-e49dad63b306
github.com/hashicorp/go-plugin => github.com/smartcontractkit/go-plugin v0.0.0-20240208201424-b3b91517de16

// until merged upstream: https://github.com/mwitkow/grpc-proxy/pull/69
github.com/mwitkow/grpc-proxy => github.com/smartcontractkit/grpc-proxy v0.0.0-20230731113816-f1be6620749f
Expand Down
29 changes: 24 additions & 5 deletions contracts/STYLE_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -239,12 +239,10 @@ Here are some examples of what this should look like:

```solidity
contract AccessControlledFoo is Foo {
// solhint-disable-next-line chainlink-solidity/all-caps-constant-storage-variables
string public constant override typeAndVersion = "AccessControlledFoo 1.0.0";
}
contract OffchainAggregator is ITypeAndVersion {
// solhint-disable-next-line chainlink-solidity/all-caps-constant-storage-variables
string public constant override typeAndVersion = "OffchainAggregator 1.0.0";
function getData() public returns(uint256) {
Expand All @@ -256,8 +254,6 @@ contract OffchainAggregator is ITypeAndVersion {
contract SuperDuperAggregator is ITypeAndVersion {
/// This is a new contract that has not been released yet, so we
/// add a `-dev` suffix to the typeAndVersion.
// solhint-disable-next-line chainlink-solidity/all-caps-constant-storage-variables
string public constant override typeAndVersion = "SuperDuperAggregator 1.1.0-dev";
function getData() public returns(uint256) {
Expand Down Expand Up @@ -388,4 +384,27 @@ rule: `custom-errors`

Interfaces should be named `IFoo` instead of `FooInterface`. This follows the patterns of popular [libraries like OpenZeppelin’s](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/IERC20.sol#L9).

rule: `tbd`
rule: `tbd`

## Structs

Structs should be constructed with named arguments. This prevents accidental assignment to the wrong field and makes the code more readable.

```solidity
// Good
function setConfig(uint64 _foo, uint64 _bar, uint64 _baz) external {
config = Config({
foo: _foo,
bar: _bar,
baz: _baz
});
}
// Bad
function setConfig(uint64 _foo, uint64 _bar, uint64 _baz) external {
config = Config(_foo, _bar, _baz);
}
```

rule: `tbd`

4 changes: 2 additions & 2 deletions core/scripts/gateway/connector/run_connector.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ import (
"os/signal"

"github.com/ethereum/go-ethereum/crypto"
"github.com/jonboulle/clockwork"
"github.com/pelletier/go-toml/v2"

"github.com/smartcontractkit/chainlink/v2/core/logger"
"github.com/smartcontractkit/chainlink/v2/core/services/gateway/api"
"github.com/smartcontractkit/chainlink/v2/core/services/gateway/common"
"github.com/smartcontractkit/chainlink/v2/core/services/gateway/connector"
"github.com/smartcontractkit/chainlink/v2/core/utils"
)

// Script to run Connector outside of the core node.
Expand Down Expand Up @@ -69,7 +69,7 @@ func main() {
sampleKey, _ := crypto.HexToECDSA("cd47d3fafdbd652dd2b66c6104fa79b372c13cb01f4a4fbfc36107cce913ac1d")
lggr, _ := logger.NewLogger()
client := &client{privateKey: sampleKey, lggr: lggr}
connector, _ := connector.NewGatewayConnector(&cfg, client, client, utils.NewRealClock(), lggr)
connector, _ := connector.NewGatewayConnector(&cfg, client, client, clockwork.NewRealClock(), lggr)
client.connector = connector

ctx, _ := signal.NotifyContext(context.Background(), os.Interrupt)
Expand Down
25 changes: 13 additions & 12 deletions core/scripts/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ require (
github.com/google/uuid v1.4.0
github.com/jmoiron/sqlx v1.3.5
github.com/joho/godotenv v1.4.0
github.com/jonboulle/clockwork v0.4.0
github.com/manyminds/api2go v0.0.0-20171030193247-e7b693844a6f
github.com/montanaflynn/stats v0.7.1
github.com/olekukonko/tablewriter v0.0.5
Expand Down Expand Up @@ -170,10 +171,10 @@ require (
github.com/hashicorp/go-envparse v0.1.0 // indirect
github.com/hashicorp/go-hclog v1.5.0 // indirect
github.com/hashicorp/go-immutable-radix v1.3.1 // indirect
github.com/hashicorp/go-plugin v1.5.2 // indirect
github.com/hashicorp/go-plugin v1.6.0 // indirect
github.com/hashicorp/golang-lru v0.6.0 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/hashicorp/yamux v0.0.0-20200609203250-aecfd211c9ce // indirect
github.com/hashicorp/yamux v0.1.1 // indirect
github.com/hdevalence/ed25519consensus v0.1.0 // indirect
github.com/holiman/bloomfilter/v2 v2.0.3 // indirect
github.com/holiman/uint256 v1.2.4 // indirect
Expand Down Expand Up @@ -247,7 +248,7 @@ require (
github.com/sirupsen/logrus v1.9.3 // indirect
github.com/smartcontractkit/caigo v0.0.0-20230621050857-b29a4ca8c704 // indirect
github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240213120401-01a23955f9f8 // indirect
github.com/smartcontractkit/chainlink-data-streams v0.0.0-20231204152908-a6e3fe8ff2a1 // indirect
github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240214203158-47dae5de1336 // indirect
github.com/smartcontractkit/chainlink-feeds v0.0.0-20240119021347-3c541a78cdb8 // indirect
github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240213161921-c4d342b761b0 // indirect
github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240213121419-1272736c2ac0 // indirect
Expand Down Expand Up @@ -297,17 +298,17 @@ require (
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/ratelimit v0.2.0 // indirect
go.uber.org/zap v1.26.0 // indirect
golang.org/x/arch v0.6.0 // indirect
golang.org/x/crypto v0.18.0 // indirect
golang.org/x/exp v0.0.0-20231127185646-65229373498e // indirect
golang.org/x/mod v0.14.0 // indirect
golang.org/x/net v0.20.0 // indirect
golang.org/x/arch v0.7.0 // indirect
golang.org/x/crypto v0.19.0 // indirect
golang.org/x/exp v0.0.0-20240213143201-ec583247a57a // indirect
golang.org/x/mod v0.15.0 // indirect
golang.org/x/net v0.21.0 // indirect
golang.org/x/sync v0.6.0 // indirect
golang.org/x/sys v0.16.0 // indirect
golang.org/x/term v0.16.0 // indirect
golang.org/x/sys v0.17.0 // indirect
golang.org/x/term v0.17.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/time v0.5.0 // indirect
golang.org/x/tools v0.16.0 // indirect
golang.org/x/tools v0.18.0 // indirect
gonum.org/v1/gonum v0.14.0 // indirect
google.golang.org/genproto v0.0.0-20231030173426-d783a09b4405 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20231016165738-49dd2c1f3d0b // indirect
Expand All @@ -330,7 +331,7 @@ replace (
github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1

// until merged upstream: https://github.com/hashicorp/go-plugin/pull/257
github.com/hashicorp/go-plugin => github.com/smartcontractkit/go-plugin v0.0.0-20231003134350-e49dad63b306
github.com/hashicorp/go-plugin => github.com/smartcontractkit/go-plugin v0.0.0-20240208201424-b3b91517de16

// until merged upstream: https://github.com/mwitkow/grpc-proxy/pull/69
github.com/mwitkow/grpc-proxy => github.com/smartcontractkit/grpc-proxy v0.0.0-20230731113816-f1be6620749f
Expand Down
Loading

0 comments on commit 2ad88c2

Please sign in to comment.