Skip to content

Commit

Permalink
Initial Commit
Browse files Browse the repository at this point in the history
  • Loading branch information
LogeswaranA committed Aug 10, 2021
0 parents commit 645c64a
Show file tree
Hide file tree
Showing 1,676 changed files with 399,123 additions and 0 deletions.
64 changes: 64 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
version: 2.1
jobs:
build-publish-chainlink:
resource_class: 2xlarge
machine:
image: circleci/classic:201808-01
docker_layer_caching: true
steps:
- checkout
- setup-aws-ecr
- run:
name: Docker build
command: DOCKER_TAG=circleci BUILDER="${AWS_ECR_URL}/builder" make docker
- run:
name: Docker build non-root
command: DOCKER_TAG=circleci-nonroot CHAINLINK_USER=chainlink make docker
- run:
name: Docker push, if applicable
command: |
tools/ci/push_chainlink "${CIRCLE_BRANCH}" "${CIRCLE_TAG}" "${CIRCLE_SHA1}"
workflows:
version: 2
test:
jobs:
- build-publish-chainlink:
filters:
tags:
only: /^v.*/
commands:
setup-aws-ecr:
description: 'Install aws cli and login to public and private ECR'
steps:
- run:
name: Install AWS CLI
command: |
curl -sSL "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
unzip awscliv2.zip
sudo ./aws/install
rm awscliv2.zip
aws --version
- run:
name: Docker login for ECR using temporary creds
command: |
# Get temporary credentials to access resoures available to specific role
temporaryCredentials=$(
aws sts assume-role \
--role-arn "${AWS_ROLE_TO_ASSUME}" \
--role-session-name "cirlceci-${CIRCLE_PROJECT_REPONAME}-${CIRCLE_TAG}"
)
# Deconstruct json response, extracting aws credentials
accessKeyID=$(echo $temporaryCredentials | jq .Credentials.AccessKeyId | xargs)
secretAccessKey=$(echo $temporaryCredentials | jq .Credentials.SecretAccessKey | xargs)
sessionToken=$(echo $temporaryCredentials | jq .Credentials.SessionToken | xargs)
# Store aws creds in .aws folder
aws configure set aws_access_key_id ${accessKeyID}
aws configure set aws_secret_access_key ${secretAccessKey}
aws configure set aws_session_token ${sessionToken}
# Use temporary keys to get account ID
accountID=$(aws sts get-caller-identity --output text --query 'Account')
# docker cli login to ECR
aws ecr-public get-login-password --region "us-east-1" --profile "default" | docker login --username AWS --password-stdin "public.ecr.aws"
# docker login to private ECR
aws ecr get-login-password --region us-west-2 --profile "default" | docker login --username AWS --password-stdin "${AWS_ECR_URL}"
36 changes: 36 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
.git-together
.DS_Store
.envrc
*.log
operator_ui/**/*.test.*

node_modules/
**/node_modules/
vendor/
tmp/

contracts/node_modules
evm-test-helpers/node_modules
examples/
integration/node_modules

tools/gethnet/datadir/geth
tools/clroot/db.bolt
tools/clroot/*.jsonl
tools/clroot/tempkeys

core/sgx/target/

operator_ui/dist/
operator_ui/artifacts/
*-packr.go

core/*.Dockerfile
chainlink

# codeship
codeship-*.yml
*.aes
dockercfg
credentials.env
gcr_creds.env
17 changes: 17 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
**/node_modules/**
**/generated/**
core/
**/dist/**
**/artifacts/**
**/public/**
**/build/**
**/fixtures/**
**/lib/**
truffle-config.js
truffle.js
gethload.js
craco.config.js
solc_bin/**
integration/apocalypse/**
contracts/
tools/ci-ts/tests/ethers/**
69 changes: 69 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint'],
env: {
es6: true,
node: true,
},
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'plugin:prettier/recommended',
'prettier/@typescript-eslint',
],
rules: {
radix: ['error', 'always'],
'object-shorthand': ['error', 'always'],
'prettier/prettier': [
'error',
{},
{
usePrettierrc: true,
},
],
'@typescript-eslint/camelcase': 'off',
'@typescript-eslint/no-empty-function': 'off',
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
'@typescript-eslint/no-empty-interface': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/ban-ts-ignore': 'warn',
'@typescript-eslint/no-non-null-assertion': 'error',
'@typescript-eslint/no-use-before-define': [
'error',
{ functions: false, typedefs: false },
],
},

overrides: [
// enable jest for tests
{
files: ['**/*.test.ts', '**/*.test.js', '**/__mocks__/**/*.js'],
env: {
jest: true,
},
},
// add react linting for all of our react projects
{
files: ['operator_ui/**/*'],
plugins: ['react-hooks'],
extends: ['plugin:react/recommended'],
env: {
node: true,
browser: true,
},
settings: {
react: {
version: 'detect',
},
},
rules: {
'react/prop-types': 'off',
'react-hooks/rules-of-hooks': 'error',
'react-hooks/exhaustive-deps': 'error',
},
},
],
}
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.sol linguist-language=Solidity
6 changes: 6 additions & 0 deletions .github/ISSUE_TEMPLATE/config.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
blank_issues_enabled: true
contact_links:

- name: Question
url: https://stackoverflow.com/questions/tagged/chainlink
about: Please ask and answer questions here.
22 changes: 22 additions & 0 deletions .github/ISSUE_TEMPLATE/development.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
name: Development Issue
about: Report an issue encountered while working on code found in this repository.
title: '[DEVEL] <replace with issue title>'
labels: 'Development'
assignees: ''
---

**Description**
[replace this line with a clear and concise description of the development issue you are experiencing]

**Your Environment**
[replace this line with basic information about your environment, such as your operating system and the versions of any relevant tools you are using (e.g. Go, Docker)]

**Basic Information**
[replace this line with basic information about the issue you are experiencing, including but not limited to the names of the files you are working with and any relevant error messages]

**Steps to Reproduce**
[replace this line with detailed steps to reproduce the issue you are experiencing]

**Additional Information**
[replace this line with any additional information you would like to provide, such as screenshots illustrating the issue]
19 changes: 19 additions & 0 deletions .github/ISSUE_TEMPLATE/explorer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
name: Explorer Issue
about: Report an issue with the Chainlink Explorer.
title: '[EXPLR] <replace with issue title>'
labels: 'Explorer'
assignees: ''
---

**Description**
[replace this line with a clear and concise description of the Chainlink Explorer issue you are experiencing]

**Basic Information**
[replace this line with basic information about the issue you are experiencing, including but not limited to the name and version of your web browser and the value you are searching for]

**Steps to Reproduce**
[replace this line with detailed steps to reproduce the issue you are experiencing]

**Additional Information**
[replace this line with any additional information you would like to provide, such as screenshots illustrating the issue]
19 changes: 19 additions & 0 deletions .github/ISSUE_TEMPLATE/faucet.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
name: Faucet Issue
about: Report an issue with a Chainlink LINK Faucet.
title: '[FAUC] <replace with issue title>'
labels: 'Faucet'
assignees: ''
---

**Description**
[replace this line with a clear and concise description of the Chainlink LINK Faucet issue you are experiencing]

**Basic Information**
[replace this line with basic information about the issue you are experiencing, including but not limited to your testnet address, the name and version of your web browser and wallet, and the link to the faucet transaction on Etherscan]

**Steps to Reproduce**
[replace this line with detailed steps to reproduce the issue you are experiencing]

**Additional Information**
[replace this line with any additional information you would like to provide, such as screenshots illustrating the issue]
19 changes: 19 additions & 0 deletions .github/ISSUE_TEMPLATE/feature-request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
name: Feature Request
about: Request a feature. Help us make Chainlink better!
title: '[FEAT] <replace with feature title>'
labels: 'Feature Request'
assignees: ''
---

**Description**
[replace this line with a clear and concise description of the feature you are requesting]

**Motivation**
[replace this line with a clear and concise explanation of _why_ you are requesting this feature]

**Justification**
[replace this line with a clear and concise explanation of _why_ the feature you are requesting is the best way to approach this issue and list other approaches you considered]

**Additional Information**
[replace this line with any additional information you would like to provide, such as examples or screenshots of similar features]
30 changes: 30 additions & 0 deletions .github/ISSUE_TEMPLATE/node-operator.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
name: Node Operator Issue
about: Report an issue encountered while operating a Chainlink node.
title: '[NODE] <replace with issue title>'
labels: 'Node Operator'
assignees: ''
---

**Description**
[replace this line with a clear and concise description of the issue you are experiencing]

**Basic Information**
[replace this line with basic information about the issue you are experiencing, including but not limited to all relevant logs and any other relevant information, such as if you are using a Docker container to run the node, job specification, oracle contract address, transaction IDs, etc.]

- Network: [e.g. Ethereum Mainnet, Ropsten]
- Blockchain Client: [name and version of blockchain client e.g. Geth v1.9.6]
- Go Version: [e.g. v1.12]
- Operating System: [name and version of operating system running Chainlink node]
- Commit: [log INFO line when starting node]
- Hosting Provider: [e.g. AWS, GCP, self-hosted]
- Startup Command: [e.g. `docker run smartcontract/chainlink local n`]

**Environment Variables**
[replace this line with the output of the environment variables when running the node in debug mode]

**Steps to Reproduce**
[replace this line with detailed steps to reproduce the issue you are experiencing]

**Additional Information**
[replace this line with any additional information you would like to provide, such as screenshots illustrating the issue]
19 changes: 19 additions & 0 deletions .github/ISSUE_TEMPLATE/smart-contract.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
name: Smart Contract Issue
about: Report an issue with smart contracts found in this repository.
title: '[SMRT] <replace with issue title>'
labels: 'Smart Contract'
assignees: ''
---

**Description**
[replace this line with a clear and concise description of the smart contract issue you are experiencing]

**Basic Information**
[replace this line with basic information about the issue you are experiencing, including but not limited to the names of the smart contract files and the version of the Chainlink software repository in which they are found, contract addresses, transaction IDs, etc.]

**Steps to Reproduce**
[replace this line with detailed steps to reproduce the issue you are experiencing]

**Additional Information**
[replace this line with any additional information you would like to provide, such as screenshots illustrating the issue]
2 changes: 2 additions & 0 deletions .github/codeql/codeql-config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
paths-ignore:
- 'solc_bin/*'
25 changes: 25 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
version: 2
updates:
- package-ecosystem: gomod
directory: '/'
schedule:
interval: monthly
open-pull-requests-limit: 10
- package-ecosystem: npm
directory: '/'
schedule:
interval: monthly
open-pull-requests-limit: 10
ignore:
- dependency-name: webpack
versions:
- 5.19.0
- 5.24.2
- dependency-name: lodash
versions:
- 4.17.21
- package-ecosystem: github-actions
directory: '/'
schedule:
interval: daily
open-pull-requests-limit: 10
27 changes: 27 additions & 0 deletions .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#
# This action checks PRs to see if any CHANGELOG* files were updated.
# If none were, it will add a message to the PR asking if it would make sense to do so.
#
name: Changelog

on: pull_request

jobs:
changelog:
name: Changelog checker
runs-on: ubuntu-latest
steps:
- name: Check for changed files
id: changedfiles
uses: futuratrepadeira/changed-files@186b5b30b1f5e44ed655a59652746c3ce00d53ef # Version v3.1.1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
pattern: '^docs/CHANGELOG.*$'
- name: Make a comment
uses: unsplash/comment-on-pr@d1a1d5dd1eb1bb657a01f4d92dd5e4d5bb7857d3 # Version v1.2.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
if: contains(steps.changedfiles.outputs.files_updated, 'CHANGELOG') != true && contains(steps.changedfiles.outputs.files_created, 'CHANGELOG') != true
with:
msg: "I see that you haven't updated any CHANGELOG files. Would it make sense to do so?"
check_for_duplicate_msg: false
Loading

0 comments on commit 645c64a

Please sign in to comment.