Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/fix-nix-shell' into fix-nix-shell
Browse files Browse the repository at this point in the history
  • Loading branch information
ecPablo committed May 6, 2024
2 parents f1f9fd5 + 358f35b commit bcfeb15
Show file tree
Hide file tree
Showing 50 changed files with 5,783 additions and 85 deletions.
5 changes: 5 additions & 0 deletions .changeset/grumpy-birds-serve.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"chainlink": patch
---

withdraw in offchain mode #bugfix
5 changes: 5 additions & 0 deletions .changeset/modern-trainers-hear.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"chainlink": patch
---

#internal Generate gethwrappers for capability registry changes
5 changes: 5 additions & 0 deletions .changeset/ninety-students-return.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"chainlink": patch
---

#updated Add gethwrappers for operatorforwarder contracts
5 changes: 5 additions & 0 deletions .changeset/tall-hats-brake.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"chainlink": patch
---

get available erc20 for payment #bugfix
36 changes: 36 additions & 0 deletions .github/actions/detect-solidity-file-changes/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: 'Detect Changes Composite Action'
description: 'Detects changes in solidity files and fails if read-only files are modified.'
outputs:
changes:
description: 'Whether or not changes were detected'
value: ${{ steps.changed_files.outputs.src }}
runs:
using: 'composite'
steps:

- name: Filter paths
uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
id: changed_files
with:
list-files: 'csv'
filters: |
src:
- 'contracts/**/*'
- '.github/workflows/solidity.yml'
- '.github/workflows/solidity-foundry.yml'
- '.github/workflows/solidity-wrappers.yml'
read_only_sol:
- 'contracts/src/v0.8/interfaces/**/*'
- 'contracts/src/v0.8/automation/v1_2/**/*'
- 'contracts/src/v0.8/automation/v1_3/**/*'
- 'contracts/src/v0.8/automation/v2_0/**/*'
- name: Fail if read-only files have changed
if: ${{ steps.changed_files.outputs.read_only_sol == 'true' }}
shell: bash
run: |
echo "One or more read-only Solidity file(s) has changed."
for file in ${{ steps.changed_files.outputs.read_only_sol_files }}; do
echo "$file was changed"
done
exit 1
1 change: 0 additions & 1 deletion .github/scripts/crib/pr-comment-crib-env.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ function generateSubdomains(subdomainPrefix, prNumber) {
"node3",
"node4",
"node5",
"node6",
"geth-1337-http",
"geth-1337-ws",
"geth-2337-http",
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-publish-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:

jobs:
build-publish-untrusted:
if: ${{ ! startsWith(github.ref_name, 'release/') }}
if: ${{ ! startsWith(github.ref_name, 'release/') || (! startsWith(github.head_ref, 'release/') && ! startsWith(github.ref_name, 'chore/'))}}
runs-on: ubuntu-20.04
environment: sdlc
permissions:
Expand Down
22 changes: 22 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,39 @@ on:
jobs:
build-chainlink:
runs-on: ubuntu-20.04
if: ${{ ! startsWith(github.head_ref, 'release/') && ! startsWith(github.ref_name, 'chore/') }}
steps:
- name: Checkout repository
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2

- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
id: change
with:
predicate-quantifier: every
filters: |
changelog-only:
- 'CHANGELOG.md'
- '!common/**'
- '!contracts/**'
- '!core/**'
- '!crib/**'
- '!dashboard-lib/**'
- '!fuzz/**'
- '!integration-tests/**'
- '!internal/**'
- '!operator_ui/**'
- '!plugins/**'
- '!tools/**'
- name: Build chainlink image
if: ${{ steps.change.outputs.changelog-only == 'false' }}
uses: ./.github/actions/build-sign-publish-chainlink
with:
dockerhub_username: ${{ secrets.DOCKERHUB_READONLY_USERNAME }}
dockerhub_password: ${{ secrets.DOCKERHUB_READONLY_PASSWORD }}
publish: false
sign-images: false

- name: Collect Metrics
if: always()
id: collect-gha-metrics
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ jobs:
env:
OUTPUT_FILE: ./output.txt
USE_TEE: false
CL_DATABASE_URL: ${{ env.DB_URL }}
CL_DATABASE_URL: ${{ env.DB_URL }}
run: ./tools/bin/${{ matrix.type.cmd }} ./...
- name: Print Filtered Test Results
if: ${{ failure() && matrix.type.cmd == 'go_core_tests' && needs.filter.outputs.changes == 'true' }}
Expand Down Expand Up @@ -203,7 +203,7 @@ jobs:
./coverage.txt
./postgres_logs.txt
- name: Notify Slack
if: ${{ failure() && steps.print-races.outputs.post_to_slack == 'true' && matrix.type.cmd == 'go_core_race_tests' && (github.event_name == 'merge_group' || github.event.branch == 'develop') && needs.filter.outputs.changes == 'true' }}
if: ${{ failure() && steps.print-races.outputs.post_to_slack == 'true' && matrix.type.cmd == 'go_core_race_tests' && (github.event_name == 'merge_group' || github.base_ref == 'develop') && needs.filter.outputs.changes == 'true' }}
uses: slackapi/slack-github-action@6c661ce58804a1a20f6dc5fbee7f0381b469e001 # v1.25.0
env:
SLACK_BOT_TOKEN: ${{ secrets.QA_SLACK_API_KEY }}
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/ci-scripts.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
name: CI Scripts

on:
push:
merge_group:
pull_request:

jobs:
lint-scripts:
if: ${{ github.event_name == 'pull_request' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
Expand All @@ -23,7 +22,6 @@ jobs:
gc-org-id: ${{ secrets.GRAFANA_INTERNAL_TENANT_ID }}

test-scripts:
if: ${{ github.event_name == 'pull_request' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
Expand Down
82 changes: 82 additions & 0 deletions .github/workflows/solidity-wrappers.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
name: Solidity Wrappers
# This is its own workflow file rather than being merged into "solidity.yml" to avoid over complicating the conditionals
# used for job execution. The jobs in "solidity.yml" are configured around push events, whereas
# we only want to generate gethwrappers during pull requests.
on:
pull_request:
types:
- opened
- synchronize
- reopened

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
changes:
name: Detect changes
runs-on: ubuntu-latest
outputs:
changes: ${{ steps.ch.outputs.changes }}
steps:
- name: Checkout the repo
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
- name: Detect changes
id: ch
uses: ./.github/actions/detect-solidity-file-changes

# On a pull request event, make updates to gethwrappers if there are changes.
update-wrappers:
needs: [changes]
if: needs.changes.outputs.changes == 'true'
name: Update Wrappers
permissions:
actions: read
id-token: write
contents: read
runs-on: ubuntu22.04-8cores-32GB
steps:
- name: Checkout the repo
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2

- name: Setup Go
uses: ./.github/actions/setup-go

- name: Setup NodeJS
uses: ./.github/actions/setup-nodejs
with:
prod: "true"

- name: Run native compile and generate wrappers
run: make wrappers-all
working-directory: ./contracts

- name: Assume role capable of dispatching action
uses: smartcontractkit/.github/actions/setup-github-token@9e7cc0779934cae4a9028b8588c9adb64d8ce68c # [email protected]
id: get-gh-token
with:
aws-role-arn: ${{ secrets.AWS_OIDC_CHAINLINK_CI_AUTO_PR_TOKEN_ISSUER_ROLE_ARN }}
aws-lambda-url: ${{ secrets.AWS_INFRA_RELENG_TOKEN_ISSUER_LAMBDA_URL }}
aws-region: ${{ secrets.AWS_REGION }}

- name: Commit any wrapper changes
uses: planetscale/ghcommit-action@21a8cda29f55e5cc2cdae0cdbdd08e38dd148c25 # v0.1.37
with:
commit_message: "Update gethwrappers"
repo: ${{ github.repository }}
branch: ${{ github.head_ref }}
file_pattern: "core/gethwrappers/**/generated/*.go core/gethwrappers/**/generated-wrapper-dependency-versions-do-not-edit.txt"
env:
GITHUB_TOKEN: ${{ steps.get-gh-token.outputs.access-token }}

- name: Collect Metrics
id: collect-gha-metrics
uses: smartcontractkit/push-gha-metrics-action@dea9b546553cb4ca936607c2267a09c004e4ab3f # v3.0.0
with:
id: solidity-update-wrappers
org-id: ${{ secrets.GRAFANA_INTERNAL_TENANT_ID }}
basic-auth: ${{ secrets.GRAFANA_INTERNAL_BASIC_AUTH }}
hostname: ${{ secrets.GRAFANA_INTERNAL_HOST }}
this-job-name: Update Wrappers
continue-on-error: true
33 changes: 4 additions & 29 deletions .github/workflows/solidity.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,33 +13,13 @@ jobs:
name: Detect changes
runs-on: ubuntu-latest
outputs:
changes: ${{ steps.changes.outputs.src }}
changes: ${{ steps.ch.outputs.changes }}
steps:
- name: Checkout the repo
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
id: changes
with:
list-files: "csv"
filters: |
src:
- 'contracts/**/*'
- '.github/workflows/solidity.yml'
- '.github/workflows/solidity-foundry.yml'
read_only_sol:
- 'contracts/src/v0.8/interfaces/**/*'
- 'contracts/src/v0.8/automation/v1_2/**/*'
- 'contracts/src/v0.8/automation/v1_3/**/*'
- 'contracts/src/v0.8/automation/v2_0/**/*'
- name: Fail if read-only files have changed
if: ${{ steps.changes.outputs.read_only_sol == 'true' }}
run: |
echo "One or more read-only Solidity file(s) has changed."
for file in ${{ steps.changes.outputs.read_only_sol_files }}; do
echo "$file was changed"
done
exit 1
- name: Detect changes
id: ch
uses: ./.github/actions/detect-solidity-file-changes

tag-check:
needs: [changes]
Expand Down Expand Up @@ -116,11 +96,6 @@ jobs:
- name: Check if Go solidity wrappers are updated
if: ${{ needs.changes.outputs.changes == 'true' }}
run: git diff --minimal --color --exit-code | diff-so-fancy
- name: Comment on fix instructions
env:
GITHUB_TOKEN: ${{ github.token }}
if: ${{ failure() }}
run: gh pr comment -b 'Go solidity wrappers are out-of-date, regenerate them via the `make wrappers-all` command'
- name: Collect Metrics
id: collect-gha-metrics
uses: smartcontractkit/push-gha-metrics-action@dea9b546553cb4ca936607c2267a09c004e4ab3f # v3.0.0
Expand Down
5 changes: 5 additions & 0 deletions contracts/.changeset/calm-maps-vanish.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@chainlink/contracts": patch
---

withdraw in offchain mode #bugfix
5 changes: 5 additions & 0 deletions contracts/.changeset/proud-tables-grab.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@chainlink/contracts": patch
---

get available erc20s for payment #bugfix
5 changes: 5 additions & 0 deletions contracts/.changeset/three-hotels-agree.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@chainlink/contracts": patch
---

Add function to update nodes in capability registry

Large diffs are not rendered by default.

Loading

0 comments on commit bcfeb15

Please sign in to comment.