Skip to content

Commit

Permalink
Merge pull request #1925 from smartcontractkit/release/0.7.0
Browse files Browse the repository at this point in the history
Release/0.7.0
  • Loading branch information
j16r authored Nov 14, 2019
2 parents 5b43ffe + 5fe7c38 commit 85aef95
Show file tree
Hide file tree
Showing 448 changed files with 9,603 additions and 10,655 deletions.
95 changes: 91 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,8 @@ jobs:
- run: ./tools/ci/ethereum_test
- store_artifacts:
path: ./integration/cypress/screenshots
- store_artifacts:
path: ./integration/logs
parity-postgres:
resource_class: xlarge
docker:
Expand Down Expand Up @@ -177,7 +179,10 @@ jobs:
- run: ./tools/ci/ethereum_test parity
- store_artifacts:
path: ./integration/cypress/screenshots
- store_artifacts:
path: ./integration/logs
truffle:
resource_class: large
docker:
- image: smartcontract/builder:1.0.25
steps:
Expand All @@ -194,6 +199,26 @@ jobs:
- /usr/local/share/.cache/yarn
- run: pip3 install -r requirements.txt
- run: ./tools/ci/truffle_test
- store_artifacts:
path: ./integration/logs
json-api-client:
docker:
- image: smartcontract/builder:1.0.25
steps:
- checkout
- run: echo $CACHE_VERSION > cache.version
- restore_cache:
name: Restore Yarn Package Cache
key: v{{ checksum "cache.version" }}-yarn-vendor-{{ checksum "yarn.lock" }}
- run: yarn install
- save_cache:
name: Save Yarn Package Cache
key: v{{ checksum "cache.version" }}-yarn-vendor-{{ checksum "yarn.lock" }}
paths:
- /usr/local/share/.cache/yarn
- run: yarn workspace @chainlink/json-api-client
- store_artifacts:
path: ./integration/logs
operator-ui:
docker:
- image: smartcontract/builder:1.0.25
Expand All @@ -211,6 +236,8 @@ jobs:
- /usr/local/share/.cache/yarn
- run: ./tools/ci/init_gcloud
- run: ./tools/ci/operator_ui_test
- store_artifacts:
path: ./integration/logs
explorer:
working_directory: ~/chainlink
docker:
Expand Down Expand Up @@ -247,9 +274,8 @@ jobs:
- run:
name: Run Client Tests
command: yarn workspace @chainlink/explorer-client run test-ci:silent
- run:
name: Run E2E Tests
command: yarn workspace @chainlink/explorer-client run build && yarn workspace @chainlink/explorer run test-ci:e2e:silent
- store_artifacts:
path: ./integration/logs
forks:
machine:
image: ubuntu-1604:201903-01
Expand All @@ -260,8 +286,12 @@ jobs:
- run:
name: Install Yarn
command: npm install -g yarn
- run:
name: Install New Packages
command: yarn install
- run: ./tools/ci/forks_test

- store_artifacts:
path: ./integration/forks/logs
build-publish-explorer:
machine: true
steps:
Expand All @@ -277,6 +307,17 @@ jobs:
name: Docker push, if applicable
command: |
tools/ci/push_explorer "${CIRCLE_BRANCH}" "${CIRCLE_TAG}"
build-explorer:
machine: true
steps:
- checkout
- run:
name: Docker login
command: |
echo "$DOCKERHUB_PASS" | docker login -u "$DOCKERHUB_USER" --password-stdin
- run:
name: Docker build
command: docker build -f explorer/Dockerfile -t smartcontract/explorer:circleci .
build-publish-chainlink:
machine: true
steps:
Expand All @@ -293,13 +334,42 @@ jobs:
name: Docker push, if applicable
command: |
tools/ci/push_chainlink "${CIRCLE_BRANCH}" "${CIRCLE_TAG}"
build-chainlink:
machine: true
steps:
- checkout
- run:
name: Docker login
command: |
echo "$DOCKERHUB_PASS" | docker login -u "$DOCKERHUB_USER" --password-stdin
- run:
name: Docker build
command: |
DOCKER_TAG=circleci make docker
reportcoverage:
docker:
- image: smartcontract/builder:1.0.25
steps:
- checkout
- run: ./tools/ci/init_gcloud
- run: ./tools/ci/report_coverage
prepublish_npm:
resource_class: large
docker:
- image: smartcontract/builder:1.0.25
steps:
- checkout
- run: echo $CACHE_VERSION > cache.version
- restore_cache:
name: Restore Yarn Package Cache
key: v{{ checksum "cache.version" }}-yarn-vendor-{{ checksum "yarn.lock" }}
- run: yarn install
- save_cache:
name: Save Yarn Package Cache
key: v{{ checksum "cache.version" }}-yarn-vendor-{{ checksum "yarn.lock" }}
paths:
- /usr/local/share/.cache/yarn
- run: ./tools/ci/prepublish_npm_test

workflows:
version: 2
Expand Down Expand Up @@ -329,6 +399,10 @@ workflows:
filters:
tags:
only: /^v.*/
- json-api-client:
filters:
tags:
only: /^v.*/
- operator-ui:
filters:
tags:
Expand All @@ -345,6 +419,18 @@ workflows:
filters:
tags:
only: /^v.*/
- build-chainlink:
filters:
tags:
only: /^v.*/
- build-explorer:
filters:
tags:
only: /^v.*/
- prepublish_npm:
filters:
tags:
only: /^v.*/
- build-publish-explorer:
requires:
- explorer
Expand All @@ -362,6 +448,7 @@ workflows:
- truffle
- geth-postgres
- parity-postgres
- json-api-client
- operator-ui
- rust
filters:
Expand Down
7 changes: 3 additions & 4 deletions .solhintignore
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
node_modules
examples/echo_server/node_modules
examples/uptime_sla/node_modules
examples/twilio_sms/node_modules
examples/testnet/node_modules
examples/testnet/contracts/TestnetConsumer.sol
examples/testnet/contracts/Oracle.sol
examples/testnet/contracts/Aggregator.sol
examples/testnet/contracts/AggregatorProxy.sol
evm/contracts/lib
evm/box/node_modules
evm/node_modules
evm/node_modules
evm/contracts/vendor
evm/v0.5/contracts/vendor
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ COPY operator_ui/package.json ./operator_ui/
COPY styleguide/package.json ./styleguide/
COPY tools/prettier-config/package.json ./tools/prettier-config/
COPY tools/eslint-config/package.json ./tools/eslint-config/
COPY tools/json-api-client/package.json ./tools/json-api-client/
COPY tools/local-storage/package.json ./tools/local-storage/
RUN make yarndep

# Install chainlink
Expand Down
38 changes: 22 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ and will go on to form the basis for Chainlink's [decentralized oracle network](
Further development of the Chainlink Node and Chainlink Network will happen here,
if you are interested in contributing please see our [contribution guidelines](./docs/CONTRIBUTING.md).
The current node supports:

- easy connectivity of on-chain contracts to any off-chain computation or API
- multiple methods for scheduling both on-chain and off-chain computation for a user's smart contract
- automatic gas price bumping to prevent stuck transactions, assuring your data is delivered in a timely manner
Expand Down Expand Up @@ -46,16 +47,21 @@ Ethereum node versions currently tested and supported:
**NOTE**: By default, chainlink will run in TLS mode. For local development you can either disable this by setting CHAINLINK_DEV to true, or generate self signed certificates using `tools/bin/self-signed-certs` or [manually](https://github.com/smartcontractkit/chainlink/wiki/Creating-Self-Signed-Certificates).

To start your Chainlink node, simply run:

```bash
$ chainlink local node
```

By default this will start on port 6688, where it exposes a [REST API](https://github.com/smartcontractkit/chainlink/wiki/REST-API).

Once your node has started, you can view your current jobs with:

```bash
$ chainlink jobspecs
````
```

View details of a specific job with:

```bash
$ chainlink show $JOB_ID
```
Expand All @@ -72,20 +78,16 @@ You can configure your node's behavior by setting environment variables which ca

This project contains several sub-projects, some with their own documentation.

- [evm](/evm) - smart contract-related resources
- [box](/evm/box) - [Chainlink Truffle box](https://www.trufflesuite.com/blog/using-truffle-to-interact-with-chainlink-smart-contracts)
- [v0.5](/evm/v0.5) - Chainlink using Solidity v0.5.0
- [examples](/examples) - collection of example Chainlink integrations
- [echo_server](/examples/echo_server) - demonstrates using Chainlink to monitor incoming Ethereum logs and report them as JSON
- [testnet](/examples/testnet) - guide to creating, deploying and using Chainlinked smart contracts
- [twilio_sms](/examples/twilio_sms) - send a text message when a smart contract receives payment
- [uptime_sla](/examples/uptime_sla) - example SLA that uses ChainLink to determine the release of payment
- [explorer](/explorer) - [Chainlink Explorer](https://explorer.chain.link/)
- [integration/forks](/integration/forks) - integration test for [ommers](https://ethereum.stackexchange.com/a/46/19503) and [re-orgs](https://en.bitcoin.it/wiki/Chain_Reorganization)
- [sgx](/sgx) - experimental, optional module that can be loaded into Chainlink to do processing within an [SGX](https://software.intel.com/en-us/sgx) enclave
- [styleguide](/styleguide) - Chainlink style guide
- [tools](/tools) - Chainlink tools

- [evm](/evm) - smart contract-related resources
- [box](/evm/box) - [Chainlink Truffle box](https://www.trufflesuite.com/blog/using-truffle-to-interact-with-chainlink-smart-contracts)
- [v0.5](/evm/v0.5) - Chainlink using Solidity v0.5.0
- [examples](/examples) - collection of example Chainlink integrations
- [testnet](/examples/testnet) - guide to creating, deploying and using Chainlinked smart contracts
- [explorer](/explorer) - [Chainlink Explorer](https://explorer.chain.link/)
- [integration/forks](/integration/forks) - integration test for [ommers](https://ethereum.stackexchange.com/a/46/19503) and [re-orgs](https://en.bitcoin.it/wiki/Chain_Reorganization)
- [sgx](/sgx) - experimental, optional module that can be loaded into Chainlink to do processing within an [SGX](https://software.intel.com/en-us/sgx) enclave
- [styleguide](/styleguide) - Chainlink style guide
- [tools](/tools) - Chainlink tools

## External Adapters

Expand All @@ -94,7 +96,6 @@ A Chainlink node communicates with external adapters via a simple REST API.

For more information on creating and using external adapters, please see our [external adapters page](https://github.com/smartcontractkit/chainlink/wiki/External-Adapters).


## Development Setup

For the latest information on setting up a development environment, see the [guide here](https://github.com/smartcontractkit/chainlink/wiki/Development-Setup-Guide).
Expand All @@ -106,6 +107,7 @@ $ go build -o chainlink ./core/
```

- Run the binary:

```bash
$ ./chainlink
```
Expand All @@ -120,14 +122,18 @@ $ go test ./...

1. [Install Yarn](https://yarnpkg.com/lang/en/docs/install)
2. Install the dependencies:

```bash
$ cd evm
$ yarn install
```

3. Run tests:

```bash
$ yarn run test-sol
```

### Development Tips

For more tips on how to build and test Chainlink, see our [development tips page](https://github.com/smartcontractkit/chainlink/wiki/Development-Tips).
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.6.10
0.7.0
21 changes: 11 additions & 10 deletions core/adapters/adapter.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ import (
"encoding/json"
"fmt"

"github.com/smartcontractkit/chainlink/core/store"
"github.com/smartcontractkit/chainlink/core/store/assets"
"github.com/smartcontractkit/chainlink/core/store/models"
"chainlink/core/store"
"chainlink/core/store/assets"
"chainlink/core/store/models"
"chainlink/core/store/orm"
)

var (
Expand Down Expand Up @@ -49,7 +50,7 @@ var (
// BaseAdapter is the minimum interface required to create an adapter. Only core
// adapters have this minimum requirement.
type BaseAdapter interface {
Perform(models.RunResult, *store.Store) models.RunResult
Perform(models.RunInput, *store.Store) models.RunOutput
}

// PipelineAdapter wraps a BaseAdapter with requirements for execution in the pipeline.
Expand All @@ -70,10 +71,10 @@ func (p PipelineAdapter) MinContractPayment() *assets.Link {
}

// For determines the adapter type to use for a given task.
func For(task models.TaskSpec, store *store.Store) (*PipelineAdapter, error) {
func For(task models.TaskSpec, config orm.ConfigReader, orm *orm.ORM) (*PipelineAdapter, error) {
var ba BaseAdapter
var err error
mic := store.Config.MinIncomingConfirmations()
mic := config.MinIncomingConfirmations()
mcp := assets.NewLink(0)

switch task.Type {
Expand All @@ -94,11 +95,11 @@ func For(task models.TaskSpec, store *store.Store) (*PipelineAdapter, error) {
err = unmarshalParams(task.Params, ba)
case TaskTypeEthTx:
ba = &EthTx{}
mcp = store.Config.MinimumContractPayment()
mcp = config.MinimumContractPayment()
err = unmarshalParams(task.Params, ba)
case TaskTypeEthTxABIEncode:
ba = &EthTxABIEncode{}
mcp = store.Config.MinimumContractPayment()
mcp = config.MinimumContractPayment()
err = unmarshalParams(task.Params, ba)
case TaskTypeHTTPGet:
ba = &HTTPGet{}
Expand Down Expand Up @@ -131,11 +132,11 @@ func For(task models.TaskSpec, store *store.Store) (*PipelineAdapter, error) {
ba = &Compare{}
err = unmarshalParams(task.Params, ba)
default:
bt, err := store.FindBridge(task.Type)
bt, err := orm.FindBridge(task.Type)
if err != nil {
return nil, fmt.Errorf("%s is not a supported adapter type", task.Type)
}
b := Bridge{BridgeType: &bt, Params: &task.Params}
b := Bridge{BridgeType: bt, Params: task.Params}
ba = &b
mic = b.Confirmations
mcp = bt.MinimumContractPayment
Expand Down
Loading

0 comments on commit 85aef95

Please sign in to comment.