diff --git a/.changeset/brown-penguins-grin.md b/.changeset/brown-penguins-grin.md new file mode 100644 index 00000000000..24a06a030fc --- /dev/null +++ b/.changeset/brown-penguins-grin.md @@ -0,0 +1,5 @@ +--- +"chainlink": patch +--- + +Fix in memory data source cache changes/bug that only allowed pipeline results where none of the data sources failed. #bugfix diff --git a/.changeset/chilled-bikes-unite.md b/.changeset/chilled-bikes-unite.md new file mode 100644 index 00000000000..e3e54852002 --- /dev/null +++ b/.changeset/chilled-bikes-unite.md @@ -0,0 +1,5 @@ +--- +"chainlink": minor +--- + +#internal Add script to create test database user and update docs diff --git a/.changeset/four-shoes-trade.md b/.changeset/four-shoes-trade.md new file mode 100644 index 00000000000..cb5c9f4be6b --- /dev/null +++ b/.changeset/four-shoes-trade.md @@ -0,0 +1,5 @@ +--- +"chainlink": patch +--- + +Removed AppConfig from Evm config #internal diff --git a/.changeset/kind-deers-leave.md b/.changeset/kind-deers-leave.md new file mode 100644 index 00000000000..ef88e78241c --- /dev/null +++ b/.changeset/kind-deers-leave.md @@ -0,0 +1,5 @@ +--- +"chainlink": patch +--- + +bump mockery in makefile #updated diff --git a/.changeset/lovely-jeans-confess.md b/.changeset/lovely-jeans-confess.md new file mode 100644 index 00000000000..50fc70c2c14 --- /dev/null +++ b/.changeset/lovely-jeans-confess.md @@ -0,0 +1,6 @@ +--- +"chainlink": minor +--- + +#nops : Enable configurable client error regexes for error classification +#added : New toml configuration options for [EVM.NodePool.Errors] to pass regexes on NonceTooLow, NonceTooHigh, ReplacementTransactionUnderpriced, LimitReached, TransactionAlreadyInMempool, TerminallyUnderpriced, InsufficientEth, TxFeeExceedsCap, L2FeeTooLow, L2FeeTooHigh, L2Full, TransactionAlreadyMined, Fatal, and ServiceUnavailable. diff --git a/.changeset/new-forks-grab.md b/.changeset/new-forks-grab.md index cb078beb29b..350b5baafb0 100644 --- a/.changeset/new-forks-grab.md +++ b/.changeset/new-forks-grab.md @@ -1,5 +1,5 @@ --- -"chainlink": removed +"chainlink": patch --- Drop unused queryTimeout config from TXM strategy #internal diff --git a/.changeset/sour-needles-collect.md b/.changeset/sour-needles-collect.md new file mode 100644 index 00000000000..5d1ae86fd7c --- /dev/null +++ b/.changeset/sour-needles-collect.md @@ -0,0 +1,5 @@ +--- +"chainlink": patch +--- + +cleanup set #bugfix diff --git a/.changeset/stale-terms-march.md b/.changeset/stale-terms-march.md new file mode 100644 index 00000000000..72ba417eac3 --- /dev/null +++ b/.changeset/stale-terms-march.md @@ -0,0 +1,7 @@ +--- +"chainlink": patch +--- + +Bump libocr => fd3cab206b2ca3b7ff207996b95673b2d6303ec4 + +#internal diff --git a/.github/actions/build-chainlink-image/action.yml b/.github/actions/build-chainlink-image/action.yml index f75bd68a87e..bd5ffe6403d 100644 --- a/.github/actions/build-chainlink-image/action.yml +++ b/.github/actions/build-chainlink-image/action.yml @@ -33,7 +33,7 @@ runs: AWS_ROLE_TO_ASSUME: ${{ inputs.AWS_ROLE_TO_ASSUME }} - name: Build Image if: steps.check-image.outputs.exists != 'true' - uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/build-image@5dd916d08c03cb5f9a97304f4f174820421bb946 # v2.3.11 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/build-image@519851800779323566b7b7c22cc21bff95dbb639 # v2.3.14 with: cl_repo: smartcontractkit/chainlink cl_ref: ${{ inputs.git_commit_sha }} @@ -41,6 +41,7 @@ runs: push_tag: ${{ env.CHAINLINK_IMAGE }}:${{ inputs.git_commit_sha }}${{ inputs.tag_suffix }} QA_AWS_REGION: ${{ inputs.AWS_REGION }} QA_AWS_ROLE_TO_ASSUME: ${{ inputs.AWS_ROLE_TO_ASSUME }} + GO_COVER_FLAG: true dep_evm_sha: ${{ inputs.dep_evm_sha }} - name: Print Chainlink Image Built shell: sh diff --git a/.github/workflows/build-publish-develop.yml b/.github/workflows/build-publish-develop.yml index 1df1720d714..99bb999538f 100644 --- a/.github/workflows/build-publish-develop.yml +++ b/.github/workflows/build-publish-develop.yml @@ -56,44 +56,6 @@ jobs: dockerhub_password: ${{ secrets.DOCKERHUB_READONLY_PASSWORD }} git-commit-sha: ${{ steps.git-ref.outputs.checked-out || github.sha }} - - name: Setup GAP - # Don't run for plugins. - if: matrix.image.name == '' - uses: smartcontractkit/.github/actions/setup-gap@1bc7ce34fa81fffcb4a6eb0e4e12e59d94d0fc8f # setup-gap@0.2.0 - with: - aws-region: ${{ secrets.AWS_REGION }} - aws-role-arn: ${{ secrets.AWS_OIDC_CRIB_ROLE_ARN_SAND }} - api-gateway-host: ${{ secrets.AWS_API_GW_HOST_K8S_SAND }} - use-k8s: "true" - k8s-cluster-name: ${{ secrets.AWS_EKS_CLUSTER_NAME_SAND }} - use-private-ecr-registry: true - ecr-private-registry: ${{ secrets.AWS_ACCOUNT_ID_PROD }} - metrics-job-name: push-chainlink-develop ${{ matrix.image.name }} - gc-host: ${{ secrets.GRAFANA_INTERNAL_HOST }} - gc-basic-auth: ${{ secrets.GRAFANA_INTERNAL_BASIC_AUTH }} - gc-org-id: ${{ secrets.GRAFANA_INTERNAL_TENANT_ID }} - - # A mutable image tag is used for these CRIBs and it was just built/published - # from this workflow. The deployment has an `imagePullPolicy: Always` set, so - # we need to restart the deployments to pick up the new image. - - name: Restart K8s Deployments for CRIBs - # Don't run for plugins. - if: matrix.image.name == '' - shell: bash - run: | - set -euo pipefail - # Removes the "smartcontractkit/" (org name) prefix. - REPO_NAME_ONLY="${GITHUB_REPOSITORY##*/}" - K8S_NAMESPACE="crib-${REPO_NAME_ONLY}-develop" - - deployment_node_names=$(kubectl --namespace "${K8S_NAMESPACE}" \ - get deployments \ - -l "app=${K8S_NAMESPACE}" \ - -o custom-columns=:metadata.name --no-headers) - - echo "Restarting deployments: $deployment_node_names" - kubectl rollout restart deployment $deployment_node_names --namespace "${K8S_NAMESPACE}" - - name: Collect Metrics if: always() id: collect-gha-metrics diff --git a/.github/workflows/ci-core.yml b/.github/workflows/ci-core.yml index c97af329639..394faf71e2f 100644 --- a/.github/workflows/ci-core.yml +++ b/.github/workflows/ci-core.yml @@ -109,6 +109,7 @@ jobs: if: ${{ needs.filter.outputs.changes == 'true' }} uses: ./.github/actions/setup-go - name: Run short tests + if: ${{ needs.filter.outputs.changes == 'true' }} run: go test -short ./... - name: Setup Solana if: ${{ needs.filter.outputs.changes == 'true' }} @@ -170,8 +171,16 @@ jobs: run: | cat output.txt | gotestloghelper -ci - name: Print Races + id: print-races if: ${{ failure() && matrix.type.cmd == 'go_core_race_tests' && needs.filter.outputs.changes == 'true' }} - run: find race.* | xargs cat + run: | + find race.* | xargs cat > race.txt + if [[ -s race.txt ]]; then + cat race.txt + echo "post_to_slack=true" >> $GITHUB_OUTPUT + else + echo "post_to_slack=false" >> $GITHUB_OUTPUT + fi - name: Print postgres logs if: ${{ always() && needs.filter.outputs.changes == 'true' }} run: docker compose logs postgres | tee ../../../postgres_logs.txt @@ -188,7 +197,7 @@ jobs: ./coverage.txt ./postgres_logs.txt - name: Notify Slack - if: ${{ failure() && 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.event.branch == 'develop') && needs.filter.outputs.changes == 'true' }} uses: slackapi/slack-github-action@6c661ce58804a1a20f6dc5fbee7f0381b469e001 # v1.25.0 env: SLACK_BOT_TOKEN: ${{ secrets.QA_SLACK_API_KEY }} diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index 98d67a8b2d3..3ba0f2976ec 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -372,7 +372,7 @@ jobs: ## Run this step when changes that require tests to be run are made - name: Run Tests if: needs.changes.outputs.src == 'true' || github.event_name == 'workflow_dispatch' - uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@5dd916d08c03cb5f9a97304f4f174820421bb946 # v2.3.11 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@519851800779323566b7b7c22cc21bff95dbb639 with: test_command_to_run: cd ./integration-tests && go test -timeout 30m -count=1 -json -test.parallel=${{ matrix.product.nodes }} ${{ steps.build-go-test-command.outputs.run_command }} 2>&1 | tee /tmp/gotest.log | gotestloghelper -ci -singlepackage test_download_vendor_packages_command: cd ./integration-tests && go mod download @@ -392,6 +392,16 @@ jobs: QA_AWS_ROLE_TO_ASSUME: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }} QA_KUBECONFIG: "" should_tidy: "false" + go_coverage_src_dir: /var/tmp/go-coverage + go_coverage_dest_dir: ${{ github.workspace }}/.covdata + + - name: Upload Coverage Data + uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3 + with: + name: cl-node-coverage-data-${{ matrix.product.name }} + path: .covdata + retention-days: 1 + - name: Print failed test summary if: always() uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/show-test-summary@5dd916d08c03cb5f9a97304f4f174820421bb946 # v2.3.11 @@ -464,7 +474,7 @@ jobs: ## Run this step when changes that require tests to be run are made - name: Run Tests if: needs.changes.outputs.src == 'true' - uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@5dd916d08c03cb5f9a97304f4f174820421bb946 # v2.3.11 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@519851800779323566b7b7c22cc21bff95dbb639 # v2.3.11 with: test_command_to_run: cd ./integration-tests && go test -timeout 30m -count=1 -json -test.parallel=${{ matrix.product.nodes }} ${{ steps.build-go-test-command.outputs.run_command }} 2>&1 | tee /tmp/gotest.log | gotestloghelper -ci -singlepackage test_download_vendor_packages_command: cd ./integration-tests && go mod download @@ -484,6 +494,15 @@ jobs: QA_AWS_ROLE_TO_ASSUME: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }} QA_KUBECONFIG: "" should_tidy: "false" + go_coverage_src_dir: /var/tmp/go-coverage + go_coverage_dest_dir: ${{ github.workspace }}/.covdata + + - name: Upload Coverage Data + uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3 + with: + name: cl-node-coverage-data-${{ matrix.product.name }} + path: .covdata + retention-days: 1 eth-smoke-tests-matrix: if: ${{ !contains(join(github.event.pull_request.labels.*.name, ' '), 'skip-smoke-tests') }} @@ -666,7 +685,7 @@ jobs: ## Run this step when changes that require tests to be run are made - name: Run Tests if: needs.changes.outputs.src == 'true' || github.event_name == 'workflow_dispatch' - uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@5dd916d08c03cb5f9a97304f4f174820421bb946 # v2.3.11 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@519851800779323566b7b7c22cc21bff95dbb639 with: test_command_to_run: cd ./integration-tests && go test -timeout 30m -count=1 -json -test.parallel=${{ matrix.product.nodes }} ${{ steps.build-go-test-command.outputs.run_command }} 2>&1 | tee /tmp/gotest.log | gotestloghelper -ci -singlepackage test_download_vendor_packages_command: cd ./integration-tests && go mod download @@ -686,6 +705,16 @@ jobs: QA_AWS_ROLE_TO_ASSUME: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }} QA_KUBECONFIG: "" should_tidy: "false" + go_coverage_src_dir: /var/tmp/go-coverage + go_coverage_dest_dir: ${{ github.workspace }}/.covdata + + - name: Upload Coverage Data + uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3 + with: + name: cl-node-coverage-data-${{ matrix.product.name }}-${{ matrix.product.tag_suffix }} + path: .covdata + retention-days: 1 + # Run this step when changes that do not need the test to run are made - name: Run Setup if: needs.changes.outputs.src == 'false' @@ -778,6 +807,26 @@ jobs: this-job-name: Clean up integration environment deployments continue-on-error: true + show-coverage: + name: Show Chainlink Node Go Coverage + if: always() + needs: [cleanup] + runs-on: ubuntu-latest + steps: + - name: Checkout the repo + uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 + with: + repository: smartcontractkit/chainlink + ref: ${{ inputs.cl_ref || github.event.pull_request.head.sha || github.event.merge_group.head_sha }} + - name: Download All Artifacts + uses: actions/download-artifact@9c19ed7fe5d278cd354c7dfd5d3b88589c7e2395 # v4.1.6 + with: + path: cl-node-coverage-data + pattern: cl-node-coverage-data-* + merge-multiple: true + - name: Show Coverage + run: go run ./integration-tests/scripts/show_coverage.go "${{ github.workspace }}/cl-node-coverage-data/*/merged" + # Run the setup if the matrix finishes but this time save the cache if we have a cache hit miss # this will also only run if both of the matrix jobs pass eth-smoke-go-mod-cache: @@ -850,7 +899,7 @@ jobs: upgradeImage: ${{ env.UPGRADE_IMAGE }} upgradeVersion: ${{ env.UPGRADE_VERSION }} - name: Run Migration Tests - uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@5dd916d08c03cb5f9a97304f4f174820421bb946 # v2.3.11 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@519851800779323566b7b7c22cc21bff95dbb639 # v2.3.11 with: test_command_to_run: cd ./integration-tests && go test -timeout 30m -count=1 -json ./migration 2>&1 | tee /tmp/gotest.log | gotestloghelper -ci -singlepackage test_download_vendor_packages_command: cd ./integration-tests && go mod download @@ -868,6 +917,15 @@ jobs: QA_AWS_REGION: ${{ secrets.QA_AWS_REGION }} QA_AWS_ROLE_TO_ASSUME: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }} QA_KUBECONFIG: ${{ secrets.QA_KUBECONFIG }} + go_coverage_src_dir: /var/tmp/go-coverage + go_coverage_dest_dir: ${{ github.workspace }}/.covdata + - name: Upload Coverage Data + uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3 + with: + name: cl-node-coverage-data-migration-tests + path: .covdata + retention-days: 1 + - name: Collect Metrics if: always() id: collect-gha-metrics @@ -1150,7 +1208,7 @@ jobs: echo "BASE64_CONFIG_OVERRIDE=$BASE64_CONFIG_OVERRIDE" >> $GITHUB_ENV - name: Run Tests if: needs.changes.outputs.src == 'true' || github.event_name == 'workflow_dispatch' - uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@5dd916d08c03cb5f9a97304f4f174820421bb946 # v2.3.11 + uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@519851800779323566b7b7c22cc21bff95dbb639 # v2.3.11 with: test_command_to_run: export ENV_JOB_IMAGE=${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com/chainlink-solana-tests:${{ needs.get_solana_sha.outputs.sha }} && make test_smoke cl_repo: ${{ env.CHAINLINK_IMAGE }} @@ -1168,4 +1226,13 @@ jobs: QA_AWS_ROLE_TO_ASSUME: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }} QA_KUBECONFIG: "" run_setup: false + go_coverage_src_dir: /var/tmp/go-coverage + go_coverage_dest_dir: ${{ github.workspace }}/.covdata + + - name: Upload Coverage Data + uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3 + with: + name: cl-node-coverage-data-solana-tests + path: .covdata + retention-days: 1 diff --git a/.github/workflows/solidity.yml b/.github/workflows/solidity.yml index 62b0966b358..5940313fc65 100644 --- a/.github/workflows/solidity.yml +++ b/.github/workflows/solidity.yml @@ -212,8 +212,8 @@ jobs: echo "Bumping version to ${{ needs.tag-check.outputs.pre-release-version }}" pnpm version ${{ needs.tag-check.outputs.pre-release-version }} --no-git-tag-version --no-commit-hooks --no-git-checks - - name: Publish to NPM (Dry Run) - uses: smartcontractkit/.github/actions/ci-publish-npm@e1c9d45fc66369d6be5d3863c65af1750797a7f5 # ci-publish-npm@0.3.0 + - name: Publish to NPM (beta) + uses: smartcontractkit/.github/actions/ci-publish-npm@4b0ab756abcb1760cb82e1e87b94ff431905bffc # ci-publish-npm@0.4.0 with: npm-token: ${{ secrets.NPM_TOKEN }} create-github-release: false @@ -254,8 +254,8 @@ jobs: exit 1 fi - - name: Publish to NPM (Dry Run) - uses: smartcontractkit/.github/actions/ci-publish-npm@e1c9d45fc66369d6be5d3863c65af1750797a7f5 # ci-publish-npm@0.3.0 + - name: Publish to NPM (latest) + uses: smartcontractkit/.github/actions/ci-publish-npm@4b0ab756abcb1760cb82e1e87b94ff431905bffc # ci-publish-npm@0.4.0 with: npm-token: ${{ secrets.NPM_TOKEN }} github-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.gitignore b/.gitignore index 7d07300311f..b286c329292 100644 --- a/.gitignore +++ b/.gitignore @@ -23,7 +23,9 @@ tools/clroot/db.sqlite3-wal .DS_Store .envrc .env* +.dbenv !charts/chainlink-cluster/.env.example +!crib/.env.example !.github/actions/setup-postgres/.env .direnv .idea @@ -49,6 +51,7 @@ output.txt race.* golangci-lint-output.txt /golangci-lint/ +.covdata # DB state ./db/ diff --git a/GNUmakefile b/GNUmakefile index 10d72cb724c..524786585e9 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -45,6 +45,10 @@ docs: ## Install and run pkgsite to view Go docs install-chainlink: operator-ui ## Install the chainlink binary. go install $(GOFLAGS) . +.PHONY: install-chainlink-cover +install-chainlink-cover: operator-ui ## Install the chainlink binary with cover flag. + go install -cover $(GOFLAGS) . + .PHONY: chainlink chainlink: ## Build the chainlink binary. go build $(GOFLAGS) . @@ -104,6 +108,10 @@ testscripts: chainlink-test ## Install and run testscript against testdata/scrip testscripts-update: ## Update testdata/scripts/* files via testscript. make testscripts TS_FLAGS="-u" +.PHONY: setup-testdb +setup-testdb: ## Setup the test database. + ./core/scripts/setup_testdb.sh + .PHONY: testdb testdb: ## Prepares the test database. go run . local db preparetest @@ -125,7 +133,7 @@ gomods: ## Install gomods .PHONY: mockery mockery: $(mockery) ## Install mockery. - go install github.com/vektra/mockery/v2@v2.38.0 + go install github.com/vektra/mockery/v2@v2.42.2 .PHONY: codecgen codecgen: $(codecgen) ## Install codecgen diff --git a/README.md b/README.md index 167fae4adee..447efb9cdea 100644 --- a/README.md +++ b/README.md @@ -167,20 +167,28 @@ go generate ./... 5. Prepare your development environment: -```bash -export CL_DATABASE_URL=postgresql://127.0.0.1:5432/chainlink_test?sslmode=disable -``` +The tests require a postgres database. In turn, the environment variable +`CL_DATABASE_URL` must be set to value that can connect to `_test` database, and the user must be able to create and drop +the given `_test` database. Note: Other environment variables should not be set for all tests to pass -6. Drop/Create test database and run migrations: +There helper script for initial setup to create an appropriate test user. It requires postgres to be running on localhost at port 5432. You will be prompted for +the `postgres` user password +```bash +make setup-testdb ``` + +This script will save the `CL_DATABASE_URL` in `.dbenv` + +Changes to database require migrations to be run. Similarly, `pull`'ing the repo may require migrations to run. +After the one-time setup above: +``` +source .dbenv make testdb ``` -If you do end up modifying the migrations for the database, you will need to rerun - 7. Run tests: ```bash diff --git a/charts/chainlink-cluster/.gitignore b/charts/chainlink-cluster/.gitignore index 3ee791f740a..9e704020530 100644 --- a/charts/chainlink-cluster/.gitignore +++ b/charts/chainlink-cluster/.gitignore @@ -1,3 +1,7 @@ # Helm charts/ requirements.lock +.rendered +values-profiles/* +!values-profiles/values-dev.yaml.example +!values-profiles/README.md \ No newline at end of file diff --git a/charts/chainlink-cluster/Chart.lock b/charts/chainlink-cluster/Chart.lock index 38e7f09705e..11ebdfdf691 100644 --- a/charts/chainlink-cluster/Chart.lock +++ b/charts/chainlink-cluster/Chart.lock @@ -12,4 +12,4 @@ dependencies: repository: https://grafana.github.io/helm-charts version: 7.3.2 digest: sha256:37722063f68689c42ac1d6549ddfae4756370c1659b8ac1c0d7da8916c6fad3d -generated: "2024-02-27T11:04:29.920915-06:00" +generated: "2024-04-23T17:49:50.347667-04:00" diff --git a/charts/chainlink-cluster/Chart.yaml b/charts/chainlink-cluster/Chart.yaml index fa45ea9bd77..d8d3dd98b22 100644 --- a/charts/chainlink-cluster/Chart.yaml +++ b/charts/chainlink-cluster/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v2 name: chainlink-cluster description: Chainlink nodes cluster -version: 0.4.0 +version: 0.4.2 appVersion: "2.6.0" dependencies: - name: mockserver diff --git a/charts/chainlink-cluster/README.md b/charts/chainlink-cluster/README.md index a0a4b8a78cc..403ab9b876a 100644 --- a/charts/chainlink-cluster/README.md +++ b/charts/chainlink-cluster/README.md @@ -1,10 +1,9 @@ # Chainlink cluster Example CL nodes cluster for system level tests - Install `kubefwd` (no nixpkg for it yet, planned) -``` +```sh brew install txn2/tap/kubefwd ``` @@ -12,7 +11,7 @@ If you want to build images you need [docker](https://docs.docker.com/engine/ins Enter the shell (from the root project dir) -``` +```sh nix develop ``` @@ -26,7 +25,7 @@ Configure the cluster, see `deployments.app.helm.values` and [values.yaml](./val Set up your K8s access -``` +```sh export DEVSPACE_IMAGE="..." ./setup.sh ${my-personal-namespace-name-crib} ``` @@ -40,7 +39,7 @@ cp .env.sample .env Build and deploy the current state of your repository -``` +```sh devspace deploy ``` @@ -48,38 +47,51 @@ Default `ttl` is `72h`, use `ttl` command to update if you need more time Valid values are `1h`, `2m`, `3s`, etc. Go time format is invalid `1h2m3s` -``` +```sh devspace run ttl ${namespace} 120h ``` If you want to deploy an image tag that is already available in ECR, use: -``` +```sh devspace deploy --override-image-tag "" ``` If you want to deploy an image tag from a public ECR repo, use: -``` +```sh export DEVSPACE_IMAGE=public.ecr.aws/chainlink/chainlink devspace deploy --override-image-tag 2.9.0 ``` -Forward ports to check UI or run tests +To apply custom TOML configuration specific for your nodes, create a `values-dev.yaml` file in the `./values-profiles` directory. Start by copying the example file: +```sh +cp values-profiles/values-dev.yaml.example values-profiles/values-dev.yaml + +``` + +Then customize the values-dev.yaml file as needed. To use this configuration during deployment, pass the --profile local-dev flag: + +```sh +devspace deploy --profile local-dev ``` + +Forward ports to check UI or run tests + +```sh devspace run connect ${my-personal-namespace-name-crib} ``` List ingress hostnames -``` +```sh devspace run ingress-hosts ``` Destroy the cluster -``` +```sh devspace purge ``` @@ -95,13 +107,13 @@ If you would like to use `helm` directly, please uncomment data in `values.yaml` ## Install from local files -``` +```sh helm install -f values.yaml cl-cluster . ``` Forward all apps (in another terminal) -``` +```sh sudo kubefwd svc -n cl-cluster ``` @@ -111,37 +123,31 @@ Then you can connect and run your tests Add the repository -``` +```sh helm repo add chainlink-cluster https://raw.githubusercontent.com/smartcontractkit/chainlink/helm-release/ helm repo update ``` Set default namespace -``` +```sh kubectl create ns cl-cluster kubectl config set-context --current --namespace cl-cluster ``` -Install - -``` -helm install -f values.yaml cl-cluster . -``` - ## Create a new release Bump version in `Chart.yml` add your changes and add `helm_release` label to any PR to trigger a release ## Helm Test -``` +```sh helm test cl-cluster ``` ## Uninstall -``` +```sh helm uninstall cl-cluster ``` @@ -151,10 +157,7 @@ We are using [Grabana](https://github.com/K-Phoen/grabana) lib to create dashboa You can also select dashboard platform in `INFRA_PLATFORM` either `kubernetes` or `docker` -You can select the dashboard panels with `PANELS_INCLUDED` which is a list of panel names separated by comma -If you don't specify it will include core panels by default - -``` +```sh export LOKI_TENANT_ID=promtail export LOKI_URL=... export GRAFANA_URL=... @@ -162,33 +165,10 @@ export GRAFANA_TOKEN=... export PROMETHEUS_DATA_SOURCE_NAME=Thanos export LOKI_DATA_SOURCE_NAME=Loki export INFRA_PLATFORM=kubernetes -export GRAFANA_FOLDER=DashboardCoreDebug -export DASHBOARD_NAME=CL-Cluster +export GRAFANA_FOLDER=CRIB +export DASHBOARD_NAME=Core-Cluster-Load devspace run dashboard_deploy ``` Open Grafana folder `DashboardCoreDebug` and find dashboard `ChainlinkClusterDebug` - -# Testing - -Deploy your dashboard and run soak/load [tests](../../integration-tests/load/), check [README](../../integration-tests/README.md) for further explanations - -``` -devspace run dashboard_deploy -devspace run workload -devspace run dashboard_test -``` - -# Local Testing - -Go to [dashboard-lib](../../dashboard) and link the modules locally - -``` -cd dashboard -pnpm link --global -cd charts/chainlink-cluster/dashboard/tests -pnpm link --global dashboard-tests -``` - -Then run the tests with commands mentioned above diff --git a/charts/chainlink-cluster/templates/chainlink-cm.yaml b/charts/chainlink-cluster/templates/chainlink-cm.yaml index 9a99e2a5128..bd0c911331c 100644 --- a/charts/chainlink-cluster/templates/chainlink-cm.yaml +++ b/charts/chainlink-cluster/templates/chainlink-cm.yaml @@ -16,9 +16,11 @@ data: CREATE EXTENSION pg_stat_statements; default.toml: | - {{ if (hasKey $cfg "toml") }} - {{ $cfg.toml | nindent 4 }} - {{ else }} + {{- if (hasKey $cfg "toml") }} + {{ $cfg.toml | nindent 4 }} + {{- else if and (hasKey $.Values.chainlink.global "toml") $.Values.chainlink.global.toml }} + {{ $.Values.chainlink.global.toml | nindent 4 }} + {{- else }} RootDir = './clroot' [Log] JSONConsole = true @@ -57,12 +59,14 @@ data: {{- end }} [WebServer.TLS] HTTPSPort = 0 - {{ end }} + {{- end }} overrides.toml: | - {{ if (hasKey $cfg "overridesToml") }} - {{ $cfg.overridesToml | nindent 4 }} + {{- if (hasKey $cfg "overridesToml") }} + {{- $cfg.overridesToml | nindent 4 }} + {{- else if and (hasKey $.Values.chainlink.global "overridesToml") $.Values.chainlink.global.overridesToml }} + {{- $.Values.chainlink.global.overridesToml | nindent 4 }} {{ else }} - {{ end }} + {{- end }} secrets.toml: | {{ if (hasKey $cfg "secretsToml") }} {{ $cfg.secretsToml | nindent 4 }} diff --git a/charts/chainlink-cluster/values-profiles/README.md b/charts/chainlink-cluster/values-profiles/README.md new file mode 100644 index 00000000000..7f5b6df4904 --- /dev/null +++ b/charts/chainlink-cluster/values-profiles/README.md @@ -0,0 +1,3 @@ +# values-profiles + +Store helm values files for different [DevSpace profiles](https://www.devspace.sh/docs/configuration/profiles/) here. The convention is to make the yaml file name in here match the DevSpace profile name. diff --git a/charts/chainlink-cluster/values-profiles/values-dev.yaml.example b/charts/chainlink-cluster/values-profiles/values-dev.yaml.example new file mode 100644 index 00000000000..99151149182 --- /dev/null +++ b/charts/chainlink-cluster/values-profiles/values-dev.yaml.example @@ -0,0 +1,95 @@ +# Disable geth if using existing testnets. +geth: + enabled: false +chainlink: + global: + toml: |- + RootDir = './clroot' + [Log] + JSONConsole = true + Level = 'debug' + [WebServer] + AllowOrigins = '*' + SecureCookies = false + SessionTimeout = '999h0m0s' + [Feature] + FeedsManager = true + LogPoller = true + UICSAKeys = true + [OCR] + Enabled = true + DefaultTransactionQueueDepth = 0 + [P2P] + [P2P.V2] + Enabled = true + ListenAddresses = ['0.0.0.0:6690'] + AnnounceAddresses = ['0.0.0.0:6690'] + DeltaDial = '500ms' + DeltaReconcile = '5s' + [[EVM]] + # Avax Fuji Testnet + ChainID = "43113" + MinContractPayment = '0' + AutoCreateKey = true + FinalityDepth = 1 + [[EVM.Nodes]] + Name = 'avax-fuji-testnet-official' + WSURL = 'wss://api.avax-test.network/ext/bc/C/ws' + HTTPURL = 'https://api.avax-test.network/ext/bc/C/rpc' + [[EVM]] + # BSC Testnet + ChainID = "97" + MinContractPayment = '0' + AutoCreateKey = true + FinalityDepth = 1 + [[EVM.Nodes]] + Name = 'bsc-testnet-official' + HTTPURL = 'https://data-seed-prebsc-1-s.bnbchain.org:8545' + WSURL = 'wss://data-seed-prebsc-1-s1.binance.org:8545/' + [WebServer.TLS] + HTTPSPort = 0 + + overridesToml: |- + [Feature] + LogPoller = true + + [Log] + Level = 'debug' + JSONConsole = true + + [Log.File] + MaxSize = '0b' + + [WebServer] + AllowOrigins = '*' + HTTPPort = 6688 + SecureCookies = false + HTTPWriteTimeout = '1m' + + [WebServer.RateLimit] + Authenticated = 2000 + Unauthenticated = 1000 + + [WebServer.TLS] + HTTPSPort = 0 + + [Database] + MaxIdleConns = 50 + MaxOpenConns = 50 + MigrateOnStartup = true + + [OCR2] + Enabled = true + DefaultTransactionQueueDepth = 0 + + [OCR] + Enabled = false + DefaultTransactionQueueDepth = 0 + + [P2P] + [P2P.V2] + Enabled = true + ListenAddresses = ['0.0.0.0:6690'] + AnnounceAddresses = ['0.0.0.0:6690'] + DeltaDial = '500ms' + DeltaReconcile = '5s' \ No newline at end of file diff --git a/charts/chainlink-cluster/values.yaml b/charts/chainlink-cluster/values.yaml index ed497a65ff9..d6315f488fd 100644 --- a/charts/chainlink-cluster/values.yaml +++ b/charts/chainlink-cluster/values.yaml @@ -11,6 +11,23 @@ # version: stable chainlink: enabled: true + global: + # `toml` is initially set to null. Uncomment and modify the following example as needed. + # Example configuration parameters for all Chainlink nodes. Can be overridden by individual node configurations and via `overridesToml`. + # toml: |- + # [Log] + # Level = 'info' + # [WebServer] + # HTTPPort = 6688 + toml: null + # `overridesToml` is initially set to null. Uncomment and modify the following example as needed. + # Example configuration parameters that override the main configuration. + # overridesToml: |- + # [Log] + # Level = 'debug' + # [WebServer] + # HTTPPort = 6690 + overridesToml: null podSecurityContext: fsGroup: 14933 securityContext: @@ -73,13 +90,6 @@ chainlink: - name: node-4 - name: node-5 - name: node-6 - resources: - requests: - cpu: 350m - memory: 1024Mi - limits: - cpu: 350m - memory: 1024Mi # each CL node have a dedicated PostgreSQL 11.15 # use StatefulSet by setting: diff --git a/common/client/mock_head_test.go b/common/client/mock_head_test.go index e68a047e078..9a66e164aa0 100644 --- a/common/client/mock_head_test.go +++ b/common/client/mock_head_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. package client diff --git a/common/client/mock_node_client_test.go b/common/client/mock_node_client_test.go index dfe9f32664a..ec83158a5ff 100644 --- a/common/client/mock_node_client_test.go +++ b/common/client/mock_node_client_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. package client diff --git a/common/client/mock_node_selector_test.go b/common/client/mock_node_selector_test.go index bd0805fa4e6..996d064daa4 100644 --- a/common/client/mock_node_selector_test.go +++ b/common/client/mock_node_selector_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. package client diff --git a/common/client/mock_node_test.go b/common/client/mock_node_test.go index 56132b2cee8..ee2cacb9274 100644 --- a/common/client/mock_node_test.go +++ b/common/client/mock_node_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. package client diff --git a/common/client/mock_rpc_test.go b/common/client/mock_rpc_test.go index 731d0f94cf2..54f57e81f65 100644 --- a/common/client/mock_rpc_test.go +++ b/common/client/mock_rpc_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. package client diff --git a/common/client/mock_send_only_client_test.go b/common/client/mock_send_only_client_test.go index b667a2ceb59..b07e10ed8ce 100644 --- a/common/client/mock_send_only_client_test.go +++ b/common/client/mock_send_only_client_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. package client diff --git a/common/client/mock_send_only_node_test.go b/common/client/mock_send_only_node_test.go index 0a319db5f78..4822c2620b8 100644 --- a/common/client/mock_send_only_node_test.go +++ b/common/client/mock_send_only_node_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. package client diff --git a/common/client/node.go b/common/client/node.go index 61816be21da..6450b086f10 100644 --- a/common/client/node.go +++ b/common/client/node.go @@ -9,6 +9,8 @@ import ( "sync" "time" + "github.com/smartcontractkit/chainlink/v2/core/chains/evm/config" + "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promauto" @@ -45,6 +47,7 @@ type NodeConfig interface { SyncThreshold() uint32 NodeIsSyncingEnabled() bool FinalizedBlockPollInterval() time.Duration + Errors() config.ClientErrors } type ChainConfig interface { diff --git a/common/client/node_test.go b/common/client/node_test.go index a97f26555a9..85c96145740 100644 --- a/common/client/node_test.go +++ b/common/client/node_test.go @@ -9,6 +9,7 @@ import ( clientMocks "github.com/smartcontractkit/chainlink/v2/common/client/mocks" "github.com/smartcontractkit/chainlink/v2/common/types" + "github.com/smartcontractkit/chainlink/v2/core/chains/evm/config" ) type testNodeConfig struct { @@ -18,6 +19,7 @@ type testNodeConfig struct { syncThreshold uint32 nodeIsSyncingEnabled bool finalizedBlockPollInterval time.Duration + errors config.ClientErrors } func (n testNodeConfig) PollFailureThreshold() uint32 { @@ -44,6 +46,10 @@ func (n testNodeConfig) FinalizedBlockPollInterval() time.Duration { return n.finalizedBlockPollInterval } +func (n testNodeConfig) Errors() config.ClientErrors { + return n.errors +} + type testNode struct { *node[types.ID, Head, NodeClient[types.ID, Head]] } diff --git a/common/headtracker/mocks/head_trackable.go b/common/headtracker/mocks/head_trackable.go index 22bc5cb280a..417152d8cbd 100644 --- a/common/headtracker/mocks/head_trackable.go +++ b/common/headtracker/mocks/head_trackable.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. package mocks diff --git a/common/headtracker/mocks/head_tracker.go b/common/headtracker/mocks/head_tracker.go index 9261ef3221b..2321c3bfdca 100644 --- a/common/headtracker/mocks/head_tracker.go +++ b/common/headtracker/mocks/head_tracker.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. package mocks diff --git a/common/txmgr/mocks/tx_manager.go b/common/txmgr/mocks/tx_manager.go index a5f05219217..935e7313817 100644 --- a/common/txmgr/mocks/tx_manager.go +++ b/common/txmgr/mocks/tx_manager.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. package mocks diff --git a/common/txmgr/types/mocks/forwarder_manager.go b/common/txmgr/types/mocks/forwarder_manager.go index bf61d0c3d27..fe40e7bb5e2 100644 --- a/common/txmgr/types/mocks/forwarder_manager.go +++ b/common/txmgr/types/mocks/forwarder_manager.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. package mocks diff --git a/common/txmgr/types/mocks/key_store.go b/common/txmgr/types/mocks/key_store.go index 7e825322977..f6f572a35ff 100644 --- a/common/txmgr/types/mocks/key_store.go +++ b/common/txmgr/types/mocks/key_store.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. package mocks diff --git a/common/txmgr/types/mocks/reaper_chain_config.go b/common/txmgr/types/mocks/reaper_chain_config.go index 041214b80c6..716b3e5175a 100644 --- a/common/txmgr/types/mocks/reaper_chain_config.go +++ b/common/txmgr/types/mocks/reaper_chain_config.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. package mocks diff --git a/common/txmgr/types/mocks/tx_attempt_builder.go b/common/txmgr/types/mocks/tx_attempt_builder.go index 20ecbde0945..8171b29bbed 100644 --- a/common/txmgr/types/mocks/tx_attempt_builder.go +++ b/common/txmgr/types/mocks/tx_attempt_builder.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. package mocks diff --git a/common/txmgr/types/mocks/tx_store.go b/common/txmgr/types/mocks/tx_store.go index 64193afff5b..be2c0aef723 100644 --- a/common/txmgr/types/mocks/tx_store.go +++ b/common/txmgr/types/mocks/tx_store.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. package mocks diff --git a/common/txmgr/types/mocks/tx_strategy.go b/common/txmgr/types/mocks/tx_strategy.go index 92d4b7da569..414fdb44cb0 100644 --- a/common/txmgr/types/mocks/tx_strategy.go +++ b/common/txmgr/types/mocks/tx_strategy.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. package mocks diff --git a/common/types/mocks/head.go b/common/types/mocks/head.go index fd5c95d472f..a8cbca07355 100644 --- a/common/types/mocks/head.go +++ b/common/types/mocks/head.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. package mocks diff --git a/contracts/.changeset/afraid-seahorses-yell.md b/contracts/.changeset/afraid-seahorses-yell.md deleted file mode 100644 index 2d45c33320d..00000000000 --- a/contracts/.changeset/afraid-seahorses-yell.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@chainlink/contracts": minor ---- - -Chainlink Functions contracts v1.3.0 diff --git a/contracts/.changeset/afraid-years-fix.md b/contracts/.changeset/afraid-years-fix.md deleted file mode 100644 index 7048f562312..00000000000 --- a/contracts/.changeset/afraid-years-fix.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@chainlink/contracts": patch ---- - -upgraded transmission to 0.8.19 diff --git a/contracts/.changeset/clever-kings-smell.md b/contracts/.changeset/clever-kings-smell.md deleted file mode 100644 index eee8eddf53a..00000000000 --- a/contracts/.changeset/clever-kings-smell.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -"@chainlink/contracts": minor ---- - -- Misc VRF V2+ contract changes - - Reuse struct RequestCommitmentV2Plus from VRFTypes - - Fix interface name IVRFCoordinatorV2PlusFulfill in BatchVRFCoordinatorV2Plus to avoid confusion with IVRFCoordinatorV2Plus.sol - - Remove unused errors - - Rename variables for readability - - Fix comments - - Minor gas optimisation (++i) diff --git a/contracts/.changeset/curly-guests-add.md b/contracts/.changeset/curly-guests-add.md deleted file mode 100644 index 1bf40fbeab6..00000000000 --- a/contracts/.changeset/curly-guests-add.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@chainlink/contracts": minor ---- - -improve foundry tests diff --git a/contracts/.changeset/early-hairs-wonder.md b/contracts/.changeset/early-hairs-wonder.md deleted file mode 100644 index 808c89f8451..00000000000 --- a/contracts/.changeset/early-hairs-wonder.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@chainlink/contracts": patch ---- - -fix bug in auto2.3 withdrawERC20Fees diff --git a/contracts/.changeset/eight-peas-glow.md b/contracts/.changeset/eight-peas-glow.md deleted file mode 100644 index 03c0498abe2..00000000000 --- a/contracts/.changeset/eight-peas-glow.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@chainlink/contracts": minor ---- - -VRFV2PlusWrapper config refactor diff --git a/contracts/.changeset/famous-feet-rescue.md b/contracts/.changeset/famous-feet-rescue.md deleted file mode 100644 index d955046ceb9..00000000000 --- a/contracts/.changeset/famous-feet-rescue.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@chainlink/contracts": patch ---- - -fix withdraw LINK bug in auto 2.3 diff --git a/contracts/.changeset/fast-maps-rush.md b/contracts/.changeset/fast-maps-rush.md deleted file mode 100644 index a9a25116758..00000000000 --- a/contracts/.changeset/fast-maps-rush.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@chainlink/contracts": minor ---- - -pay deactivated transmitters in offchain settlement diff --git a/contracts/.changeset/fluffy-peaches-provide.md b/contracts/.changeset/fluffy-peaches-provide.md deleted file mode 100644 index cf6f001ac2e..00000000000 --- a/contracts/.changeset/fluffy-peaches-provide.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@chainlink/contracts": patch ---- - -added logic C contract to automation 2.3 diff --git a/contracts/.changeset/forty-ways-ring.md b/contracts/.changeset/forty-ways-ring.md deleted file mode 100644 index 620d2ca1d84..00000000000 --- a/contracts/.changeset/forty-ways-ring.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@chainlink/contracts": patch ---- - -upgrade solc version to 0.8.19 for vrf v2.5 contracts diff --git a/contracts/.changeset/fresh-zoos-marry.md b/contracts/.changeset/fresh-zoos-marry.md deleted file mode 100644 index 32af56e63ac..00000000000 --- a/contracts/.changeset/fresh-zoos-marry.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@chainlink/contracts": patch ---- - -enable gas tests for auto 2.3 diff --git a/contracts/.changeset/happy-books-taste.md b/contracts/.changeset/happy-books-taste.md deleted file mode 100644 index 4b758a65a2e..00000000000 --- a/contracts/.changeset/happy-books-taste.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@chainlink/contracts": patch ---- - -billing overrides diff --git a/contracts/.changeset/heavy-lions-pull.md b/contracts/.changeset/heavy-lions-pull.md deleted file mode 100644 index 236c4ad033e..00000000000 --- a/contracts/.changeset/heavy-lions-pull.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@chainlink/contracts": minor ---- - -Update type and version name for VRFv2+ Wrapper diff --git a/contracts/.changeset/loud-donuts-work.md b/contracts/.changeset/hungry-days-occur.md similarity index 66% rename from contracts/.changeset/loud-donuts-work.md rename to contracts/.changeset/hungry-days-occur.md index e177af6fb3e..ca1a703a472 100644 --- a/contracts/.changeset/loud-donuts-work.md +++ b/contracts/.changeset/hungry-days-occur.md @@ -2,4 +2,4 @@ "@chainlink/contracts": patch --- -rm hh coverage +set cleanup #bugfix diff --git a/contracts/.changeset/lazy-sheep-invite.md b/contracts/.changeset/lazy-sheep-invite.md deleted file mode 100644 index 77f42295232..00000000000 --- a/contracts/.changeset/lazy-sheep-invite.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@chainlink/contracts": minor ---- - -implement offchain settlement for NOPs payment diff --git a/contracts/.changeset/lucky-bananas-kneel.md b/contracts/.changeset/lucky-bananas-kneel.md deleted file mode 100644 index 2c2b8d5b321..00000000000 --- a/contracts/.changeset/lucky-bananas-kneel.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@chainlink/contracts": patch ---- - -mv vrf foundry tests diff --git a/contracts/.changeset/lucky-eels-kiss.md b/contracts/.changeset/lucky-eels-kiss.md deleted file mode 100644 index 2279cb107b9..00000000000 --- a/contracts/.changeset/lucky-eels-kiss.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@chainlink/contracts": patch ---- - -VRFV2PlusWrapper contract: subID param added to the constructor, removed migrate() method diff --git a/contracts/.changeset/many-onions-run.md b/contracts/.changeset/many-onions-run.md deleted file mode 100644 index 6c186c9d99c..00000000000 --- a/contracts/.changeset/many-onions-run.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@chainlink/contracts": patch ---- - -safeTransfer and cleanups diff --git a/contracts/.changeset/modern-horses-destroy.md b/contracts/.changeset/modern-horses-destroy.md deleted file mode 100644 index 32e58da8ff3..00000000000 --- a/contracts/.changeset/modern-horses-destroy.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@chainlink/contracts": patch ---- - -fix solhint issues in automation folder diff --git a/contracts/.changeset/nine-comics-bathe.md b/contracts/.changeset/nine-comics-bathe.md deleted file mode 100644 index 7d8573cd784..00000000000 --- a/contracts/.changeset/nine-comics-bathe.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@chainlink/contracts": minor ---- - -Removed 0.6 and 0.7 Solidity source code diff --git a/contracts/.changeset/odd-experts-jump.md b/contracts/.changeset/odd-experts-jump.md deleted file mode 100644 index d82c762477c..00000000000 --- a/contracts/.changeset/odd-experts-jump.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@chainlink/contracts": patch ---- - -address TODOs and docs for 2.3 diff --git a/contracts/.changeset/pretty-cups-tickle.md b/contracts/.changeset/pretty-cups-tickle.md deleted file mode 100644 index a7c5625a4e1..00000000000 --- a/contracts/.changeset/pretty-cups-tickle.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@chainlink/contracts": patch ---- - -auto 2.3 foundry test refactor diff --git a/contracts/.changeset/quick-vans-retire.md b/contracts/.changeset/quick-vans-retire.md deleted file mode 100644 index ad0e6859957..00000000000 --- a/contracts/.changeset/quick-vans-retire.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@chainlink/contracts": minor ---- - -introduce native billing support to automation registry v2.3 diff --git a/contracts/.changeset/quiet-cars-taste.md b/contracts/.changeset/quiet-cars-taste.md deleted file mode 100644 index f59f3e6d05c..00000000000 --- a/contracts/.changeset/quiet-cars-taste.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@chainlink/contracts": patch ---- - -more auto 2.3 tests diff --git a/contracts/.changeset/six-donuts-reply.md b/contracts/.changeset/six-donuts-reply.md deleted file mode 100644 index a9da93964be..00000000000 --- a/contracts/.changeset/six-donuts-reply.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@chainlink/contracts": patch ---- - -small gas fix diff --git a/contracts/.changeset/smooth-spiders-beam.md b/contracts/.changeset/smooth-spiders-beam.md deleted file mode 100644 index edf804c910b..00000000000 --- a/contracts/.changeset/smooth-spiders-beam.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@chainlink/contracts": patch ---- - -change auto 2.3 flat fees from link to USD diff --git a/contracts/.changeset/strange-actors-do.md b/contracts/.changeset/strange-actors-do.md deleted file mode 100644 index 644e30f2a09..00000000000 --- a/contracts/.changeset/strange-actors-do.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@chainlink/contracts": patch ---- - -Set LINK native feed in VRFV2PlusWrapper to immutable diff --git a/contracts/.changeset/tasty-rings-bow.md b/contracts/.changeset/tasty-rings-bow.md deleted file mode 100644 index 828050c6eeb..00000000000 --- a/contracts/.changeset/tasty-rings-bow.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@chainlink/contracts": patch ---- - -add billing override test diff --git a/contracts/.changeset/three-spoons-clean.md b/contracts/.changeset/three-spoons-clean.md deleted file mode 100644 index f822a9cb274..00000000000 --- a/contracts/.changeset/three-spoons-clean.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@chainlink/contracts": patch ---- - -use common interface for v2.3 diff --git a/contracts/.changeset/tricky-pigs-shout.md b/contracts/.changeset/tricky-pigs-shout.md deleted file mode 100644 index 095fc06701c..00000000000 --- a/contracts/.changeset/tricky-pigs-shout.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@chainlink/contracts": minor ---- - -bug fixes in s_reserveAmount accounting diff --git a/contracts/.changeset/weak-kangaroos-heal.md b/contracts/.changeset/weak-kangaroos-heal.md deleted file mode 100644 index 0cba92dd998..00000000000 --- a/contracts/.changeset/weak-kangaroos-heal.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@chainlink/contracts": patch ---- - -bump solhint and address issues, remove unused imports diff --git a/contracts/.changeset/wise-shrimps-perform.md b/contracts/.changeset/wise-shrimps-perform.md deleted file mode 100644 index b623b1432d3..00000000000 --- a/contracts/.changeset/wise-shrimps-perform.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@chainlink/contracts": patch ---- - -support native payment diff --git a/contracts/.changeset/young-crabs-sing.md b/contracts/.changeset/young-crabs-sing.md deleted file mode 100644 index c0593d869b6..00000000000 --- a/contracts/.changeset/young-crabs-sing.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@chainlink/contracts": minor ---- - -removed 0.4 and 0.5 contracts diff --git a/contracts/.changeset/young-insects-punch.md b/contracts/.changeset/young-insects-punch.md deleted file mode 100644 index 47d01926978..00000000000 --- a/contracts/.changeset/young-insects-punch.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@chainlink/contracts": patch ---- - -increase num optimizations to 500 for v2.5 coordinator diff --git a/contracts/CHANGELOG.md b/contracts/CHANGELOG.md index 1740f95d205..667a5ad2529 100644 --- a/contracts/CHANGELOG.md +++ b/contracts/CHANGELOG.md @@ -1,8 +1,86 @@ # @chainlink/contracts CHANGELOG.md -## Unreleased +## 1.1.0 + +### Minor Changes + +- [#12481](https://github.com/smartcontractkit/chainlink/pull/12481) [`daa90db289`](https://github.com/smartcontractkit/chainlink/commit/daa90db289f84829a607b41792f7d231871a5462) Thanks [@justinkaseman](https://github.com/justinkaseman)! - Chainlink Functions contracts v1.3.0 + +- [#12489](https://github.com/smartcontractkit/chainlink/pull/12489) [`3a49094db2`](https://github.com/smartcontractkit/chainlink/commit/3a49094db25036e1948818e4030fca11be748914) Thanks [@kidambisrinivas](https://github.com/kidambisrinivas)! - - Misc VRF V2+ contract changes + + - Reuse struct RequestCommitmentV2Plus from VRFTypes + - Fix interface name IVRFCoordinatorV2PlusFulfill in BatchVRFCoordinatorV2Plus to avoid confusion with IVRFCoordinatorV2Plus.sol + - Remove unused errors + - Rename variables for readability + - Fix comments + - Minor gas optimisation (++i) + +- [#12522](https://github.com/smartcontractkit/chainlink/pull/12522) [`886201638e`](https://github.com/smartcontractkit/chainlink/commit/886201638e14dc478ae7104b4a5aed9ac8af5bba) Thanks [@FelixFan1992](https://github.com/FelixFan1992)! - improve foundry tests + +- [#12581](https://github.com/smartcontractkit/chainlink/pull/12581) [`6fcc73983e`](https://github.com/smartcontractkit/chainlink/commit/6fcc73983e5b782bb4ac577cb33093bf80e3a582) Thanks [@kidambisrinivas](https://github.com/kidambisrinivas)! - VRFV2PlusWrapper config refactor + +- [#12547](https://github.com/smartcontractkit/chainlink/pull/12547) [`8162f7b101`](https://github.com/smartcontractkit/chainlink/commit/8162f7b1012dd669e51bbb4038a6d5df29906267) Thanks [@FelixFan1992](https://github.com/FelixFan1992)! - pay deactivated transmitters in offchain settlement + +- [#12466](https://github.com/smartcontractkit/chainlink/pull/12466) [`f9d02e3192`](https://github.com/smartcontractkit/chainlink/commit/f9d02e3192f1a35fda05ca69a50f986c9149748f) Thanks [@vreff](https://github.com/vreff)! - Update type and version name for VRFv2+ Wrapper + +- [#12469](https://github.com/smartcontractkit/chainlink/pull/12469) [`1370133b72`](https://github.com/smartcontractkit/chainlink/commit/1370133b722ab97650b15c6aeab72bb494790b63) Thanks [@FelixFan1992](https://github.com/FelixFan1992)! - implement offchain settlement for NOPs payment + +- [#12578](https://github.com/smartcontractkit/chainlink/pull/12578) [`ffd492295f`](https://github.com/smartcontractkit/chainlink/commit/ffd492295f03de8c3b946a003dacbded731d7899) Thanks [@RensR](https://github.com/RensR)! - Removed 0.6 and 0.7 Solidity source code + +- [#12418](https://github.com/smartcontractkit/chainlink/pull/12418) [`22114fb20a`](https://github.com/smartcontractkit/chainlink/commit/22114fb20a67e2263ffb6d445530559f02423809) Thanks [@RyanRHall](https://github.com/RyanRHall)! - introduce native billing support to automation registry v2.3 + +- [#12583](https://github.com/smartcontractkit/chainlink/pull/12583) [`50724c3bb1`](https://github.com/smartcontractkit/chainlink/commit/50724c3bb1fb959f85d361bc0615f58cc16e4fc9) Thanks [@FelixFan1992](https://github.com/FelixFan1992)! - bug fixes in s_reserveAmount accounting + +- [#12569](https://github.com/smartcontractkit/chainlink/pull/12569) [`98ef65add8`](https://github.com/smartcontractkit/chainlink/commit/98ef65add85dc4c22333bf413fa7b593c501212d) Thanks [@RensR](https://github.com/RensR)! - removed 0.4 and 0.5 contracts + +### Patch Changes + +- [#12612](https://github.com/smartcontractkit/chainlink/pull/12612) [`d44abe3769`](https://github.com/smartcontractkit/chainlink/commit/d44abe37693d6995377fa1329e433e7fba26885d) Thanks [@RensR](https://github.com/RensR)! - upgraded transmission to 0.8.19 + +- [#12582](https://github.com/smartcontractkit/chainlink/pull/12582) [`684afa4e1f`](https://github.com/smartcontractkit/chainlink/commit/684afa4e1fcb2cad292cbc3b97ebeda3e3ef7bc8) Thanks [@RyanRHall](https://github.com/RyanRHall)! - fix bug in auto2.3 withdrawERC20Fees + +- [#12591](https://github.com/smartcontractkit/chainlink/pull/12591) [`b3086d0ec2`](https://github.com/smartcontractkit/chainlink/commit/b3086d0ec2565badaafdbb9c26e30caeb6fb41c9) Thanks [@RyanRHall](https://github.com/RyanRHall)! - fix withdraw LINK bug in auto 2.3 + +- [#12497](https://github.com/smartcontractkit/chainlink/pull/12497) [`3ca3494450`](https://github.com/smartcontractkit/chainlink/commit/3ca34944507b01b7d4511d8ea8aff402c0a7bb85) Thanks [@RyanRHall](https://github.com/RyanRHall)! - added logic C contract to automation 2.3 + +- [#12479](https://github.com/smartcontractkit/chainlink/pull/12479) [`93762ccbd8`](https://github.com/smartcontractkit/chainlink/commit/93762ccbd868b9e227abf3220afb9ad22ba41b92) Thanks [@jinhoonbang](https://github.com/jinhoonbang)! - upgrade solc version to 0.8.19 for vrf v2.5 contracts + +- [#12619](https://github.com/smartcontractkit/chainlink/pull/12619) [`6531e34865`](https://github.com/smartcontractkit/chainlink/commit/6531e348659e2b7048b25183eadddbcb10426741) Thanks [@RyanRHall](https://github.com/RyanRHall)! - enable gas tests for auto 2.3 + +- [#12536](https://github.com/smartcontractkit/chainlink/pull/12536) [`87b0d8f309`](https://github.com/smartcontractkit/chainlink/commit/87b0d8f3091e3276cd049d3a852ab63e4d6bda5b) Thanks [@shileiwill](https://github.com/shileiwill)! - billing overrides + +- [#12614](https://github.com/smartcontractkit/chainlink/pull/12614) [`93ff878b2d`](https://github.com/smartcontractkit/chainlink/commit/93ff878b2d88f6e928cdb6a8a830fb8ee100bddd) Thanks [@RensR](https://github.com/RensR)! - rm hh coverage + +- [#12613](https://github.com/smartcontractkit/chainlink/pull/12613) [`dd333e977f`](https://github.com/smartcontractkit/chainlink/commit/dd333e977f0c39509250a2bd40295da279726496) Thanks [@RensR](https://github.com/RensR)! - mv vrf foundry tests + +- [#12529](https://github.com/smartcontractkit/chainlink/pull/12529) [`84913bfcfc`](https://github.com/smartcontractkit/chainlink/commit/84913bfcfcfcf6f93fb359814208a32e3e659d23) Thanks [@ibrajer](https://github.com/ibrajer)! - VRFV2PlusWrapper contract: subID param added to the constructor, removed migrate() method + +- [#12555](https://github.com/smartcontractkit/chainlink/pull/12555) [`cda84cb1b7`](https://github.com/smartcontractkit/chainlink/commit/cda84cb1b7582379ac140b3a88da6179275dbefb) Thanks [@shileiwill](https://github.com/shileiwill)! - safeTransfer and cleanups + +- [#12640](https://github.com/smartcontractkit/chainlink/pull/12640) [`76e507e849`](https://github.com/smartcontractkit/chainlink/commit/76e507e8490933318e5b36cf103d6157f9fa2f34) Thanks [@RensR](https://github.com/RensR)! - fix solhint issues in automation folder + +- [#12553](https://github.com/smartcontractkit/chainlink/pull/12553) [`4892376917`](https://github.com/smartcontractkit/chainlink/commit/4892376917a16253165dc761f8efec41da32ec9c) Thanks [@RyanRHall](https://github.com/RyanRHall)! - address TODOs and docs for 2.3 + +- [#12499](https://github.com/smartcontractkit/chainlink/pull/12499) [`1a36386481`](https://github.com/smartcontractkit/chainlink/commit/1a363864816a3e7821d5a5844f13be360f0ecb58) Thanks [@RyanRHall](https://github.com/RyanRHall)! - auto 2.3 foundry test refactor + +- [#12661](https://github.com/smartcontractkit/chainlink/pull/12661) [`3b02047754`](https://github.com/smartcontractkit/chainlink/commit/3b020477548c17ed786036494ccc733107ca4152) Thanks [@RyanRHall](https://github.com/RyanRHall)! - more auto 2.3 tests + +- [#12598](https://github.com/smartcontractkit/chainlink/pull/12598) [`e753637e01`](https://github.com/smartcontractkit/chainlink/commit/e753637e01fabb8ea3760eb14204124c8d3b88e1) Thanks [@RyanRHall](https://github.com/RyanRHall)! - small gas fix + +- [#12540](https://github.com/smartcontractkit/chainlink/pull/12540) [`17c037678d`](https://github.com/smartcontractkit/chainlink/commit/17c037678d05c88f28a28a3ac760c742f549d5ec) Thanks [@RyanRHall](https://github.com/RyanRHall)! - change auto 2.3 flat fees from link to USD + +- [#12592](https://github.com/smartcontractkit/chainlink/pull/12592) [`b512ef5a7d`](https://github.com/smartcontractkit/chainlink/commit/b512ef5a7d1bc87d0cbd5357c5c47cc0dcb75e0b) Thanks [@ibrajer](https://github.com/ibrajer)! - Set LINK native feed in VRFV2PlusWrapper to immutable + +- [#12577](https://github.com/smartcontractkit/chainlink/pull/12577) [`cf00183f62`](https://github.com/smartcontractkit/chainlink/commit/cf00183f6295fe95979b460f89bcc65f22237fd4) Thanks [@shileiwill](https://github.com/shileiwill)! - add billing override test + +- [#12443](https://github.com/smartcontractkit/chainlink/pull/12443) [`e604a73d7b`](https://github.com/smartcontractkit/chainlink/commit/e604a73d7b21c5f053631d9c8afeb0eaf7203310) Thanks [@shileiwill](https://github.com/shileiwill)! - use common interface for v2.3 + +- [#12565](https://github.com/smartcontractkit/chainlink/pull/12565) [`b673505a91`](https://github.com/smartcontractkit/chainlink/commit/b673505a91719d42ff1a60623f1cfea26d186e56) Thanks [@RensR](https://github.com/RensR)! - bump solhint and address issues, remove unused imports + +- [#12477](https://github.com/smartcontractkit/chainlink/pull/12477) [`b2576475fc`](https://github.com/smartcontractkit/chainlink/commit/b2576475fc5c8ac037fc569fddc56e9d515ae7ca) Thanks [@shileiwill](https://github.com/shileiwill)! - support native payment + +- [#12531](https://github.com/smartcontractkit/chainlink/pull/12531) [`88e010d604`](https://github.com/smartcontractkit/chainlink/commit/88e010d604682c54c4f99e0a0916f94c0d13ece6) Thanks [@jinhoonbang](https://github.com/jinhoonbang)! - increase num optimizations to 500 for v2.5 coordinator -... ## 1.0.0 - 2024-03-25 diff --git a/contracts/STYLE_GUIDE.md b/contracts/STYLE_GUIDE.md index 212cd979e39..b9294de5765 100644 --- a/contracts/STYLE_GUIDE.md +++ b/contracts/STYLE_GUIDE.md @@ -6,11 +6,11 @@ Rules are all enforced through CI, this can be through Solhint rules or other to ## Background -Our starting point is the [official Solidity Style Guide](https://docs.soliditylang.org/en/v0.8.21/style-guide.html) and [ConsenSys's Secure Development practices](https://consensys.github.io/smart-contract-best-practices/), but we deviate in some ways. We lean heavily on [Prettier](https://github.com/smartcontractkit/chainlink/blob/develop/contracts/.prettierrc) for formatting, and if you have to set up a new Solidity project we recommend starting with [our prettier config](https://github.com/smartcontractkit/chainlink/blob/develop/contracts/.prettierrc). We are trying to automate as much of this styleguide with Solhint as possible. +Our starting point is the [official Solidity Style Guide](https://docs.soliditylang.org/en/v0.8.21/style-guide.html) and [ConsenSys's Secure Development practices](https://consensys.github.io/smart-contract-best-practices/), but we deviate in some ways. We lean heavily on [Prettier](https://github.com/smartcontractkit/chainlink/blob/develop/contracts/.prettierrc) for formatting, and if you have to set up a new Solidity project we recommend starting with [our prettier config](https://github.com/smartcontractkit/chainlink/blob/develop/contracts/.prettierrc). We are trying to automate as much of this style guide with Solhint as possible. -This guide is not meant to be applied retroactively. There is no need to rewrite existing code to adhere to this guide, and when making (small) changes in existing files, it is not required to do so in accordance to this guide if it would conflict with other practices in that existing file. Consistency is preferred. +This guide is not meant to be applied retroactively. There is no need to rewrite existing code to adhere to this guide, and when making (small) changes in existing files, it is not required to adhere to this guide if it conflicts with other practices in that existing file. Consistency is preferred. -We will be looking into `forge fmt`, but for now we still use `prettier`. +We will be looking into `forge fmt`, but for now, we still use `prettier`. # Guidelines @@ -22,17 +22,17 @@ We will be looking into `forge fmt`, but for now we still use `prettier`. ### Delineate Unaudited Code -- In a large repo it is worthwhile to keep code that has not yet been audited separate from the code that has been audited. This allows you to easily keep track of which files need to be reviewed. - - E.g. we keep unaudited code in a directory named `dev` that exists within each projects folder. Only once it has been audited we move the audited files out of `dev` and only then is it considered safe to deploy. +- In a large repo, it is worthwhile to keep code that has not yet been audited separately from the code that has been audited. This allows you to easily keep track of which files need to be reviewed. + - E.g. we keep unaudited code in a directory named `dev` that exists within each project's folder. Only once it has been audited we move the audited files out of `dev` and only then is it considered safe to deploy. - This `dev` folder also has implications for when code is valid for bug bounties, so be extra careful to move functionality out of a `dev` folder. -## comments -- Besides comment above functions/structs, comments should live everywhere a reader might be confused. +## Comments +- Besides comments above functions and structs, comments should live everywhere a reader might be confused. Don’t overestimate the reader of your contract, expect confusion in many places and document accordingly. This will help massively during audits and onboarding new team members. -- Headers should be used to group functionality, the following header style and length is recommended. - - Don’t use headers for a single function, or to say “getters”. Group by functionality e.g. the `Tokens and pools` , or `fees` logic within the CCIP OnRamp. +- Headers should be used to group functionality, the following header style and length are recommended. + - Don’t use headers for a single function, or to say “getters”. Group by functionality e.g. the `Tokens and pools`, or `fees` logic within the CCIP OnRamp. ```solidity // ================================================================ @@ -48,7 +48,7 @@ We will be looking into `forge fmt`, but for now we still use `prettier`. ## Variables -- Function arguments are named like this: `argumentName`. No leading or trailing underscores necessary. +- Function arguments are named like this: `argumentName`. No leading or trailing underscores are necessary. - Names should be explicit on the unit it contains, e.g. a network fee that is charged in USD cents ```solidity @@ -64,11 +64,11 @@ uint256 networkFeeUSDCents; // good ### Structs -- Structs should contain struct packing comments to clearly indicate the storage slot layout +- Structs should contain struct packing comments to indicate the storage slot layout - Using the exact characters from the example below will ensure visually appealing struct packing comments. - Notice there is no line on the unpacked last `fee` item. - Struct should contain comments, clearly indicating the denomination of values e.g. 0.01 USD if the variable name doesn’t already do that (which it should). - - Simple tool that could help packing structs and adding comments: https://github.com/RensR/Spack + - A simple tool that could help with packing structs and adding comments: https://github.com/RensR/Spack ```solidity /// @dev Struct to hold the fee configuration for a fee token, same as the FeeTokenConfig but with @@ -98,13 +98,13 @@ struct FeeTokenConfigArgs { ### Return Values - If an address is cast as a contract type, return the type, do not cast back to the address type. - This prevents the consumer of the method signature from having to cast again, but presents an equivalent API for off-chain APIs. + This prevents the consumer of the method signature from having to cast again but presents an equivalent API for off-chain APIs. Additionally, it is a more declarative API, providing more context if we return a type. ## Modifiers - Only extract a modifier once a check is duplicated in multiple places. Modifiers arguably hurt readability, so we have found that they are not worth extracting until there is duplication. -- Modifiers should be treated as if they are view functions. They should not change state, only read it. While it is possible to change state in a modifier, it is unconventional and surprising. +- Modifiers should be treated as if they are view functions. They should not change state, only read it. While it is possible to change the state in a modifier, it is unconventional and surprising. - Modifiers tend to bloat contract size because the code is duplicated wherever the modifier is used. ## Events @@ -146,7 +146,7 @@ assembly { return (success, retData); ``` -This will cost slightly more gas to copy the response into memory, but will ultimately make contract usage more understandable and easier to debug. Whether it is worth the extra gas is a judgement call you’ll have to make based on your needs. +This will cost slightly more gas to copy the response into memory, but will ultimately make contract usage more understandable and easier to debug. Whether it is worth the extra gas is a judgment call you’ll have to make based on your needs. The original error will not be human-readable in an off-chain explorer because it is RLP hex encoded but is easily decoded with standard Solidity ABI decoding tools, or a hex to UTF-8 converter and some basic ABI knowledge. @@ -158,13 +158,13 @@ The original error will not be human-readable in an off-chain explorer because i ## Dependencies - Prefer not reinventing the wheel, especially if there is an Openzeppelin wheel. -- The `shared` folder can be treated as a first party dependency and it is recommend to check if some functionality might already be in there before either writing it yourself or adding a third party dependency. +- The `shared` folder can be treated as a first-party dependency and it is recommended to check if some functionality might already be in there before either writing it yourself or adding a third party dependency. - When we have reinvented the wheel already (like with ownership), it is OK to keep using these contracts. If there are clear benefits of using another standard like OZ, we can deprecate the custom implementation and start using the new standard in all new projects. Migration will not be required unless there are serious issues with the old implementation. - When the decision is made to use a new standard, it is no longer allowed to use the old standard for new projects. ### Vendor dependencies -- That’s it, vendor your Solidity dependencies. Supply chain attacks are all the rage these days. There is not yet a silver bullet for best way to vendor, it depends on the size of your project and your needs. You should be as explicit as possible about where the code comes from and make sure that this is enforced in some way; e.g. reference a hash. Some options: +- That’s it, vendor your Solidity dependencies. Supply chain attacks are all the rage these days. There is not yet a silver bullet for the best way to vendor, it depends on the size of your project and your needs. You should be as explicit as possible about where the code comes from and make sure that this is enforced in some way; e.g. reference a hash. Some options: - NPM packages work for repos already in the JavaScript ecosystem. If you go this route you should lock to a hash of the repo or use a proxy registry like GitHub Packages. - Copy and paste the code into a `vendor` directory. Record attribution of the code and license in the repo along with the commit or version that you pulled the code from. - Foundry uses git submodules for its dependencies. We only use the `forge-std` lib through submodules, we don’t import any non-Foundry-testing code through this method. @@ -174,7 +174,7 @@ The original error will not be human-readable in an off-chain explorer because i ### Transferring Ownership -- When transferring control, whether it is of a token or a role in a contract, prefer "safe ownership" transfer patterns where the recipient must accept ownership. This avoids accidentally burning the control. This is also inline with the secure pattern of [prefer pull over push](https://consensys.github.io/smart-contract-best-practices/recommendations/#favor-pull-over-push-for-external-calls). +- When transferring control, whether it is of a token or a role in a contract, prefer "safe ownership" transfer patterns where the recipient must accept ownership. This avoids accidentally burning the control. This is also in line with the secure pattern of [prefer pull over push](https://consensys.github.io/smart-contract-best-practices/recommendations/#favor-pull-over-push-for-external-calls). ### Call with Exact Gas @@ -192,7 +192,7 @@ The original error will not be human-readable in an off-chain explorer because i - Calling other contracts will also be costly - Common types to safely use are - uint40 for timestamps (or uint32 if you really need the space) - - uint96 for link, as there are only 1b link tokens + - uint96 for LINK, as there are only 1b LINK tokens - prefer `++i` over `i++` - If you’re unsure about golfing, ask in the #tech-solidity channel @@ -214,13 +214,13 @@ The original error will not be human-readable in an off-chain explorer because i ## Picking a Pragma -- If a contract or library is expected to be imported by outside parties then the pragma should be kept as loose as possible without sacrificing safety. We publish versions for every minor semver version of Solidity, and maintain a corresponding set of tests for each published version. +- If a contract or library is expected to be imported by outside parties then the pragma should be kept as loose as possible without sacrificing safety. We publish versions for every minor Semver version of Solidity and maintain a corresponding set of tests for each published version. - Examples: libraries, interfaces, abstract contracts, and contracts expected to be inherited from -- Otherwise, Solidity contracts should have a pragma which is locked to a specific version. +- Otherwise, Solidity contracts should have a pragma that is locked to a specific version. - Example: Most concrete contracts. -- Avoid changing pragmas after audit. Unless there is a bug that has affects your contract, then you should try to stick to a known good pragma. In practice this means we typically only support one (occasionally two) pragma for any “major”(minor by semver naming) Solidity version. +- Avoid changing pragmas after the audit. Unless there is a bug that affects your contract, then you should try to stick to a known good pragma. In practice, this means we typically only support one (occasionally two) pragma for any “major”(minor by Semver naming) Solidity version. - The current advised pragma is `0.8.19` or higher, lower versions should be avoided when starting a new project. Newer versions can be considered. -- All contracts should have a SPDX license identifier. If unsure about which one to pick, please consult with legal. Most older contracts have been MIT, but some of the newer products have been using BUSL-1.1 +- All contracts should have an SPDX license identifier. If unsure about which one to pick, please consult with legal. Most older contracts have been MIT, but some of the newer products have been using BUSL-1.1 ## Versioning @@ -262,7 +262,7 @@ contract SuperDuperAggregator is ITypeAndVersion { All contracts will expose a `typeAndVersion` constant. The string has the following format: `-` with the `-dev` part only being applicable to contracts that have not been fully released. -Try to fit it into 32 bytes to keep impact on contract sizes minimal. +Try to fit it into 32 bytes to keep the impact on contract sizes minimal. Solhint will complain about a public constant variable that isn’t FULL_CAPS without the solhint-disable comment. @@ -276,12 +276,12 @@ Solhint will complain about a public constant variable that isn’t FULL_CAPS wi # Rules -All rules have a `rule` tag which indicated how the rule is enforced. +All rules have a `rule` tag which indicates how the rule is enforced. ## Comments -- Comments should be in the `//` (default) or `///` (natspec) format, not the `/* */` format. +- Comments should be in the `//` (default) or `///` (Natspec) format, not the `/* */` format. - rule: `tbd` - Comments should follow [NatSpec](https://docs.soliditylang.org/en/latest/natspec-format.html) - rule: `tbd` @@ -290,7 +290,7 @@ All rules have a `rule` tag which indicated how the rule is enforced. - Imports should always be explicit - rule: `no-global-import` -- Imports have follow the following format: +- Imports have to follow the following format: - rule: `tbd` ```solidity @@ -321,7 +321,7 @@ import {IERC20} from "../../vendor/openzeppelin-solidity/v4.8.0/contracts/token/ All contract variables should be private by default. Getters should be explicitly written and documented when you want to expose a variable publicly. Whether a getter function reads from storage, a constant, or calculates a value from somewhere else, that’s all implementation details that should not be exposed to the consumer by casing or other conventions. -rule: tbd +rule: `tbd` ### Naming and Casing @@ -380,6 +380,14 @@ rule: `gas-custom-errors` ## Interfaces +### Purpose + +Interfaces separate NatSpec from contract logic, requiring readers to do more work to understand the code. For this reason, you shouldn’t create an interface by default. + +If created, interfaces should have a documented purpose. For example, an interface is useful if 3rd party on-chain contracts will interact with your contract. CCIP’s [`IRouterClient` interface](https://github.com/smartcontractkit/ccip/blob/ccip-develop/contracts/src/v0.8/ccip/interfaces/IRouterClient.sol) is a good example here. + +### Naming + 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: `interface-starts-with-i` diff --git a/contracts/package.json b/contracts/package.json index 3c17ded05a9..0e0be43647d 100644 --- a/contracts/package.json +++ b/contracts/package.json @@ -1,6 +1,6 @@ { "name": "@chainlink/contracts", - "version": "1.0.0", + "version": "1.1.0", "description": "Chainlink smart contracts", "author": "Chainlink devs", "license": "MIT", diff --git a/contracts/src/v0.8/automation/dev/test/AutomationRegistry2_3.t.sol b/contracts/src/v0.8/automation/dev/test/AutomationRegistry2_3.t.sol index 4d2cfbbec36..19e1cdc7460 100644 --- a/contracts/src/v0.8/automation/dev/test/AutomationRegistry2_3.t.sol +++ b/contracts/src/v0.8/automation/dev/test/AutomationRegistry2_3.t.sol @@ -5,7 +5,7 @@ import {Vm} from "forge-std/Test.sol"; import {BaseTest} from "./BaseTest.t.sol"; import {AutomationRegistryBase2_3 as AutoBase} from "../v2_3/AutomationRegistryBase2_3.sol"; import {AutomationRegistrar2_3 as Registrar} from "../v2_3/AutomationRegistrar2_3.sol"; -import {IAutomationRegistryMaster2_3 as Registry, AutomationRegistryBase2_3} from "../interfaces/v2_3/IAutomationRegistryMaster2_3.sol"; +import {IAutomationRegistryMaster2_3 as Registry, AutomationRegistryBase2_3, IAutomationV21PlusCommon} from "../interfaces/v2_3/IAutomationRegistryMaster2_3.sol"; import {ChainModuleBase} from "../../chains/ChainModuleBase.sol"; import {IERC20Metadata as IERC20} from "../../../vendor/openzeppelin-solidity/v4.8.3/contracts/token/ERC20/extensions/IERC20Metadata.sol"; import {IWrappedNative} from "../interfaces/v2_3/IWrappedNative.sol"; @@ -334,6 +334,7 @@ contract SetConfig is SetUp { ); address module = address(new ChainModuleBase()); + AutomationRegistryBase2_3.OnchainConfig cfg = AutomationRegistryBase2_3.OnchainConfig({ checkGasLimit: 5_000_000, @@ -347,7 +348,7 @@ contract SetConfig is SetUp { fallbackLinkPrice: 2_000_000_000, // $20 fallbackNativePrice: 400_000_000_000, // $4,000 transcoder: 0xB1e66855FD67f6e85F0f0fA38cd6fBABdf00923c, - registrars: new address[](0), + registrars: _getRegistrars(), upkeepPrivilegeManager: PRIVILEGE_MANAGER, chainModule: module, reorgProtectionEnabled: true, @@ -507,8 +508,22 @@ contract SetConfig is SetUp { decimals: 18 }); + // the first time uses the default onchain config with 2 registrars bytes memory onchainConfigBytesWithBilling1 = abi.encode(cfg, billingTokens1, billingConfigs1); + // set config once + registry.setConfig( + SIGNERS, + TRANSMITTERS, + F, + onchainConfigBytesWithBilling1, + OFFCHAIN_CONFIG_VERSION, + offchainConfigBytes + ); + + (, IAutomationV21PlusCommon.OnchainConfigLegacy memory onchainConfig1, , , ) = registry.getState(); + assertEq(onchainConfig1.registrars.length, 2); + // BillingConfig2 address billingTokenAddress2 = address(usdToken18); address[] memory billingTokens2 = new address[](1); @@ -524,17 +539,33 @@ contract SetConfig is SetUp { decimals: 18 }); - bytes memory onchainConfigBytesWithBilling2 = abi.encode(cfg, billingTokens2, billingConfigs2); + address[] memory newRegistrars = new address[](3); + newRegistrars[0] = address(uint160(uint256(keccak256("newRegistrar1")))); + newRegistrars[1] = address(uint160(uint256(keccak256("newRegistrar2")))); + newRegistrars[2] = address(uint160(uint256(keccak256("newRegistrar3")))); - // set config once - registry.setConfig( - SIGNERS, - TRANSMITTERS, - F, - onchainConfigBytesWithBilling1, - OFFCHAIN_CONFIG_VERSION, - offchainConfigBytes - ); + // new onchain config with 3 new registrars, all other fields stay the same as the default + AutomationRegistryBase2_3.OnchainConfig memory cfg2 = AutomationRegistryBase2_3.OnchainConfig({ + checkGasLimit: 5_000_000, + stalenessSeconds: 90_000, + gasCeilingMultiplier: 0, + maxPerformGas: 10_000_000, + maxCheckDataSize: 5_000, + maxPerformDataSize: 5_000, + maxRevertDataSize: 5_000, + fallbackGasPrice: 20_000_000_000, + fallbackLinkPrice: 2_000_000_000, // $20 + fallbackNativePrice: 400_000_000_000, // $4,000 + transcoder: 0xB1e66855FD67f6e85F0f0fA38cd6fBABdf00923c, + registrars: newRegistrars, + upkeepPrivilegeManager: PRIVILEGE_MANAGER, + chainModule: module, + reorgProtectionEnabled: true, + financeAdmin: FINANCE_ADMIN + }); + + // the second time uses the new onchain config with 3 new registrars and also new billing tokens/configs + bytes memory onchainConfigBytesWithBilling2 = abi.encode(cfg2, billingTokens2, billingConfigs2); // set config twice registry.setConfig( @@ -546,8 +577,18 @@ contract SetConfig is SetUp { offchainConfigBytes ); - (, , address[] memory signers, address[] memory transmitters, uint8 f) = registry.getState(); - + ( + , + IAutomationV21PlusCommon.OnchainConfigLegacy memory onchainConfig2, + address[] memory signers, + address[] memory transmitters, + uint8 f + ) = registry.getState(); + + assertEq(onchainConfig2.registrars.length, 3); + for (uint256 i = 0; i < newRegistrars.length; i++) { + assertEq(newRegistrars[i], onchainConfig2.registrars[i]); + } assertEq(signers, SIGNERS); assertEq(transmitters, TRANSMITTERS); assertEq(f, F); @@ -766,6 +807,13 @@ contract SetConfig is SetUp { assertEq(transmitters, NEW_TRANSMITTERS); } + function _getRegistrars() private pure returns (address[] memory) { + address[] memory registrars = new address[](2); + registrars[0] = address(uint160(uint256(keccak256("registrar1")))); + registrars[1] = address(uint160(uint256(keccak256("registrar2")))); + return registrars; + } + function _configDigestFromConfigData( uint256 chainId, address contractAddress, diff --git a/contracts/src/v0.8/automation/dev/v2_3/AutomationRegistry2_3.sol b/contracts/src/v0.8/automation/dev/v2_3/AutomationRegistry2_3.sol index c95c2138f71..93d3376a4f6 100644 --- a/contracts/src/v0.8/automation/dev/v2_3/AutomationRegistry2_3.sol +++ b/contracts/src/v0.8/automation/dev/v2_3/AutomationRegistry2_3.sol @@ -355,7 +355,9 @@ contract AutomationRegistry2_3 is AutomationRegistryBase2_3, OCR2Abstract, Chain offchainConfig ); - delete s_registrars; + for (uint256 idx = s_registrars.length(); idx > 0; idx--) { + s_registrars.remove(s_registrars.at(idx - 1)); + } for (uint256 idx = 0; idx < onchainConfig.registrars.length; idx++) { s_registrars.add(onchainConfig.registrars[idx]); diff --git a/contracts/src/v0.8/automation/dev/v2_3/AutomationRegistryLogicC2_3.sol b/contracts/src/v0.8/automation/dev/v2_3/AutomationRegistryLogicC2_3.sol index 0a429730bdb..546c85454f7 100644 --- a/contracts/src/v0.8/automation/dev/v2_3/AutomationRegistryLogicC2_3.sol +++ b/contracts/src/v0.8/automation/dev/v2_3/AutomationRegistryLogicC2_3.sol @@ -184,7 +184,10 @@ contract AutomationRegistryLogicC2_3 is AutomationRegistryBase2_3 { payments[i + activeTransmittersLength] = transmitter.balance; s_transmitters[deactivatedAddr].balance = 0; } - delete s_deactivatedTransmitters; + + for (uint256 idx = s_deactivatedTransmitters.length(); idx > 0; idx--) { + s_deactivatedTransmitters.remove(s_deactivatedTransmitters.at(idx - 1)); + } emit NOPsSettledOffchain(payees, payments); } diff --git a/contracts/src/v0.8/vrf/dev/VRFV2PlusWrapper.sol b/contracts/src/v0.8/vrf/dev/VRFV2PlusWrapper.sol index 4a806db5515..1d741280851 100644 --- a/contracts/src/v0.8/vrf/dev/VRFV2PlusWrapper.sol +++ b/contracts/src/v0.8/vrf/dev/VRFV2PlusWrapper.sol @@ -35,7 +35,8 @@ contract VRFV2PlusWrapper is ConfirmedOwner, TypeAndVersionInterface, VRFConsume event FulfillmentTxSizeSet(uint32 size); event ConfigSet( uint32 wrapperGasOverhead, - uint32 coordinatorGasOverhead, + uint32 coordinatorGasOverheadNative, + uint32 coordinatorGasOverheadLink, uint16 coordinatorGasOverheadPerWord, uint8 coordinatorNativePremiumPercentage, uint8 coordinatorLinkPremiumPercentage, @@ -115,11 +116,18 @@ contract VRFV2PlusWrapper is ConfirmedOwner, TypeAndVersionInterface, VRFConsume /// @dev total data size = 4608 bits + 32 bits = 4640 bits = 580 bytes uint32 public s_fulfillmentTxSizeBytes = 580; - // s_coordinatorGasOverhead reflects the gas overhead of the coordinator's fulfillRandomWords - // function. The cost for this gas is billed to the subscription, and must therefor be included + // s_coordinatorGasOverheadNative reflects the gas overhead of the coordinator's fulfillRandomWords + // function for native payment. The cost for this gas is billed to the subscription, and must therefor be included // in the pricing for wrapped requests. This includes the gas costs of proof verification and // payment calculation in the coordinator. - uint32 private s_coordinatorGasOverhead; + uint32 private s_coordinatorGasOverheadNative; + + // s_coordinatorGasOverheadLink reflects the gas overhead of the coordinator's fulfillRandomWords + // function for link payment. The cost for this gas is billed to the subscription, and must therefor be included + // in the pricing for wrapped requests. This includes the gas costs of proof verification and + // payment calculation in the coordinator. + uint32 private s_coordinatorGasOverheadLink; + uint16 private s_coordinatorGasOverheadPerWord; // s_fulfillmentFlatFeeLinkPPM is the flat fee in millionths of native that VRFCoordinatorV2 @@ -139,8 +147,6 @@ contract VRFV2PlusWrapper is ConfirmedOwner, TypeAndVersionInterface, VRFConsume // value of 0 indicates no premium. A value of 15 indicates a 15 percent premium. // Wrapper has no premium. This premium is for VRFCoordinator. uint8 private s_coordinatorLinkPremiumPercentage; - - // 4 bytes left /* Storage Slot 5: END */ struct Callback { @@ -199,7 +205,13 @@ contract VRFV2PlusWrapper is ConfirmedOwner, TypeAndVersionInterface, VRFConsume * @param _wrapperGasOverhead reflects the gas overhead of the wrapper's fulfillRandomWords * function. * - * @param _coordinatorGasOverhead reflects the gas overhead of the coordinator's + * @param _coordinatorGasOverheadNative reflects the gas overhead of the coordinator's + * fulfillRandomWords function for native payment. + * + * @param _coordinatorGasOverheadLink reflects the gas overhead of the coordinator's + * fulfillRandomWords function for link payment. + * + * @param _coordinatorGasOverheadPerWord reflects the gas overhead per word of the coordinator's * fulfillRandomWords function. * * @param _coordinatorNativePremiumPercentage is the coordinator's premium ratio in percentage for requests paid in native. @@ -222,7 +234,8 @@ contract VRFV2PlusWrapper is ConfirmedOwner, TypeAndVersionInterface, VRFConsume */ function setConfig( uint32 _wrapperGasOverhead, - uint32 _coordinatorGasOverhead, + uint32 _coordinatorGasOverheadNative, + uint32 _coordinatorGasOverheadLink, uint16 _coordinatorGasOverheadPerWord, uint8 _coordinatorNativePremiumPercentage, uint8 _coordinatorLinkPremiumPercentage, @@ -244,7 +257,8 @@ contract VRFV2PlusWrapper is ConfirmedOwner, TypeAndVersionInterface, VRFConsume } s_wrapperGasOverhead = _wrapperGasOverhead; - s_coordinatorGasOverhead = _coordinatorGasOverhead; + s_coordinatorGasOverheadNative = _coordinatorGasOverheadNative; + s_coordinatorGasOverheadLink = _coordinatorGasOverheadLink; s_coordinatorGasOverheadPerWord = _coordinatorGasOverheadPerWord; s_coordinatorNativePremiumPercentage = _coordinatorNativePremiumPercentage; s_coordinatorLinkPremiumPercentage = _coordinatorLinkPremiumPercentage; @@ -260,7 +274,8 @@ contract VRFV2PlusWrapper is ConfirmedOwner, TypeAndVersionInterface, VRFConsume emit ConfigSet( _wrapperGasOverhead, - _coordinatorGasOverhead, + _coordinatorGasOverheadNative, + _coordinatorGasOverheadLink, _coordinatorGasOverheadPerWord, _coordinatorNativePremiumPercentage, _coordinatorLinkPremiumPercentage, @@ -291,8 +306,11 @@ contract VRFV2PlusWrapper is ConfirmedOwner, TypeAndVersionInterface, VRFConsume * @return wrapperGasOverhead reflects the gas overhead of the wrapper's fulfillRandomWords * function. The cost for this gas is passed to the user. * - * @return coordinatorGasOverhead reflects the gas overhead of the coordinator's - * fulfillRandomWords function. + * @return coordinatorGasOverheadNative reflects the gas overhead of the coordinator's + * fulfillRandomWords function for native payment. + * + * @return coordinatorGasOverheadLink reflects the gas overhead of the coordinator's + * fulfillRandomWords function for link payment. * * @return coordinatorGasOverheadPerWord reflects the gas overhead per word of the coordinator's * fulfillRandomWords function. @@ -318,7 +336,8 @@ contract VRFV2PlusWrapper is ConfirmedOwner, TypeAndVersionInterface, VRFConsume uint32 fulfillmentFlatFeeNativePPM, uint32 fulfillmentFlatFeeLinkDiscountPPM, uint32 wrapperGasOverhead, - uint32 coordinatorGasOverhead, + uint32 coordinatorGasOverheadNative, + uint32 coordinatorGasOverheadLink, uint16 coordinatorGasOverheadPerWord, uint8 wrapperNativePremiumPercentage, uint8 wrapperLinkPremiumPercentage, @@ -332,7 +351,8 @@ contract VRFV2PlusWrapper is ConfirmedOwner, TypeAndVersionInterface, VRFConsume s_fulfillmentFlatFeeNativePPM, s_fulfillmentFlatFeeLinkDiscountPPM, s_wrapperGasOverhead, - s_coordinatorGasOverhead, + s_coordinatorGasOverheadNative, + s_coordinatorGasOverheadLink, s_coordinatorGasOverheadPerWord, s_coordinatorNativePremiumPercentage, s_coordinatorLinkPremiumPercentage, @@ -403,7 +423,7 @@ contract VRFV2PlusWrapper is ConfirmedOwner, TypeAndVersionInterface, VRFConsume // coordinatorCostWei takes into account the L1 posting costs of the VRF fulfillment transaction, if we are on an L2. // (wei/gas) * gas + l1wei uint256 coordinatorCostWei = _requestGasPrice * - (_gas + _getCoordinatorGasOverhead(_numWords)) + + (_gas + _getCoordinatorGasOverhead(_numWords, true)) + ChainSpecificUtil._getL1CalldataGasCost(s_fulfillmentTxSizeBytes); // coordinatorCostWithPremiumAndFlatFeeWei is the coordinator cost with the percentage premium and flat fee applied @@ -427,7 +447,7 @@ contract VRFV2PlusWrapper is ConfirmedOwner, TypeAndVersionInterface, VRFConsume // coordinatorCostWei takes into account the L1 posting costs of the VRF fulfillment transaction, if we are on an L2. // (wei/gas) * gas + l1wei uint256 coordinatorCostWei = _requestGasPrice * - (_gas + _getCoordinatorGasOverhead(_numWords)) + + (_gas + _getCoordinatorGasOverhead(_numWords, false)) + ChainSpecificUtil._getL1CalldataGasCost(s_fulfillmentTxSizeBytes); // coordinatorCostWithPremiumAndFlatFeeWei is the coordinator cost with the percentage premium and flat fee applied @@ -641,8 +661,12 @@ contract VRFV2PlusWrapper is ConfirmedOwner, TypeAndVersionInterface, VRFConsume return gas / 63 + 1; } - function _getCoordinatorGasOverhead(uint32 numWords) internal view returns (uint32) { - return s_coordinatorGasOverhead + numWords * s_coordinatorGasOverheadPerWord; + function _getCoordinatorGasOverhead(uint32 numWords, bool nativePayment) internal view returns (uint32) { + if (nativePayment) { + return s_coordinatorGasOverheadNative + numWords * s_coordinatorGasOverheadPerWord; + } else { + return s_coordinatorGasOverheadLink + numWords * s_coordinatorGasOverheadPerWord; + } } /** diff --git a/contracts/src/v0.8/vrf/dev/testhelpers/VRFV2PlusWrapperConsumerExample.sol b/contracts/src/v0.8/vrf/dev/testhelpers/VRFV2PlusWrapperConsumerExample.sol index 5025a300c28..62e6ed2da1e 100644 --- a/contracts/src/v0.8/vrf/dev/testhelpers/VRFV2PlusWrapperConsumerExample.sol +++ b/contracts/src/v0.8/vrf/dev/testhelpers/VRFV2PlusWrapperConsumerExample.sol @@ -77,4 +77,10 @@ contract VRFV2PlusWrapperConsumerExample is VRFV2PlusWrapperConsumerBase, Confir // solhint-disable-next-line gas-custom-errors require(success, "withdrawNative failed"); } + + event Received(address, uint256); + + receive() external payable { + emit Received(msg.sender, msg.value); + } } diff --git a/contracts/src/v0.8/vrf/test/VRFV2PlusWrapper.t.sol b/contracts/src/v0.8/vrf/test/VRFV2PlusWrapper.t.sol index 66bef8a1bcd..4b3a893fe1f 100644 --- a/contracts/src/v0.8/vrf/test/VRFV2PlusWrapper.t.sol +++ b/contracts/src/v0.8/vrf/test/VRFV2PlusWrapper.t.sol @@ -16,7 +16,8 @@ contract VRFV2PlusWrapperTest is BaseTest { address internal constant LINK_WHALE = 0xD883a6A1C22fC4AbFE938a5aDF9B2Cc31b1BF18B; bytes32 private vrfKeyHash = hex"9f2353bde94264dbc3d554a94cceba2d7d2b4fdce4304d3e09a1fea9fbeb1528"; uint32 private wrapperGasOverhead = 100_000; - uint32 private coordinatorGasOverhead = 200_000; + uint32 private coordinatorGasOverheadNative = 200_000; + uint32 private coordinatorGasOverheadLink = 220_000; uint256 private s_wrapperSubscriptionId; ExposedVRFCoordinatorV2_5 private s_testCoordinator; @@ -84,10 +85,24 @@ contract VRFV2PlusWrapperTest is BaseTest { function setConfigWrapper() internal { vm.expectEmit(false, false, false, true, address(s_wrapper)); - emit ConfigSet(wrapperGasOverhead, coordinatorGasOverhead, 0, 0, 0, vrfKeyHash, 10, 1, 50000000000000000, 0, 0); + emit ConfigSet( + wrapperGasOverhead, + coordinatorGasOverheadNative, + coordinatorGasOverheadLink, + 0, + 0, + 0, + vrfKeyHash, + 10, + 1, + 50000000000000000, + 0, + 0 + ); s_wrapper.setConfig( wrapperGasOverhead, // wrapper gas overhead - coordinatorGasOverhead, // coordinator gas overhead + coordinatorGasOverheadNative, // coordinator gas overhead native + coordinatorGasOverheadLink, // coordinator gas overhead link 0, // coordinator gas overhead per word 0, // native premium percentage, 0, // link premium percentage @@ -104,7 +119,8 @@ contract VRFV2PlusWrapperTest is BaseTest { , , uint32 _wrapperGasOverhead, - uint32 _coordinatorGasOverhead, + uint32 _coordinatorGasOverheadNative, + uint32 _coordinatorGasOverheadLink, uint16 _coordinatorGasOverheadPerWord, uint8 _coordinatorNativePremiumPercentage, uint8 _coordinatorLinkPremiumPercentage, @@ -112,7 +128,8 @@ contract VRFV2PlusWrapperTest is BaseTest { uint8 _maxNumWords ) = s_wrapper.getConfig(); assertEq(_wrapperGasOverhead, wrapperGasOverhead); - assertEq(_coordinatorGasOverhead, coordinatorGasOverhead); + assertEq(_coordinatorGasOverheadNative, coordinatorGasOverheadNative); + assertEq(_coordinatorGasOverheadLink, coordinatorGasOverheadLink); assertEq(0, _coordinatorGasOverheadPerWord); assertEq(0, _coordinatorNativePremiumPercentage); assertEq(0, _coordinatorLinkPremiumPercentage); @@ -137,7 +154,8 @@ contract VRFV2PlusWrapperTest is BaseTest { event FulfillmentTxSizeSet(uint32 size); event ConfigSet( uint32 wrapperGasOverhead, - uint32 coordinatorGasOverhead, + uint32 coordinatorGasOverheadNative, + uint32 coordinatorGasOverheadLink, uint16 coordinatorGasOverheadPerWord, uint8 coordinatorNativePremiumPercentage, uint8 coordinatorLinkPremiumPercentage, @@ -241,7 +259,7 @@ contract VRFV2PlusWrapperTest is BaseTest { requestId = s_consumer.makeRequestNative(callbackGasLimit, 0, 1); (uint256 paid, bool fulfilled, bool native) = s_consumer.s_requests(requestId); - uint32 expectedPaid = callbackGasLimit + wrapperGasOverhead + coordinatorGasOverhead; + uint32 expectedPaid = callbackGasLimit + wrapperGasOverhead + coordinatorGasOverheadNative; uint256 wrapperNativeCostEstimate = s_wrapper.estimateRequestPriceNative(callbackGasLimit, 0, tx.gasprice); uint256 wrapperCostCalculation = s_wrapper.calculateRequestPriceNative(callbackGasLimit, 0); assertEq(paid, expectedPaid); @@ -277,7 +295,8 @@ contract VRFV2PlusWrapperTest is BaseTest { vm.expectRevert(abi.encodeWithSelector(VRFV2PlusWrapper.LinkDiscountTooHigh.selector, uint32(501), uint32(500))); s_wrapper.setConfig( wrapperGasOverhead, // wrapper gas overhead - coordinatorGasOverhead, // coordinator gas overhead + coordinatorGasOverheadNative, // coordinator gas overhead native + coordinatorGasOverheadLink, // coordinator gas overhead link 0, // coordinator gas overhead per word 0, // native premium percentage, 0, // link premium percentage @@ -294,7 +313,8 @@ contract VRFV2PlusWrapperTest is BaseTest { // Test that setting link discount flat fee equal to native flat fee does not revert s_wrapper.setConfig( wrapperGasOverhead, // wrapper gas overhead - coordinatorGasOverhead, // coordinator gas overhead + coordinatorGasOverheadNative, // coordinator gas overhead native + coordinatorGasOverheadLink, // coordinator gas overhead link 0, // coordinator gas overhead per word 0, // native premium percentage, 0, // link premium percentage @@ -314,7 +334,8 @@ contract VRFV2PlusWrapperTest is BaseTest { ); s_wrapper.setConfig( wrapperGasOverhead, // wrapper gas overhead - coordinatorGasOverhead, // coordinator gas overhead + coordinatorGasOverheadNative, // coordinator gas overhead native + coordinatorGasOverheadLink, // coordinator gas overhead link 0, // coordinator gas overhead per word 156, // native premium percentage, 0, // link premium percentage @@ -334,7 +355,8 @@ contract VRFV2PlusWrapperTest is BaseTest { ); s_wrapper.setConfig( wrapperGasOverhead, // wrapper gas overhead - coordinatorGasOverhead, // coordinator gas overhead + coordinatorGasOverheadNative, // coordinator gas overhead native + coordinatorGasOverheadLink, // coordinator gas overhead link 0, // coordinator gas overhead per word 15, // native premium percentage, 202, // link premium percentage @@ -377,7 +399,7 @@ contract VRFV2PlusWrapperTest is BaseTest { // Assert that the request was made correctly. (uint256 paid, bool fulfilled, bool native) = s_consumer.s_requests(requestId); - uint32 expectedPaid = (callbackGasLimit + wrapperGasOverhead + coordinatorGasOverhead) * 2; + uint32 expectedPaid = (callbackGasLimit + wrapperGasOverhead + coordinatorGasOverheadLink) * 2; uint256 wrapperCostEstimate = s_wrapper.estimateRequestPrice(callbackGasLimit, 0, tx.gasprice); uint256 wrapperCostCalculation = s_wrapper.calculateRequestPrice(callbackGasLimit, 0); assertEq(paid, expectedPaid); // 1_030_000 * 2 for link/native ratio diff --git a/contracts/src/v0.8/vrf/test/VRFV2PlusWrapper_Migration.t.sol b/contracts/src/v0.8/vrf/test/VRFV2PlusWrapper_Migration.t.sol index 7011bb6016b..ba77686088e 100644 --- a/contracts/src/v0.8/vrf/test/VRFV2PlusWrapper_Migration.t.sol +++ b/contracts/src/v0.8/vrf/test/VRFV2PlusWrapper_Migration.t.sol @@ -16,7 +16,8 @@ contract VRFV2PlusWrapper_MigrationTest is BaseTest { uint256 internal constant DEFAULT_LINK_FUNDING = 10 ether; // 10 ETH bytes32 private vrfKeyHash = hex"9f2353bde94264dbc3d554a94cceba2d7d2b4fdce4304d3e09a1fea9fbeb1528"; uint32 private wrapperGasOverhead = 10_000; - uint32 private coordinatorGasOverhead = 20_000; + uint32 private coordinatorGasOverheadNative = 20_000; + uint32 private coordinatorGasOverheadLink = 40_000; uint256 private s_wrapperSubscriptionId; ExposedVRFCoordinatorV2_5 private s_testCoordinator; @@ -101,7 +102,8 @@ contract VRFV2PlusWrapper_MigrationTest is BaseTest { function setConfigWrapper() internal { s_wrapper.setConfig( wrapperGasOverhead, // wrapper gas overhead - coordinatorGasOverhead, // coordinator gas overhead + coordinatorGasOverheadNative, // coordinator gas overhead native + coordinatorGasOverheadLink, // coordinator gas overhead link 0, // coordinator gas overhead per word 0, // native premium percentage, 0, // link premium percentage @@ -118,7 +120,8 @@ contract VRFV2PlusWrapper_MigrationTest is BaseTest { , , uint32 _wrapperGasOverhead, - uint32 _coordinatorGasOverhead, + uint32 _coordinatorGasOverheadNative, + uint32 _coordinatorGasOverheadLink, uint16 _coordinatorGasOverheadPerWord, uint8 _coordinatorNativePremiumPercentage, uint8 _coordinatorLinkPremiumPercentage, @@ -126,7 +129,8 @@ contract VRFV2PlusWrapper_MigrationTest is BaseTest { uint8 _maxNumWords ) = s_wrapper.getConfig(); assertEq(_wrapperGasOverhead, wrapperGasOverhead); - assertEq(_coordinatorGasOverhead, coordinatorGasOverhead); + assertEq(_coordinatorGasOverheadNative, coordinatorGasOverheadNative); + assertEq(_coordinatorGasOverheadLink, coordinatorGasOverheadLink); assertEq(0, _coordinatorGasOverheadPerWord); assertEq(0, _coordinatorNativePremiumPercentage); assertEq(0, _coordinatorLinkPremiumPercentage); @@ -229,7 +233,7 @@ contract VRFV2PlusWrapper_MigrationTest is BaseTest { assertEq(requestId, 1); (uint256 paid, bool fulfilled, bool native) = s_consumer.s_requests(requestId); - uint32 expectedPaid = (callbackGasLimit + wrapperGasOverhead + coordinatorGasOverhead) * 2; + uint32 expectedPaid = (callbackGasLimit + wrapperGasOverhead + coordinatorGasOverheadLink) * 2; uint256 wrapperCostEstimate = s_wrapper.estimateRequestPrice(callbackGasLimit, 0, tx.gasprice); uint256 wrapperCostCalculation = s_wrapper.calculateRequestPrice(callbackGasLimit, 0); assertEq(paid, expectedPaid); // 1_030_000 * 2 for link/native ratio @@ -344,7 +348,7 @@ contract VRFV2PlusWrapper_MigrationTest is BaseTest { assertEq(requestId, 1); (uint256 paid, bool fulfilled, bool native) = s_consumer.s_requests(requestId); - uint32 expectedPaid = callbackGasLimit + wrapperGasOverhead + coordinatorGasOverhead; + uint32 expectedPaid = callbackGasLimit + wrapperGasOverhead + coordinatorGasOverheadNative; uint256 wrapperNativeCostEstimate = s_wrapper.estimateRequestPriceNative(callbackGasLimit, 0, tx.gasprice); uint256 wrapperCostCalculation = s_wrapper.calculateRequestPriceNative(callbackGasLimit, 0); assertEq(paid, expectedPaid); diff --git a/core/bridges/mocks/orm.go b/core/bridges/mocks/orm.go index 836f667bbeb..30dfc3e33ea 100644 --- a/core/bridges/mocks/orm.go +++ b/core/bridges/mocks/orm.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. package mocks diff --git a/core/capabilities/remote/dispatcher.go b/core/capabilities/remote/dispatcher.go index f25d8cb784a..44b00c035f1 100644 --- a/core/capabilities/remote/dispatcher.go +++ b/core/capabilities/remote/dispatcher.go @@ -9,7 +9,7 @@ import ( "google.golang.org/protobuf/proto" "github.com/smartcontractkit/chainlink-common/pkg/services" - commontypes "github.com/smartcontractkit/chainlink-common/pkg/types" + "github.com/smartcontractkit/chainlink-common/pkg/types/core" "github.com/smartcontractkit/chainlink/v2/core/capabilities/remote/types" remotetypes "github.com/smartcontractkit/chainlink/v2/core/capabilities/remote/types" @@ -23,7 +23,7 @@ type dispatcher struct { peer p2ptypes.Peer peerID p2ptypes.PeerID signer p2ptypes.Signer - registry commontypes.CapabilitiesRegistry + registry core.CapabilitiesRegistry receivers map[key]remotetypes.Receiver mu sync.RWMutex stopCh services.StopChan @@ -40,7 +40,7 @@ var _ services.Service = &dispatcher{} const supportedVersion = 1 -func NewDispatcher(peerWrapper p2ptypes.PeerWrapper, signer p2ptypes.Signer, registry commontypes.CapabilitiesRegistry, lggr logger.Logger) *dispatcher { +func NewDispatcher(peerWrapper p2ptypes.PeerWrapper, signer p2ptypes.Signer, registry core.CapabilitiesRegistry, lggr logger.Logger) *dispatcher { return &dispatcher{ peerWrapper: peerWrapper, signer: signer, diff --git a/core/capabilities/remote/types/mocks/dispatcher.go b/core/capabilities/remote/types/mocks/dispatcher.go index 8675e6153ac..9ef7cee78d1 100644 --- a/core/capabilities/remote/types/mocks/dispatcher.go +++ b/core/capabilities/remote/types/mocks/dispatcher.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. package mocks diff --git a/core/capabilities/remote/types/mocks/receiver.go b/core/capabilities/remote/types/mocks/receiver.go index a15c464450e..bc41baa5496 100644 --- a/core/capabilities/remote/types/mocks/receiver.go +++ b/core/capabilities/remote/types/mocks/receiver.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. package mocks diff --git a/core/capabilities/syncer.go b/core/capabilities/syncer.go index 2de917b5f9f..dc9126dba36 100644 --- a/core/capabilities/syncer.go +++ b/core/capabilities/syncer.go @@ -10,7 +10,7 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/capabilities/mercury" "github.com/smartcontractkit/chainlink-common/pkg/capabilities/triggers" "github.com/smartcontractkit/chainlink-common/pkg/services" - "github.com/smartcontractkit/chainlink-common/pkg/types" + "github.com/smartcontractkit/chainlink-common/pkg/types/core" "github.com/smartcontractkit/libocr/ragep2p" ragetypes "github.com/smartcontractkit/libocr/ragep2p/types" @@ -23,7 +23,7 @@ import ( type registrySyncer struct { peerWrapper p2ptypes.PeerWrapper - registry types.CapabilitiesRegistry + registry core.CapabilitiesRegistry dispatcher remotetypes.Dispatcher subServices []services.Service lggr logger.Logger @@ -46,7 +46,7 @@ var defaultStreamConfig = p2ptypes.StreamConfig{ } // RegistrySyncer updates local Registry to match its onchain counterpart -func NewRegistrySyncer(peerWrapper p2ptypes.PeerWrapper, registry types.CapabilitiesRegistry, dispatcher remotetypes.Dispatcher, lggr logger.Logger) *registrySyncer { +func NewRegistrySyncer(peerWrapper p2ptypes.PeerWrapper, registry core.CapabilitiesRegistry, dispatcher remotetypes.Dispatcher, lggr logger.Logger) *registrySyncer { return ®istrySyncer{ peerWrapper: peerWrapper, registry: registry, diff --git a/core/capabilities/targets/write_target.go b/core/capabilities/targets/write_target.go index 43b02939c04..47f1048211e 100644 --- a/core/capabilities/targets/write_target.go +++ b/core/capabilities/targets/write_target.go @@ -14,7 +14,7 @@ import ( chainselectors "github.com/smartcontractkit/chain-selectors" "github.com/smartcontractkit/chainlink-common/pkg/capabilities" - commontypes "github.com/smartcontractkit/chainlink-common/pkg/types" + "github.com/smartcontractkit/chainlink-common/pkg/types/core" "github.com/smartcontractkit/chainlink-common/pkg/values" txmgrcommon "github.com/smartcontractkit/chainlink/v2/common/txmgr" abiutil "github.com/smartcontractkit/chainlink/v2/core/chains/evm/abi" @@ -28,8 +28,7 @@ import ( var forwardABI = evmtypes.MustGetABI(forwarder.KeystoneForwarderMetaData.ABI) -func InitializeWrite(registry commontypes.CapabilitiesRegistry, legacyEVMChains legacyevm.LegacyChainContainer, - lggr logger.Logger) error { +func InitializeWrite(registry core.CapabilitiesRegistry, legacyEVMChains legacyevm.LegacyChainContainer, lggr logger.Logger) error { for _, chain := range legacyEVMChains.Slice() { capability := NewEvmWrite(chain, lggr) if err := registry.Add(context.TODO(), capability); err != nil { diff --git a/core/chainlink.Dockerfile b/core/chainlink.Dockerfile index 4aa447b5ddd..48f6da73612 100644 --- a/core/chainlink.Dockerfile +++ b/core/chainlink.Dockerfile @@ -12,12 +12,19 @@ RUN go mod download # Env vars needed for chainlink build ARG COMMIT_SHA +# Build chainlink bin with cover flag https://go.dev/doc/build-cover#FAQ +ARG GO_COVER_FLAG=false + COPY . . RUN apt-get update && apt-get install -y jq # Build the golang binary -RUN make install-chainlink +RUN if [ "$GO_COVER_FLAG" = "true" ]; then \ + make install-chainlink-cover; \ + else \ + make install-chainlink; \ + fi # Link LOOP Plugin source dirs with simple names RUN go list -m -f "{{.Dir}}" github.com/smartcontractkit/chainlink-feeds | xargs -I % ln -s % /chainlink-feeds @@ -68,6 +75,11 @@ WORKDIR /home/${CHAINLINK_USER} ENV XDG_CACHE_HOME /home/${CHAINLINK_USER}/.cache RUN mkdir -p ${XDG_CACHE_HOME} +# Set up env and dir for go coverage profiling https://go.dev/doc/build-cover#FAQ +ARG GO_COVER_DIR="/var/tmp/go-coverage" +ENV GOCOVERDIR=${GO_COVER_DIR} +RUN mkdir -p $GO_COVER_DIR + EXPOSE 6688 ENTRYPOINT ["chainlink"] diff --git a/core/chains/evm/client/chain_client.go b/core/chains/evm/client/chain_client.go index 52bc1263c75..3ee10a600da 100644 --- a/core/chains/evm/client/chain_client.go +++ b/core/chains/evm/client/chain_client.go @@ -5,6 +5,8 @@ import ( "math/big" "time" + evmconfig "github.com/smartcontractkit/chainlink/v2/core/chains/evm/config" + "github.com/ethereum/go-ethereum" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" @@ -38,8 +40,9 @@ type chainClient struct { RPCClient, rpc.BatchElem, ] - logger logger.SugaredLogger - chainType config.ChainType + logger logger.SugaredLogger + chainType config.ChainType + clientErrors evmconfig.ClientErrors } func NewChainClient( @@ -51,6 +54,7 @@ func NewChainClient( sendonlys []commonclient.SendOnlyNode[*big.Int, RPCClient], chainID *big.Int, chainType config.ChainType, + clientErrors evmconfig.ClientErrors, ) Client { multiNode := commonclient.NewMultiNode( lggr, @@ -63,13 +67,14 @@ func NewChainClient( chainType, "EVM", func(tx *types.Transaction, err error) commonclient.SendTxReturnCode { - return ClassifySendError(err, logger.Sugared(logger.Nop()), tx, common.Address{}, chainType.IsL2()) + return ClassifySendError(err, clientErrors, logger.Sugared(logger.Nop()), tx, common.Address{}, chainType.IsL2()) }, 0, // use the default value provided by the implementation ) return &chainClient{ - multiNode: multiNode, - logger: logger.Sugared(lggr), + multiNode: multiNode, + logger: logger.Sugared(lggr), + clientErrors: clientErrors, } } @@ -208,7 +213,7 @@ func (c *chainClient) SendTransaction(ctx context.Context, tx *types.Transaction func (c *chainClient) SendTransactionReturnCode(ctx context.Context, tx *types.Transaction, fromAddress common.Address) (commonclient.SendTxReturnCode, error) { err := c.SendTransaction(ctx, tx) - returnCode := ClassifySendError(err, c.logger, tx, fromAddress, c.IsL2()) + returnCode := ClassifySendError(err, c.clientErrors, c.logger, tx, fromAddress, c.IsL2()) return returnCode, err } diff --git a/core/chains/evm/client/client.go b/core/chains/evm/client/client.go index 2758c9cf0a4..9628c74b9ab 100644 --- a/core/chains/evm/client/client.go +++ b/core/chains/evm/client/client.go @@ -225,7 +225,7 @@ func (client *client) HeaderByHash(ctx context.Context, h common.Hash) (*types.H func (client *client) SendTransactionReturnCode(ctx context.Context, tx *types.Transaction, fromAddress common.Address) (commonclient.SendTxReturnCode, error) { err := client.SendTransaction(ctx, tx) - returnCode := ClassifySendError(err, client.logger, tx, fromAddress, client.pool.ChainType().IsL2()) + returnCode := ClassifySendError(err, nil, client.logger, tx, fromAddress, client.pool.ChainType().IsL2()) return returnCode, err } diff --git a/core/chains/evm/client/config_builder_test.go b/core/chains/evm/client/config_builder_test.go index 431cbc82353..963cb855023 100644 --- a/core/chains/evm/client/config_builder_test.go +++ b/core/chains/evm/client/config_builder_test.go @@ -56,7 +56,7 @@ func TestClientConfigBuilder(t *testing.T) { require.Equal(t, *finalityTagEnabled, chainCfg.FinalityTagEnabled()) // let combiler tell us, when we do not have sufficient data to create evm client - _ = client.NewEvmClient(nodePool, chainCfg, logger.Test(t), big.NewInt(10), nodes) + _ = client.NewEvmClient(nodePool, chainCfg, nil, logger.Test(t), big.NewInt(10), nodes) } func TestNodeConfigs(t *testing.T) { diff --git a/core/chains/evm/client/errors.go b/core/chains/evm/client/errors.go index 37572bc8643..b7e0d9317eb 100644 --- a/core/chains/evm/client/errors.go +++ b/core/chains/evm/client/errors.go @@ -13,6 +13,7 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/logger" commonclient "github.com/smartcontractkit/chainlink/v2/common/client" + "github.com/smartcontractkit/chainlink/v2/core/chains/evm/config" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/label" ) @@ -29,16 +30,11 @@ func (s *SendError) Error() string { // Fatal indicates whether the error should be considered fatal or not // Fatal errors mean that no matter how many times the send is retried, no node // will ever accept it -func (s *SendError) Fatal() bool { - return s != nil && s.fatal -} - -// CauseStr returns the string of the original error -func (s *SendError) CauseStr() string { - if s.err != nil { - return pkgerrors.Cause(s.err).Error() +func (s *SendError) Fatal(configErrors *ClientErrors) bool { + if configErrors != nil && configErrors.ErrIs(s.err, Fatal) { + return true } - return "" + return s != nil && s.fatal } const ( @@ -66,7 +62,26 @@ const ( OutOfCounters ) -type ClientErrors = map[int]*regexp.Regexp +type ClientErrors map[int]*regexp.Regexp + +// ErrIs returns true if err matches any provided error types +func (e *ClientErrors) ErrIs(err error, errorTypes ...int) bool { + if err == nil { + return false + } + for _, errorType := range errorTypes { + if _, ok := (*e)[errorType]; !ok { + return false + } + if (*e)[errorType].String() == "" { + return false + } + if (*e)[errorType].MatchString(pkgerrors.Cause(err).Error()) { + return true + } + } + return false +} // Parity // See: https://github.com/openethereum/openethereum/blob/master/rpc/src/v1/helpers/errors.rs#L420 @@ -235,16 +250,38 @@ var zkEvm = ClientErrors{ var clients = []ClientErrors{parity, geth, arbitrum, metis, substrate, avalanche, nethermind, harmony, besu, erigon, klaytn, celo, zkSync, zkEvm} -func (s *SendError) is(errorType int) bool { +// ClientErrorRegexes returns a map of compiled regexes for each error type +func ClientErrorRegexes(errsRegex config.ClientErrors) *ClientErrors { + if errsRegex == nil { + return &ClientErrors{} + } + return &ClientErrors{ + NonceTooLow: regexp.MustCompile(errsRegex.NonceTooLow()), + NonceTooHigh: regexp.MustCompile(errsRegex.NonceTooHigh()), + ReplacementTransactionUnderpriced: regexp.MustCompile(errsRegex.ReplacementTransactionUnderpriced()), + LimitReached: regexp.MustCompile(errsRegex.LimitReached()), + TransactionAlreadyInMempool: regexp.MustCompile(errsRegex.TransactionAlreadyInMempool()), + TerminallyUnderpriced: regexp.MustCompile(errsRegex.TerminallyUnderpriced()), + InsufficientEth: regexp.MustCompile(errsRegex.InsufficientEth()), + TxFeeExceedsCap: regexp.MustCompile(errsRegex.TxFeeExceedsCap()), + L2FeeTooLow: regexp.MustCompile(errsRegex.L2FeeTooLow()), + L2FeeTooHigh: regexp.MustCompile(errsRegex.L2FeeTooHigh()), + L2Full: regexp.MustCompile(errsRegex.L2Full()), + TransactionAlreadyMined: regexp.MustCompile(errsRegex.TransactionAlreadyMined()), + Fatal: regexp.MustCompile(errsRegex.Fatal()), + ServiceUnavailable: regexp.MustCompile(errsRegex.ServiceUnavailable()), + } +} + +func (s *SendError) is(errorType int, configErrors *ClientErrors) bool { if s == nil || s.err == nil { return false } - str := s.CauseStr() + if configErrors != nil && configErrors.ErrIs(s.err, errorType) { + return true + } for _, client := range clients { - if _, ok := client[errorType]; !ok { - continue - } - if client[errorType].MatchString(str) { + if client.ErrIs(s.err, errorType) { return true } } @@ -252,72 +289,72 @@ func (s *SendError) is(errorType int) bool { } // IsReplacementUnderpriced indicates that a transaction already exists in the mempool with this nonce but a different gas price or payload -func (s *SendError) IsReplacementUnderpriced() bool { - return s.is(ReplacementTransactionUnderpriced) +func (s *SendError) IsReplacementUnderpriced(configErrors *ClientErrors) bool { + return s.is(ReplacementTransactionUnderpriced, configErrors) } -func (s *SendError) IsNonceTooLowError() bool { - return s.is(NonceTooLow) +func (s *SendError) IsNonceTooLowError(configErrors *ClientErrors) bool { + return s.is(NonceTooLow, configErrors) } -func (s *SendError) IsNonceTooHighError() bool { - return s.is(NonceTooHigh) +func (s *SendError) IsNonceTooHighError(configErrors *ClientErrors) bool { + return s.is(NonceTooHigh, configErrors) } // IsTransactionAlreadyMined - Harmony returns this error if the transaction has already been mined -func (s *SendError) IsTransactionAlreadyMined() bool { - return s.is(TransactionAlreadyMined) +func (s *SendError) IsTransactionAlreadyMined(configErrors *ClientErrors) bool { + return s.is(TransactionAlreadyMined, configErrors) } // Geth/parity returns this error if the transaction is already in the node's mempool -func (s *SendError) IsTransactionAlreadyInMempool() bool { - return s.is(TransactionAlreadyInMempool) +func (s *SendError) IsTransactionAlreadyInMempool(configErrors *ClientErrors) bool { + return s.is(TransactionAlreadyInMempool, configErrors) } // IsTerminallyUnderpriced indicates that this transaction is so far underpriced the node won't even accept it in the first place -func (s *SendError) IsTerminallyUnderpriced() bool { - return s.is(TerminallyUnderpriced) +func (s *SendError) IsTerminallyUnderpriced(configErrors *ClientErrors) bool { + return s.is(TerminallyUnderpriced, configErrors) } -func (s *SendError) IsTemporarilyUnderpriced() bool { - return s.is(LimitReached) +func (s *SendError) IsTemporarilyUnderpriced(configErrors *ClientErrors) bool { + return s.is(LimitReached, configErrors) } -func (s *SendError) IsInsufficientEth() bool { - return s.is(InsufficientEth) +func (s *SendError) IsInsufficientEth(configErrors *ClientErrors) bool { + return s.is(InsufficientEth, configErrors) } // IsTxFeeExceedsCap returns true if the transaction and gas price are combined in // some way that makes the total transaction too expensive for the eth node to // accept at all. No amount of retrying at this or higher gas prices can ever // succeed. -func (s *SendError) IsTxFeeExceedsCap() bool { - return s.is(TxFeeExceedsCap) +func (s *SendError) IsTxFeeExceedsCap(configErrors *ClientErrors) bool { + return s.is(TxFeeExceedsCap, configErrors) } // L2FeeTooLow is an l2-specific error returned when total fee is too low -func (s *SendError) L2FeeTooLow() bool { - return s.is(L2FeeTooLow) +func (s *SendError) L2FeeTooLow(configErrors *ClientErrors) bool { + return s.is(L2FeeTooLow, configErrors) } // IsL2FeeTooHigh is an l2-specific error returned when total fee is too high -func (s *SendError) IsL2FeeTooHigh() bool { - return s.is(L2FeeTooHigh) +func (s *SendError) IsL2FeeTooHigh(configErrors *ClientErrors) bool { + return s.is(L2FeeTooHigh, configErrors) } // IsL2Full is an l2-specific error returned when the queue or mempool is full. -func (s *SendError) IsL2Full() bool { - return s.is(L2Full) +func (s *SendError) IsL2Full(configErrors *ClientErrors) bool { + return s.is(L2Full, configErrors) } // IsServiceUnavailable indicates if the error was caused by a service being unavailable -func (s *SendError) IsServiceUnavailable() bool { - return s.is(ServiceUnavailable) +func (s *SendError) IsServiceUnavailable(configErrors *ClientErrors) bool { + return s.is(ServiceUnavailable, configErrors) } // IsOutOfCounters is a zk chain specific error returned if the transaction is too complex to prove on zk circuits -func (s *SendError) IsOutOfCounters() bool { - return s.is(OutOfCounters) +func (s *SendError) IsOutOfCounters(configErrors *ClientErrors) bool { + return s.is(OutOfCounters, configErrors) } // IsTimeout indicates if the error was caused by an exceeded context deadline @@ -369,6 +406,7 @@ func isFatalSendError(err error) bool { return false } str := pkgerrors.Cause(err).Error() + for _, client := range clients { if _, ok := client[Fatal]; !ok { continue @@ -444,23 +482,26 @@ func ExtractRPCError(baseErr error) (*JsonError, error) { return &jErr, nil } -func ClassifySendError(err error, lggr logger.SugaredLogger, tx *types.Transaction, fromAddress common.Address, isL2 bool) commonclient.SendTxReturnCode { +func ClassifySendError(err error, clientErrors config.ClientErrors, lggr logger.SugaredLogger, tx *types.Transaction, fromAddress common.Address, isL2 bool) commonclient.SendTxReturnCode { sendError := NewSendError(err) if sendError == nil { return commonclient.Successful } - if sendError.Fatal() { + + configErrors := ClientErrorRegexes(clientErrors) + + if sendError.Fatal(configErrors) { lggr.Criticalw("Fatal error sending transaction", "err", sendError, "etx", tx) // Attempt is thrown away in this case; we don't need it since it never got accepted by a node return commonclient.Fatal } - if sendError.IsNonceTooLowError() || sendError.IsTransactionAlreadyMined() { + if sendError.IsNonceTooLowError(configErrors) || sendError.IsTransactionAlreadyMined(configErrors) { lggr.Debugw(fmt.Sprintf("Transaction already confirmed for this nonce: %d", tx.Nonce()), "err", sendError, "etx", tx) // Nonce too low indicated that a transaction at this nonce was confirmed already. // Mark it as TransactionAlreadyKnown. return commonclient.TransactionAlreadyKnown } - if sendError.IsReplacementUnderpriced() { + if sendError.IsReplacementUnderpriced(configErrors) { lggr.Errorw(fmt.Sprintf("Replacement transaction underpriced for eth_tx %x. "+ "Please note that using your node's private keys outside of the chainlink node is NOT SUPPORTED and can lead to missed transactions.", tx.Hash()), "gasPrice", tx.GasPrice, "gasTipCap", tx.GasTipCap, "gasFeeCap", tx.GasFeeCap, "err", sendError, "etx", tx) @@ -468,19 +509,19 @@ func ClassifySendError(err error, lggr logger.SugaredLogger, tx *types.Transacti // Assume success and hand off to the next cycle. return commonclient.Successful } - if sendError.IsTransactionAlreadyInMempool() { + if sendError.IsTransactionAlreadyInMempool(configErrors) { lggr.Debugw("Transaction already in mempool", "etx", tx, "err", sendError) return commonclient.Successful } - if sendError.IsTemporarilyUnderpriced() { + if sendError.IsTemporarilyUnderpriced(configErrors) { lggr.Infow("Transaction temporarily underpriced", "err", sendError) return commonclient.Successful } - if sendError.IsTerminallyUnderpriced() { + if sendError.IsTerminallyUnderpriced(configErrors) { lggr.Errorw("Transaction terminally underpriced", "etx", tx, "err", sendError) return commonclient.Underpriced } - if sendError.L2FeeTooLow() || sendError.IsL2FeeTooHigh() || sendError.IsL2Full() { + if sendError.L2FeeTooLow(configErrors) || sendError.IsL2FeeTooHigh(configErrors) || sendError.IsL2Full(configErrors) { if isL2 { lggr.Errorw("Transaction fee out of range", "err", sendError, "etx", tx) return commonclient.FeeOutOfValidRange @@ -488,21 +529,21 @@ func ClassifySendError(err error, lggr logger.SugaredLogger, tx *types.Transacti lggr.Errorw("this error type only handled for L2s", "err", sendError, "etx", tx) return commonclient.Unsupported } - if sendError.IsNonceTooHighError() { + if sendError.IsNonceTooHighError(configErrors) { // This error occurs when the tx nonce is greater than current_nonce + tx_count_in_mempool, // instead of keeping the tx in mempool. This can happen if previous transactions haven't // reached the client yet. The correct thing to do is to mark it as retryable. lggr.Warnw("Transaction has a nonce gap.", "err", sendError, "etx", tx) return commonclient.Retryable } - if sendError.IsInsufficientEth() { + if sendError.IsInsufficientEth(configErrors) { lggr.Criticalw(fmt.Sprintf("Tx %x with type 0x%d was rejected due to insufficient eth: %s\n"+ "ACTION REQUIRED: Chainlink wallet with address 0x%x is OUT OF FUNDS", tx.Hash(), tx.Type(), sendError.Error(), fromAddress, ), "err", sendError, "etx", tx) return commonclient.InsufficientFunds } - if sendError.IsServiceUnavailable() { + if sendError.IsServiceUnavailable(configErrors) { lggr.Errorw(fmt.Sprintf("service unavailable while sending transaction %x", tx.Hash()), "err", sendError, "etx", tx) return commonclient.Retryable } @@ -514,7 +555,7 @@ func ClassifySendError(err error, lggr logger.SugaredLogger, tx *types.Transacti lggr.Errorw(fmt.Sprintf("context was canceled while sending transaction %x", tx.Hash()), "err", sendError, "etx", tx) return commonclient.Retryable } - if sendError.IsTxFeeExceedsCap() { + if sendError.IsTxFeeExceedsCap(configErrors) { lggr.Criticalw(fmt.Sprintf("Sending transaction failed: %s", label.RPCTxFeeCapConfiguredIncorrectlyWarning), "etx", tx, "err", sendError, diff --git a/core/chains/evm/client/errors_test.go b/core/chains/evm/client/errors_test.go index 5d1fa135725..744abb89f60 100644 --- a/core/chains/evm/client/errors_test.go +++ b/core/chains/evm/client/errors_test.go @@ -1,6 +1,7 @@ package client_test import ( + "errors" "testing" pkgerrors "github.com/pkg/errors" @@ -25,9 +26,10 @@ func Test_Eth_Errors(t *testing.T) { var err *evmclient.SendError randomError := evmclient.NewSendErrorS("some old bollocks") - t.Run("IsNonceTooLowError", func(t *testing.T) { - assert.False(t, randomError.IsNonceTooLowError()) + testErrors := evmclient.NewTestClientErrors() + clientErrors := evmclient.ClientErrorRegexes(&testErrors) + t.Run("IsNonceTooLowError", func(t *testing.T) { tests := []errorCase{ {"nonce too low", true, "Geth"}, {"nonce too low: address 0x336394A3219e71D9d9bd18201d34E95C1Bb7122C, tx: 8089 state: 8090", true, "Arbitrum"}, @@ -41,20 +43,20 @@ func Test_Eth_Errors(t *testing.T) { {"call failed: OldNonce", true, "Nethermind"}, {"call failed: OldNonce, Current nonce: 22, nonce of rejected tx: 17", true, "Nethermind"}, {"nonce too low. allowed nonce range: 427 - 447, actual: 426", true, "zkSync"}, + {"client error nonce too low", true, "tomlConfig"}, } for _, test := range tests { t.Run(test.network, func(t *testing.T) { err = evmclient.NewSendErrorS(test.message) - assert.Equal(t, err.IsNonceTooLowError(), test.expect) + assert.Equal(t, err.IsNonceTooLowError(clientErrors), test.expect) err = newSendErrorWrapped(test.message) - assert.Equal(t, err.IsNonceTooLowError(), test.expect) + assert.Equal(t, err.IsNonceTooLowError(clientErrors), test.expect) }) } }) t.Run("IsNonceTooHigh", func(t *testing.T) { - tests := []errorCase{ {"call failed: NonceGap", true, "Nethermind"}, {"call failed: NonceGap, Future nonce. Expected nonce: 10", true, "Nethermind"}, @@ -62,29 +64,31 @@ func Test_Eth_Errors(t *testing.T) { {"nonce too high", true, "Geth"}, {"nonce too high", true, "Erigon"}, {"nonce too high. allowed nonce range: 427 - 477, actual: 527", true, "zkSync"}, + {"client error nonce too high", true, "tomlConfig"}, } for _, test := range tests { err = evmclient.NewSendErrorS(test.message) - assert.Equal(t, err.IsNonceTooHighError(), test.expect) + assert.Equal(t, err.IsNonceTooHighError(clientErrors), test.expect) err = newSendErrorWrapped(test.message) - assert.Equal(t, err.IsNonceTooHighError(), test.expect) + assert.Equal(t, err.IsNonceTooHighError(clientErrors), test.expect) } }) t.Run("IsTransactionAlreadyMined", func(t *testing.T) { - assert.False(t, randomError.IsTransactionAlreadyMined()) + assert.False(t, randomError.IsTransactionAlreadyMined(clientErrors)) tests := []errorCase{ {"transaction already finalized", true, "Harmony"}, + {"client error transaction already mined", true, "tomlConfig"}, } for _, test := range tests { t.Run(test.network, func(t *testing.T) { err = evmclient.NewSendErrorS(test.message) - assert.Equal(t, err.IsTransactionAlreadyMined(), test.expect) + assert.Equal(t, err.IsTransactionAlreadyMined(clientErrors), test.expect) err = newSendErrorWrapped(test.message) - assert.Equal(t, err.IsTransactionAlreadyMined(), test.expect) + assert.Equal(t, err.IsTransactionAlreadyMined(clientErrors), test.expect) }) } }) @@ -100,18 +104,20 @@ func Test_Eth_Errors(t *testing.T) { {"Transaction gas price 100wei is too low. There is another transaction with same nonce in the queue with gas price 150wei. Try increasing the gas price or incrementing the nonce.", true, "Parity"}, {"There are too many transactions in the queue. Your transaction was dropped due to limit. Try increasing the fee.", false, "Parity"}, {"gas price too low", false, "Arbitrum"}, + {"client error replacement underpriced", true, "tomlConfig"}, + {"", false, "tomlConfig"}, } for _, test := range tests { err = evmclient.NewSendErrorS(test.message) - assert.Equal(t, err.IsReplacementUnderpriced(), test.expect) + assert.Equal(t, err.IsReplacementUnderpriced(clientErrors), test.expect) err = newSendErrorWrapped(test.message) - assert.Equal(t, err.IsReplacementUnderpriced(), test.expect) + assert.Equal(t, err.IsReplacementUnderpriced(clientErrors), test.expect) } }) t.Run("IsTransactionAlreadyInMempool", func(t *testing.T) { - assert.False(t, randomError.IsTransactionAlreadyInMempool()) + assert.False(t, randomError.IsTransactionAlreadyInMempool(clientErrors)) tests := []errorCase{ // I have seen this in log output @@ -130,17 +136,18 @@ func Test_Eth_Errors(t *testing.T) { {"known transaction. transaction with hash 0x6013…3053 is already in the system", true, "zkSync"}, // This seems to be an erroneous message from the zkSync client, we'll have to match it anyway {"ErrorObject { code: ServerError(3), message: \\\"known transaction. transaction with hash 0xf016…ad63 is already in the system\\\", data: Some(RawValue(\\\"0x\\\")) }", true, "zkSync"}, + {"client error transaction already in mempool", true, "tomlConfig"}, } for _, test := range tests { err = evmclient.NewSendErrorS(test.message) - assert.Equal(t, err.IsTransactionAlreadyInMempool(), test.expect) + assert.Equal(t, err.IsTransactionAlreadyInMempool(clientErrors), test.expect) err = newSendErrorWrapped(test.message) - assert.Equal(t, err.IsTransactionAlreadyInMempool(), test.expect) + assert.Equal(t, err.IsTransactionAlreadyInMempool(clientErrors), test.expect) } }) t.Run("IsTerminallyUnderpriced", func(t *testing.T) { - assert.False(t, randomError.IsTerminallyUnderpriced()) + assert.False(t, randomError.IsTerminallyUnderpriced(clientErrors)) tests := []errorCase{ {"transaction underpriced", true, "geth"}, @@ -159,13 +166,14 @@ func Test_Eth_Errors(t *testing.T) { {"intrinsic gas too low", true, "Klaytn"}, {"max fee per gas less than block base fee", true, "zkSync"}, {"virtual machine entered unexpected state. please contact developers and provide transaction details that caused this error. Error description: The operator included transaction with an unacceptable gas price", true, "zkSync"}, + {"client error terminally underpriced", true, "tomlConfig"}, } for _, test := range tests { err = evmclient.NewSendErrorS(test.message) - assert.Equal(t, err.IsTerminallyUnderpriced(), test.expect, "expected %q to match %s for client %s", err, "IsTerminallyUnderpriced", test.network) + assert.Equal(t, err.IsTerminallyUnderpriced(clientErrors), test.expect, "expected %q to match %s for client %s", err, "IsTerminallyUnderpriced", test.network) err = newSendErrorWrapped(test.message) - assert.Equal(t, err.IsTerminallyUnderpriced(), test.expect, "expected %q to match %s for client %s", err, "IsTerminallyUnderpriced", test.network) + assert.Equal(t, err.IsTerminallyUnderpriced(clientErrors), test.expect, "expected %q to match %s for client %s", err, "IsTerminallyUnderpriced", test.network) } }) @@ -174,12 +182,13 @@ func Test_Eth_Errors(t *testing.T) { {"There are too many transactions in the queue. Your transaction was dropped due to limit. Try increasing the fee.", true, "Parity"}, {"There are too many transactions in the queue. Your transaction was dropped due to limit. Try increasing the fee.", true, "Parity"}, {"Transaction gas price is too low. It does not satisfy your node's minimal gas price (minimal: 100 got: 50). Try increasing the gas price.", false, "Parity"}, + {"client error transaction underpriced", false, "tomlConfig"}, } for _, test := range tests { err = evmclient.NewSendErrorS(test.message) - assert.Equal(t, err.IsTemporarilyUnderpriced(), test.expect) + assert.Equal(t, err.IsTemporarilyUnderpriced(clientErrors), test.expect) err = newSendErrorWrapped(test.message) - assert.Equal(t, err.IsTemporarilyUnderpriced(), test.expect) + assert.Equal(t, err.IsTemporarilyUnderpriced(clientErrors), test.expect) } }) @@ -204,12 +213,13 @@ func Test_Eth_Errors(t *testing.T) { {"insufficient funds for gas * price + value + gatewayFee", true, "celo"}, {"insufficient balance for transfer", true, "zkSync"}, {"insufficient funds for gas + value. balance: 42719769622667482000, fee: 48098250000000, value: 42719769622667482000", true, "celo"}, + {"client error insufficient eth", true, "tomlConfig"}, } for _, test := range tests { err = evmclient.NewSendErrorS(test.message) - assert.Equal(t, err.IsInsufficientEth(), test.expect) + assert.Equal(t, err.IsInsufficientEth(clientErrors), test.expect) err = newSendErrorWrapped(test.message) - assert.Equal(t, err.IsInsufficientEth(), test.expect) + assert.Equal(t, err.IsInsufficientEth(clientErrors), test.expect) } }) @@ -217,12 +227,13 @@ func Test_Eth_Errors(t *testing.T) { tests := []errorCase{ {"call failed: 503 Service Unavailable: \r\n503 Service Temporarily Unavailable\r\n\r\n

503 Service Temporarily Unavailable

\r\n\r\n\r\n", true, "Nethermind"}, {"call failed: 502 Bad Gateway: \r\n502 Bad Gateway\r\n\r\n

502 Bad Gateway

\r\n
", true, "Arbitrum"}, + {"client error service unavailable", true, "tomlConfig"}, } for _, test := range tests { err = evmclient.NewSendErrorS(test.message) - assert.Equal(t, err.IsServiceUnavailable(), test.expect) + assert.Equal(t, err.IsServiceUnavailable(clientErrors), test.expect) err = newSendErrorWrapped(test.message) - assert.Equal(t, err.IsServiceUnavailable(), test.expect) + assert.Equal(t, err.IsServiceUnavailable(clientErrors), test.expect) } }) @@ -237,68 +248,72 @@ func Test_Eth_Errors(t *testing.T) { {"max fee per gas higher than max priority fee per gas", true, "Klaytn"}, {"tx fee (1.10 of currency celo) exceeds the configured cap (1.00 celo)", true, "celo"}, {"max priority fee per gas higher than max fee per gas", true, "zkSync"}, + {"client error tx fee exceeds cap", true, "tomlConfig"}, } for _, test := range tests { err = evmclient.NewSendErrorS(test.message) - assert.Equal(t, err.IsTxFeeExceedsCap(), test.expect) + assert.Equal(t, err.IsTxFeeExceedsCap(clientErrors), test.expect) err = newSendErrorWrapped(test.message) - assert.Equal(t, err.IsTxFeeExceedsCap(), test.expect) + assert.Equal(t, err.IsTxFeeExceedsCap(clientErrors), test.expect) } - assert.False(t, randomError.IsTxFeeExceedsCap()) + assert.False(t, randomError.IsTxFeeExceedsCap(clientErrors)) // Nil err = evmclient.NewSendError(nil) - assert.False(t, err.IsTxFeeExceedsCap()) + assert.False(t, err.IsTxFeeExceedsCap(clientErrors)) }) t.Run("L2 Fees errors", func(t *testing.T) { err = evmclient.NewSendErrorS("max fee per gas less than block base fee") - assert.False(t, err.IsL2FeeTooHigh()) - assert.True(t, err.L2FeeTooLow()) + assert.False(t, err.IsL2FeeTooHigh(clientErrors)) + assert.True(t, err.L2FeeTooLow(clientErrors)) err = newSendErrorWrapped("max fee per gas less than block base fee") - assert.False(t, err.IsL2FeeTooHigh()) - assert.True(t, err.L2FeeTooLow()) + assert.False(t, err.IsL2FeeTooHigh(clientErrors)) + assert.True(t, err.L2FeeTooLow(clientErrors)) err = evmclient.NewSendErrorS("queue full") - assert.True(t, err.IsL2Full()) + assert.True(t, err.IsL2Full(clientErrors)) err = evmclient.NewSendErrorS("sequencer pending tx pool full, please try again") - assert.True(t, err.IsL2Full()) + assert.True(t, err.IsL2Full(clientErrors)) - assert.False(t, randomError.IsL2FeeTooHigh()) - assert.False(t, randomError.L2FeeTooLow()) + assert.False(t, randomError.IsL2FeeTooHigh(clientErrors)) + assert.False(t, randomError.L2FeeTooLow(clientErrors)) // Nil err = evmclient.NewSendError(nil) - assert.False(t, err.IsL2FeeTooHigh()) - assert.False(t, err.L2FeeTooLow()) + assert.False(t, err.IsL2FeeTooHigh(clientErrors)) + assert.False(t, err.L2FeeTooLow(clientErrors)) }) t.Run("Metis gas price errors", func(t *testing.T) { err := evmclient.NewSendErrorS("primary websocket (wss://ws-mainnet.metis.io) call failed: gas price too low: 18000000000 wei, use at least tx.gasPrice = 19500000000 wei") - assert.True(t, err.L2FeeTooLow()) + assert.True(t, err.L2FeeTooLow(clientErrors)) err = newSendErrorWrapped("primary websocket (wss://ws-mainnet.metis.io) call failed: gas price too low: 18000000000 wei, use at least tx.gasPrice = 19500000000 wei") - assert.True(t, err.L2FeeTooLow()) + assert.True(t, err.L2FeeTooLow(clientErrors)) - assert.False(t, randomError.L2FeeTooLow()) + assert.False(t, randomError.L2FeeTooLow(clientErrors)) // Nil err = evmclient.NewSendError(nil) - assert.False(t, err.L2FeeTooLow()) + assert.False(t, err.L2FeeTooLow(clientErrors)) }) t.Run("moonriver errors", func(t *testing.T) { err := evmclient.NewSendErrorS("primary http (http://***REDACTED***:9933) call failed: submit transaction to pool failed: Pool(Stale)") - assert.True(t, err.IsNonceTooLowError()) - assert.False(t, err.IsTransactionAlreadyInMempool()) - assert.False(t, err.Fatal()) + assert.True(t, err.IsNonceTooLowError(clientErrors)) + assert.False(t, err.IsTransactionAlreadyInMempool(clientErrors)) + assert.False(t, err.Fatal(clientErrors)) err = evmclient.NewSendErrorS("primary http (http://***REDACTED***:9933) call failed: submit transaction to pool failed: Pool(AlreadyImported)") - assert.True(t, err.IsTransactionAlreadyInMempool()) - assert.False(t, err.IsNonceTooLowError()) - assert.False(t, err.Fatal()) + assert.True(t, err.IsTransactionAlreadyInMempool(clientErrors)) + assert.False(t, err.IsNonceTooLowError(clientErrors)) + assert.False(t, err.Fatal(clientErrors)) }) } func Test_Eth_Errors_Fatal(t *testing.T) { t.Parallel() + testErrors := evmclient.NewTestClientErrors() + clientErrors := evmclient.ClientErrorRegexes(&testErrors) + tests := []errorCase{ {"some old bollocks", false, "none"}, @@ -363,12 +378,38 @@ func Test_Eth_Errors_Fatal(t *testing.T) { {"Failed to serialize transaction: max fee per pubdata byte higher than 2^64-1", true, "zkSync"}, {"Failed to serialize transaction: max priority fee per gas higher than 2^64-1", true, "zkSync"}, {"Failed to serialize transaction: oversized data. max: 1000000; actual: 1000000", true, "zkSync"}, + + {"client error fatal", true, "tomlConfig"}, } for _, test := range tests { t.Run(test.message, func(t *testing.T) { err := evmclient.NewSendError(pkgerrors.New(test.message)) - assert.Equal(t, test.expect, err.Fatal()) + assert.Equal(t, test.expect, err.Fatal(clientErrors)) }) } } + +func Test_Config_Errors(t *testing.T) { + testErrors := evmclient.NewTestClientErrors() + clientErrors := evmclient.ClientErrorRegexes(&testErrors) + + t.Run("Client Error Matching", func(t *testing.T) { + assert.True(t, clientErrors.ErrIs(errors.New(testErrors.NonceTooLow()), evmclient.NonceTooLow)) + assert.True(t, clientErrors.ErrIs(errors.New(testErrors.NonceTooHigh()), evmclient.NonceTooHigh)) + assert.True(t, clientErrors.ErrIs(errors.New(testErrors.ReplacementTransactionUnderpriced()), evmclient.ReplacementTransactionUnderpriced)) + assert.True(t, clientErrors.ErrIs(errors.New(testErrors.LimitReached()), evmclient.LimitReached)) + assert.True(t, clientErrors.ErrIs(errors.New(testErrors.TransactionAlreadyInMempool()), evmclient.TransactionAlreadyInMempool)) + assert.True(t, clientErrors.ErrIs(errors.New(testErrors.TerminallyUnderpriced()), evmclient.TerminallyUnderpriced)) + assert.True(t, clientErrors.ErrIs(errors.New(testErrors.InsufficientEth()), evmclient.InsufficientEth)) + assert.True(t, clientErrors.ErrIs(errors.New(testErrors.TxFeeExceedsCap()), evmclient.TxFeeExceedsCap)) + assert.True(t, clientErrors.ErrIs(errors.New(testErrors.L2FeeTooLow()), evmclient.L2FeeTooLow)) + assert.True(t, clientErrors.ErrIs(errors.New(testErrors.L2FeeTooHigh()), evmclient.L2FeeTooHigh)) + assert.True(t, clientErrors.ErrIs(errors.New(testErrors.L2Full()), evmclient.L2Full)) + assert.True(t, clientErrors.ErrIs(errors.New(testErrors.TransactionAlreadyMined()), evmclient.TransactionAlreadyMined)) + assert.True(t, clientErrors.ErrIs(errors.New(testErrors.Fatal()), evmclient.Fatal)) + assert.True(t, clientErrors.ErrIs(errors.New(testErrors.ServiceUnavailable()), evmclient.ServiceUnavailable)) + assert.True(t, clientErrors.ErrIs(errors.New(testErrors.ServiceUnavailable()), evmclient.L2Full, evmclient.ServiceUnavailable)) + assert.False(t, clientErrors.ErrIs(errors.New("some old bollocks"), evmclient.NonceTooLow)) + }) +} diff --git a/core/chains/evm/client/evm_client.go b/core/chains/evm/client/evm_client.go index f60605bc88e..98f7c99bf40 100644 --- a/core/chains/evm/client/evm_client.go +++ b/core/chains/evm/client/evm_client.go @@ -12,7 +12,7 @@ import ( evmtypes "github.com/smartcontractkit/chainlink/v2/core/chains/evm/types" ) -func NewEvmClient(cfg evmconfig.NodePool, chainCfg commonclient.ChainConfig, lggr logger.Logger, chainID *big.Int, nodes []*toml.Node) Client { +func NewEvmClient(cfg evmconfig.NodePool, chainCfg commonclient.ChainConfig, clientErrors evmconfig.ClientErrors, lggr logger.Logger, chainID *big.Int, nodes []*toml.Node) Client { var empty url.URL var primaries []commonclient.Node[*big.Int, *evmtypes.Head, RPCClient] var sendonlys []commonclient.SendOnlyNode[*big.Int, RPCClient] @@ -32,6 +32,7 @@ func NewEvmClient(cfg evmconfig.NodePool, chainCfg commonclient.ChainConfig, lgg primaries = append(primaries, primaryNode) } } + return NewChainClient(lggr, cfg.SelectionMode(), cfg.LeaseDuration(), chainCfg.NodeNoNewHeadsThreshold(), - primaries, sendonlys, chainID, chainCfg.ChainType()) + primaries, sendonlys, chainID, chainCfg.ChainType(), clientErrors) } diff --git a/core/chains/evm/client/evm_client_test.go b/core/chains/evm/client/evm_client_test.go index 1317c365d38..ea2eed3b240 100644 --- a/core/chains/evm/client/evm_client_test.go +++ b/core/chains/evm/client/evm_client_test.go @@ -36,6 +36,6 @@ func TestNewEvmClient(t *testing.T) { pollFailureThreshold, pollInterval, syncThreshold, nodeIsSyncingEnabled, noNewHeadsThreshold, finalityDepth, finalityTagEnabled) require.NoError(t, err) - client := client.NewEvmClient(nodePool, chainCfg, logger.Test(t), testutils.FixtureChainID, nodes) + client := client.NewEvmClient(nodePool, chainCfg, nil, logger.Test(t), testutils.FixtureChainID, nodes) require.NotNil(t, client) } diff --git a/core/chains/evm/client/helpers_test.go b/core/chains/evm/client/helpers_test.go index 2a360219046..1db8958443c 100644 --- a/core/chains/evm/client/helpers_test.go +++ b/core/chains/evm/client/helpers_test.go @@ -19,6 +19,65 @@ import ( evmtypes "github.com/smartcontractkit/chainlink/v2/core/chains/evm/types" ) +type TestClientErrors struct { + nonceTooLow string + nonceTooHigh string + replacementTransactionUnderpriced string + limitReached string + transactionAlreadyInMempool string + terminallyUnderpriced string + insufficientEth string + txFeeExceedsCap string + l2FeeTooLow string + l2FeeTooHigh string + l2Full string + transactionAlreadyMined string + fatal string + serviceUnavailable string +} + +func NewTestClientErrors() TestClientErrors { + return TestClientErrors{ + nonceTooLow: "client error nonce too low", + nonceTooHigh: "client error nonce too high", + replacementTransactionUnderpriced: "client error replacement underpriced", + limitReached: "client error limit reached", + transactionAlreadyInMempool: "client error transaction already in mempool", + terminallyUnderpriced: "client error terminally underpriced", + insufficientEth: "client error insufficient eth", + txFeeExceedsCap: "client error tx fee exceeds cap", + l2FeeTooLow: "client error l2 fee too low", + l2FeeTooHigh: "client error l2 fee too high", + l2Full: "client error l2 full", + transactionAlreadyMined: "client error transaction already mined", + fatal: "client error fatal", + serviceUnavailable: "client error service unavailable", + } +} + +func (c *TestClientErrors) NonceTooLow() string { return c.nonceTooLow } +func (c *TestClientErrors) NonceTooHigh() string { return c.nonceTooHigh } + +func (c *TestClientErrors) ReplacementTransactionUnderpriced() string { + return c.replacementTransactionUnderpriced +} + +func (c *TestClientErrors) LimitReached() string { return c.limitReached } + +func (c *TestClientErrors) TransactionAlreadyInMempool() string { + return c.transactionAlreadyInMempool +} + +func (c *TestClientErrors) TerminallyUnderpriced() string { return c.terminallyUnderpriced } +func (c *TestClientErrors) InsufficientEth() string { return c.insufficientEth } +func (c *TestClientErrors) TxFeeExceedsCap() string { return c.txFeeExceedsCap } +func (c *TestClientErrors) L2FeeTooLow() string { return c.l2FeeTooLow } +func (c *TestClientErrors) L2FeeTooHigh() string { return c.l2FeeTooHigh } +func (c *TestClientErrors) L2Full() string { return c.l2Full } +func (c *TestClientErrors) TransactionAlreadyMined() string { return c.transactionAlreadyMined } +func (c *TestClientErrors) Fatal() string { return c.fatal } +func (c *TestClientErrors) ServiceUnavailable() string { return c.serviceUnavailable } + type TestNodePoolConfig struct { NodePollFailureThreshold uint32 NodePollInterval time.Duration @@ -27,6 +86,7 @@ type TestNodePoolConfig struct { NodeLeaseDuration time.Duration NodeIsSyncingEnabledVal bool NodeFinalizedBlockPollInterval time.Duration + NodeErrors config.ClientErrors } func (tc TestNodePoolConfig) PollFailureThreshold() uint32 { return tc.NodePollFailureThreshold } @@ -45,6 +105,10 @@ func (tc TestNodePoolConfig) FinalizedBlockPollInterval() time.Duration { return tc.NodeFinalizedBlockPollInterval } +func (tc TestNodePoolConfig) Errors() config.ClientErrors { + return tc.NodeErrors +} + func NewClientWithTestNode(t *testing.T, nodePoolCfg config.NodePool, noNewHeadsThreshold time.Duration, rpcUrl string, rpcHTTPURL *url.URL, sendonlyRPCURLs []url.URL, id int32, chainID *big.Int) (*client, error) { parsed, err := url.ParseRequestURI(rpcUrl) if err != nil { @@ -119,7 +183,8 @@ func NewChainClientWithTestNode( } var chainType commonconfig.ChainType - c := NewChainClient(lggr, nodeCfg.SelectionMode(), leaseDuration, noNewHeadsThreshold, primaries, sendonlys, chainID, chainType) + clientErrors := NewTestClientErrors() + c := NewChainClient(lggr, nodeCfg.SelectionMode(), leaseDuration, noNewHeadsThreshold, primaries, sendonlys, chainID, chainType, &clientErrors) t.Cleanup(c.Close) return c, nil } @@ -135,7 +200,7 @@ func NewChainClientWithEmptyNode( lggr := logger.Test(t) var chainType commonconfig.ChainType - c := NewChainClient(lggr, selectionMode, leaseDuration, noNewHeadsThreshold, nil, nil, chainID, chainType) + c := NewChainClient(lggr, selectionMode, leaseDuration, noNewHeadsThreshold, nil, nil, chainID, chainType, nil) t.Cleanup(c.Close) return c } @@ -161,7 +226,8 @@ func NewChainClientWithMockedRpc( n := commonclient.NewNode[*big.Int, *evmtypes.Head, RPCClient]( cfg, clientMocks.ChainConfig{NoNewHeadsThresholdVal: noNewHeadsThreshold}, lggr, *parsed, nil, "eth-primary-node-0", 1, chainID, 1, rpc, "EVM") primaries := []commonclient.Node[*big.Int, *evmtypes.Head, RPCClient]{n} - c := NewChainClient(lggr, selectionMode, leaseDuration, noNewHeadsThreshold, primaries, nil, chainID, chainType) + clientErrors := NewTestClientErrors() + c := NewChainClient(lggr, selectionMode, leaseDuration, noNewHeadsThreshold, primaries, nil, chainID, chainType, &clientErrors) t.Cleanup(c.Close) return c } diff --git a/core/chains/evm/client/mocks/batch_sender.go b/core/chains/evm/client/mocks/batch_sender.go index 3d65749b5bc..f6a3601ceab 100644 --- a/core/chains/evm/client/mocks/batch_sender.go +++ b/core/chains/evm/client/mocks/batch_sender.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. package mocks diff --git a/core/chains/evm/client/mocks/client.go b/core/chains/evm/client/mocks/client.go index b3cdac3a6b6..58d51526626 100644 --- a/core/chains/evm/client/mocks/client.go +++ b/core/chains/evm/client/mocks/client.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. package mocks diff --git a/core/chains/evm/client/mocks/rpc_client.go b/core/chains/evm/client/mocks/rpc_client.go index 9fd9d6a9e79..980a215ccfe 100644 --- a/core/chains/evm/client/mocks/rpc_client.go +++ b/core/chains/evm/client/mocks/rpc_client.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. package mocks diff --git a/core/chains/evm/client/mocks/tx_sender.go b/core/chains/evm/client/mocks/tx_sender.go index a769a786a18..6c44544508b 100644 --- a/core/chains/evm/client/mocks/tx_sender.go +++ b/core/chains/evm/client/mocks/tx_sender.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. package mocks diff --git a/core/chains/evm/client/pool.go b/core/chains/evm/client/pool.go index 891fd8c9226..dcaf2a6b543 100644 --- a/core/chains/evm/client/pool.go +++ b/core/chains/evm/client/pool.go @@ -404,7 +404,7 @@ func (p *Pool) SendTransaction(ctx context.Context, tx *types.Transaction) error err := NewSendError(n.SendTransaction(sendCtx, tx)) p.logger.Debugw("Sendonly node sent transaction", "name", n.String(), "tx", tx, "err", err) - if err == nil || err.IsNonceTooLowError() || err.IsTransactionAlreadyMined() || err.IsTransactionAlreadyInMempool() { + if err == nil || err.IsNonceTooLowError(nil) || err.IsTransactionAlreadyMined(nil) || err.IsTransactionAlreadyInMempool(nil) { // Nonce too low or transaction known errors are expected since // the primary SendTransaction may well have succeeded already return diff --git a/core/chains/evm/client/tx_simulator_test.go b/core/chains/evm/client/tx_simulator_test.go index 4e270d401bf..b31b8541abe 100644 --- a/core/chains/evm/client/tx_simulator_test.go +++ b/core/chains/evm/client/tx_simulator_test.go @@ -78,7 +78,7 @@ func TestSimulateTx_Default(t *testing.T) { Data: []byte("0x00"), } sendErr := client.SimulateTransaction(ctx, ethClient, logger.TestSugared(t), "", msg) - require.Equal(t, true, sendErr.IsOutOfCounters()) + require.Equal(t, true, sendErr.IsOutOfCounters(nil)) }) t.Run("returns without error if simulation returns non-OOC error", func(t *testing.T) { @@ -108,6 +108,6 @@ func TestSimulateTx_Default(t *testing.T) { Data: []byte("0x00"), } sendErr := client.SimulateTransaction(ctx, ethClient, logger.TestSugared(t), "", msg) - require.Equal(t, false, sendErr.IsOutOfCounters()) + require.Equal(t, false, sendErr.IsOutOfCounters(nil)) }) } diff --git a/core/chains/evm/config/chain_scoped.go b/core/chains/evm/config/chain_scoped.go index 2201831feaf..8f94fef09f4 100644 --- a/core/chains/evm/config/chain_scoped.go +++ b/core/chains/evm/config/chain_scoped.go @@ -4,29 +4,21 @@ import ( "math/big" "time" - "go.uber.org/multierr" - - ocr "github.com/smartcontractkit/libocr/offchainreporting" - ocrtypes "github.com/smartcontractkit/libocr/offchainreporting/types" - "github.com/smartcontractkit/chainlink-common/pkg/assets" "github.com/smartcontractkit/chainlink-common/pkg/logger" commonconfig "github.com/smartcontractkit/chainlink/v2/common/config" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/config/toml" - "github.com/smartcontractkit/chainlink/v2/core/config" ) -func NewTOMLChainScopedConfig(appCfg config.AppConfig, tomlConfig *toml.EVMConfig, lggr logger.Logger) *ChainScoped { +func NewTOMLChainScopedConfig(tomlConfig *toml.EVMConfig, lggr logger.Logger) *ChainScoped { return &ChainScoped{ - AppConfig: appCfg, evmConfig: &EVMConfig{C: tomlConfig}, lggr: lggr} } // ChainScoped implements config.ChainScopedConfig with a gencfg.BasicConfig and EVMConfig. type ChainScoped struct { - config.AppConfig lggr logger.Logger evmConfig *EVMConfig @@ -44,24 +36,6 @@ func (c *ChainScoped) BlockEmissionIdleWarningThreshold() time.Duration { return c.EVM().NodeNoNewHeadsThreshold() } -func (c *ChainScoped) Validate() (err error) { - // Most per-chain validation is done on startup, but this combines globals as well. - lc := ocrtypes.LocalConfig{ - BlockchainTimeout: c.OCR().BlockchainTimeout(), - ContractConfigConfirmations: c.EVM().OCR().ContractConfirmations(), - ContractConfigTrackerPollInterval: c.OCR().ContractPollInterval(), - ContractConfigTrackerSubscribeInterval: c.OCR().ContractSubscribeInterval(), - ContractTransmitterTransmitTimeout: c.EVM().OCR().ContractTransmitterTransmitTimeout(), - DatabaseTimeout: c.EVM().OCR().DatabaseTimeout(), - DataSourceTimeout: c.OCR().ObservationTimeout(), - DataSourceGracePeriod: c.EVM().OCR().ObservationGracePeriod(), - } - if ocrerr := ocr.SanityCheckLocalConfig(lc); ocrerr != nil { - err = multierr.Append(err, ocrerr) - } - return -} - type EVMConfig struct { C *toml.EVMConfig } @@ -169,6 +143,10 @@ func (e *EVMConfig) NodePool() NodePool { return &NodePoolConfig{C: e.C.NodePool} } +func (e *EVMConfig) ClientErrors() ClientErrors { + return &clientErrorsConfig{c: e.C.NodePool.Errors} +} + func (e *EVMConfig) NodeNoNewHeadsThreshold() time.Duration { return e.C.NoNewHeadsThreshold.Duration() } diff --git a/core/chains/evm/config/chain_scoped_client_errors.go b/core/chains/evm/config/chain_scoped_client_errors.go new file mode 100644 index 00000000000..53bb04846d2 --- /dev/null +++ b/core/chains/evm/config/chain_scoped_client_errors.go @@ -0,0 +1,50 @@ +package config + +import ( + "github.com/smartcontractkit/chainlink/v2/core/chains/evm/config/toml" +) + +func derefOrDefault(s *string) string { + if s == nil { + return "" + } + + return *s +} + +type clientErrorsConfig struct { + c toml.ClientErrors +} + +func (c *clientErrorsConfig) NonceTooLow() string { return derefOrDefault(c.c.NonceTooLow) } +func (c *clientErrorsConfig) NonceTooHigh() string { return derefOrDefault(c.c.NonceTooHigh) } + +func (c *clientErrorsConfig) ReplacementTransactionUnderpriced() string { + return derefOrDefault(c.c.ReplacementTransactionUnderpriced) +} + +func (c *clientErrorsConfig) LimitReached() string { return derefOrDefault(c.c.LimitReached) } + +func (c *clientErrorsConfig) TransactionAlreadyInMempool() string { + return derefOrDefault(c.c.TransactionAlreadyInMempool) +} + +func (c *clientErrorsConfig) TerminallyUnderpriced() string { + return derefOrDefault(c.c.TerminallyUnderpriced) +} + +func (c *clientErrorsConfig) InsufficientEth() string { return derefOrDefault(c.c.InsufficientEth) } +func (c *clientErrorsConfig) TxFeeExceedsCap() string { return derefOrDefault(c.c.TxFeeExceedsCap) } +func (c *clientErrorsConfig) L2FeeTooLow() string { return derefOrDefault(c.c.L2FeeTooLow) } +func (c *clientErrorsConfig) L2FeeTooHigh() string { return derefOrDefault(c.c.L2FeeTooHigh) } +func (c *clientErrorsConfig) L2Full() string { return derefOrDefault(c.c.L2Full) } + +func (c *clientErrorsConfig) TransactionAlreadyMined() string { + return derefOrDefault(c.c.TransactionAlreadyMined) +} + +func (c *clientErrorsConfig) Fatal() string { return derefOrDefault(c.c.Fatal) } + +func (c *clientErrorsConfig) ServiceUnavailable() string { + return derefOrDefault(c.c.ServiceUnavailable) +} diff --git a/core/chains/evm/config/chain_scoped_node_pool.go b/core/chains/evm/config/chain_scoped_node_pool.go index 6874b412f7f..7f071e5506f 100644 --- a/core/chains/evm/config/chain_scoped_node_pool.go +++ b/core/chains/evm/config/chain_scoped_node_pool.go @@ -37,3 +37,5 @@ func (n *NodePoolConfig) NodeIsSyncingEnabled() bool { func (n *NodePoolConfig) FinalizedBlockPollInterval() time.Duration { return n.C.FinalizedBlockPollInterval.Duration() } + +func (n *NodePoolConfig) Errors() ClientErrors { return &clientErrorsConfig{c: n.C.Errors} } diff --git a/core/chains/evm/config/config.go b/core/chains/evm/config/config.go index b9ff9ea9f8e..34de754de21 100644 --- a/core/chains/evm/config/config.go +++ b/core/chains/evm/config/config.go @@ -11,7 +11,6 @@ import ( commonconfig "github.com/smartcontractkit/chainlink/v2/common/config" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/assets" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/types" - "github.com/smartcontractkit/chainlink/v2/core/config" ) type EVM interface { @@ -77,6 +76,23 @@ type BalanceMonitor interface { Enabled() bool } +type ClientErrors interface { + NonceTooLow() string + NonceTooHigh() string + ReplacementTransactionUnderpriced() string + LimitReached() string + TransactionAlreadyInMempool() string + TerminallyUnderpriced() string + InsufficientEth() string + TxFeeExceedsCap() string + L2FeeTooLow() string + L2FeeTooHigh() string + L2Full() string + TransactionAlreadyMined() string + Fatal() string + ServiceUnavailable() string +} + type Transactions interface { ForwardersEnabled() bool ReaperInterval() time.Duration @@ -142,14 +158,12 @@ type NodePool interface { LeaseDuration() time.Duration NodeIsSyncingEnabled() bool FinalizedBlockPollInterval() time.Duration + Errors() ClientErrors } // TODO BCF-2509 does the chainscopedconfig really need the entire app config? // //go:generate mockery --quiet --name ChainScopedConfig --output ./mocks/ --case=underscore type ChainScopedConfig interface { - config.AppConfig - Validate() error - EVM() EVM } diff --git a/core/chains/evm/config/config_test.go b/core/chains/evm/config/config_test.go index 6fa491051c5..e1c7a9f48cc 100644 --- a/core/chains/evm/config/config_test.go +++ b/core/chains/evm/config/config_test.go @@ -478,4 +478,58 @@ func TestNodePoolConfig(t *testing.T) { require.Equal(t, false, cfg.EVM().NodePool().NodeIsSyncingEnabled()) } +func TestClientErrorsConfig(t *testing.T) { + t.Parallel() + + t.Run("EVM().NodePool().Errors()", func(t *testing.T) { + clientErrorsOverrides := func(c *chainlink.Config, s *chainlink.Secrets) { + id := ubig.New(big.NewInt(rand.Int63())) + c.EVM[0] = &toml.EVMConfig{ + ChainID: id, + Chain: toml.Defaults(id, &toml.Chain{ + NodePool: toml.NodePool{ + Errors: toml.ClientErrors{ + NonceTooLow: ptr[string]("client error nonce too low"), + NonceTooHigh: ptr[string]("client error nonce too high"), + ReplacementTransactionUnderpriced: ptr[string]("client error replacement underpriced"), + LimitReached: ptr[string]("client error limit reached"), + TransactionAlreadyInMempool: ptr[string]("client error transaction already in mempool"), + TerminallyUnderpriced: ptr[string]("client error terminally underpriced"), + InsufficientEth: ptr[string]("client error insufficient eth"), + TxFeeExceedsCap: ptr[string]("client error tx fee exceeds cap"), + L2FeeTooLow: ptr[string]("client error l2 fee too low"), + L2FeeTooHigh: ptr[string]("client error l2 fee too high"), + L2Full: ptr[string]("client error l2 full"), + TransactionAlreadyMined: ptr[string]("client error transaction already mined"), + Fatal: ptr[string]("client error fatal"), + ServiceUnavailable: ptr[string]("client error service unavailable"), + }, + }, + }), + } + } + + gcfg := configtest.NewGeneralConfig(t, func(c *chainlink.Config, s *chainlink.Secrets) { + clientErrorsOverrides(c, s) + }) + cfg := evmtest.NewChainScopedConfig(t, gcfg) + + errors := cfg.EVM().NodePool().Errors() + assert.Equal(t, "client error nonce too low", errors.NonceTooLow()) + assert.Equal(t, "client error nonce too high", errors.NonceTooHigh()) + assert.Equal(t, "client error replacement underpriced", errors.ReplacementTransactionUnderpriced()) + assert.Equal(t, "client error limit reached", errors.LimitReached()) + assert.Equal(t, "client error transaction already in mempool", errors.TransactionAlreadyInMempool()) + assert.Equal(t, "client error terminally underpriced", errors.TerminallyUnderpriced()) + assert.Equal(t, "client error insufficient eth", errors.InsufficientEth()) + assert.Equal(t, "client error tx fee exceeds cap", errors.TxFeeExceedsCap()) + assert.Equal(t, "client error l2 fee too low", errors.L2FeeTooLow()) + assert.Equal(t, "client error l2 fee too high", errors.L2FeeTooHigh()) + assert.Equal(t, "client error l2 full", errors.L2Full()) + assert.Equal(t, "client error transaction already mined", errors.TransactionAlreadyMined()) + assert.Equal(t, "client error fatal", errors.Fatal()) + assert.Equal(t, "client error service unavailable", errors.ServiceUnavailable()) + }) +} + func ptr[T any](t T) *T { return &t } diff --git a/core/chains/evm/config/mocks/chain_scoped_config.go b/core/chains/evm/config/mocks/chain_scoped_config.go index 29b6d6f3f3e..7f5f9666ae6 100644 --- a/core/chains/evm/config/mocks/chain_scoped_config.go +++ b/core/chains/evm/config/mocks/chain_scoped_config.go @@ -1,18 +1,10 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. package mocks import ( config "github.com/smartcontractkit/chainlink/v2/core/chains/evm/config" - coreconfig "github.com/smartcontractkit/chainlink/v2/core/config" - mock "github.com/stretchr/testify/mock" - - time "time" - - uuid "github.com/google/uuid" - - zapcore "go.uber.org/zap/zapcore" ) // ChainScopedConfig is an autogenerated mock type for the ChainScopedConfig type @@ -20,124 +12,6 @@ type ChainScopedConfig struct { mock.Mock } -// AppID provides a mock function with given fields: -func (_m *ChainScopedConfig) AppID() uuid.UUID { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for AppID") - } - - var r0 uuid.UUID - if rf, ok := ret.Get(0).(func() uuid.UUID); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(uuid.UUID) - } - } - - return r0 -} - -// AuditLogger provides a mock function with given fields: -func (_m *ChainScopedConfig) AuditLogger() coreconfig.AuditLogger { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for AuditLogger") - } - - var r0 coreconfig.AuditLogger - if rf, ok := ret.Get(0).(func() coreconfig.AuditLogger); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(coreconfig.AuditLogger) - } - } - - return r0 -} - -// AutoPprof provides a mock function with given fields: -func (_m *ChainScopedConfig) AutoPprof() coreconfig.AutoPprof { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for AutoPprof") - } - - var r0 coreconfig.AutoPprof - if rf, ok := ret.Get(0).(func() coreconfig.AutoPprof); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(coreconfig.AutoPprof) - } - } - - return r0 -} - -// Capabilities provides a mock function with given fields: -func (_m *ChainScopedConfig) Capabilities() coreconfig.Capabilities { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Capabilities") - } - - var r0 coreconfig.Capabilities - if rf, ok := ret.Get(0).(func() coreconfig.Capabilities); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(coreconfig.Capabilities) - } - } - - return r0 -} - -// CosmosEnabled provides a mock function with given fields: -func (_m *ChainScopedConfig) CosmosEnabled() bool { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for CosmosEnabled") - } - - var r0 bool - if rf, ok := ret.Get(0).(func() bool); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(bool) - } - - return r0 -} - -// Database provides a mock function with given fields: -func (_m *ChainScopedConfig) Database() coreconfig.Database { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Database") - } - - var r0 coreconfig.Database - if rf, ok := ret.Get(0).(func() coreconfig.Database); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(coreconfig.Database) - } - } - - return r0 -} - // EVM provides a mock function with given fields: func (_m *ChainScopedConfig) EVM() config.EVM { ret := _m.Called() @@ -158,561 +32,6 @@ func (_m *ChainScopedConfig) EVM() config.EVM { return r0 } -// EVMEnabled provides a mock function with given fields: -func (_m *ChainScopedConfig) EVMEnabled() bool { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for EVMEnabled") - } - - var r0 bool - if rf, ok := ret.Get(0).(func() bool); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(bool) - } - - return r0 -} - -// EVMRPCEnabled provides a mock function with given fields: -func (_m *ChainScopedConfig) EVMRPCEnabled() bool { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for EVMRPCEnabled") - } - - var r0 bool - if rf, ok := ret.Get(0).(func() bool); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(bool) - } - - return r0 -} - -// Feature provides a mock function with given fields: -func (_m *ChainScopedConfig) Feature() coreconfig.Feature { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Feature") - } - - var r0 coreconfig.Feature - if rf, ok := ret.Get(0).(func() coreconfig.Feature); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(coreconfig.Feature) - } - } - - return r0 -} - -// FluxMonitor provides a mock function with given fields: -func (_m *ChainScopedConfig) FluxMonitor() coreconfig.FluxMonitor { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for FluxMonitor") - } - - var r0 coreconfig.FluxMonitor - if rf, ok := ret.Get(0).(func() coreconfig.FluxMonitor); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(coreconfig.FluxMonitor) - } - } - - return r0 -} - -// Insecure provides a mock function with given fields: -func (_m *ChainScopedConfig) Insecure() coreconfig.Insecure { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Insecure") - } - - var r0 coreconfig.Insecure - if rf, ok := ret.Get(0).(func() coreconfig.Insecure); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(coreconfig.Insecure) - } - } - - return r0 -} - -// InsecureFastScrypt provides a mock function with given fields: -func (_m *ChainScopedConfig) InsecureFastScrypt() bool { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for InsecureFastScrypt") - } - - var r0 bool - if rf, ok := ret.Get(0).(func() bool); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(bool) - } - - return r0 -} - -// JobPipeline provides a mock function with given fields: -func (_m *ChainScopedConfig) JobPipeline() coreconfig.JobPipeline { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for JobPipeline") - } - - var r0 coreconfig.JobPipeline - if rf, ok := ret.Get(0).(func() coreconfig.JobPipeline); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(coreconfig.JobPipeline) - } - } - - return r0 -} - -// Keeper provides a mock function with given fields: -func (_m *ChainScopedConfig) Keeper() coreconfig.Keeper { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Keeper") - } - - var r0 coreconfig.Keeper - if rf, ok := ret.Get(0).(func() coreconfig.Keeper); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(coreconfig.Keeper) - } - } - - return r0 -} - -// Log provides a mock function with given fields: -func (_m *ChainScopedConfig) Log() coreconfig.Log { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Log") - } - - var r0 coreconfig.Log - if rf, ok := ret.Get(0).(func() coreconfig.Log); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(coreconfig.Log) - } - } - - return r0 -} - -// LogConfiguration provides a mock function with given fields: log, warn -func (_m *ChainScopedConfig) LogConfiguration(log coreconfig.LogfFn, warn coreconfig.LogfFn) { - _m.Called(log, warn) -} - -// Mercury provides a mock function with given fields: -func (_m *ChainScopedConfig) Mercury() coreconfig.Mercury { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Mercury") - } - - var r0 coreconfig.Mercury - if rf, ok := ret.Get(0).(func() coreconfig.Mercury); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(coreconfig.Mercury) - } - } - - return r0 -} - -// OCR provides a mock function with given fields: -func (_m *ChainScopedConfig) OCR() coreconfig.OCR { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for OCR") - } - - var r0 coreconfig.OCR - if rf, ok := ret.Get(0).(func() coreconfig.OCR); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(coreconfig.OCR) - } - } - - return r0 -} - -// OCR2 provides a mock function with given fields: -func (_m *ChainScopedConfig) OCR2() coreconfig.OCR2 { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for OCR2") - } - - var r0 coreconfig.OCR2 - if rf, ok := ret.Get(0).(func() coreconfig.OCR2); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(coreconfig.OCR2) - } - } - - return r0 -} - -// P2P provides a mock function with given fields: -func (_m *ChainScopedConfig) P2P() coreconfig.P2P { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for P2P") - } - - var r0 coreconfig.P2P - if rf, ok := ret.Get(0).(func() coreconfig.P2P); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(coreconfig.P2P) - } - } - - return r0 -} - -// Password provides a mock function with given fields: -func (_m *ChainScopedConfig) Password() coreconfig.Password { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Password") - } - - var r0 coreconfig.Password - if rf, ok := ret.Get(0).(func() coreconfig.Password); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(coreconfig.Password) - } - } - - return r0 -} - -// Prometheus provides a mock function with given fields: -func (_m *ChainScopedConfig) Prometheus() coreconfig.Prometheus { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Prometheus") - } - - var r0 coreconfig.Prometheus - if rf, ok := ret.Get(0).(func() coreconfig.Prometheus); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(coreconfig.Prometheus) - } - } - - return r0 -} - -// Pyroscope provides a mock function with given fields: -func (_m *ChainScopedConfig) Pyroscope() coreconfig.Pyroscope { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Pyroscope") - } - - var r0 coreconfig.Pyroscope - if rf, ok := ret.Get(0).(func() coreconfig.Pyroscope); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(coreconfig.Pyroscope) - } - } - - return r0 -} - -// RootDir provides a mock function with given fields: -func (_m *ChainScopedConfig) RootDir() string { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for RootDir") - } - - var r0 string - if rf, ok := ret.Get(0).(func() string); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(string) - } - - return r0 -} - -// Sentry provides a mock function with given fields: -func (_m *ChainScopedConfig) Sentry() coreconfig.Sentry { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Sentry") - } - - var r0 coreconfig.Sentry - if rf, ok := ret.Get(0).(func() coreconfig.Sentry); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(coreconfig.Sentry) - } - } - - return r0 -} - -// SetLogLevel provides a mock function with given fields: lvl -func (_m *ChainScopedConfig) SetLogLevel(lvl zapcore.Level) error { - ret := _m.Called(lvl) - - if len(ret) == 0 { - panic("no return value specified for SetLogLevel") - } - - var r0 error - if rf, ok := ret.Get(0).(func(zapcore.Level) error); ok { - r0 = rf(lvl) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// SetLogSQL provides a mock function with given fields: logSQL -func (_m *ChainScopedConfig) SetLogSQL(logSQL bool) { - _m.Called(logSQL) -} - -// SetPasswords provides a mock function with given fields: keystore, vrf -func (_m *ChainScopedConfig) SetPasswords(keystore *string, vrf *string) { - _m.Called(keystore, vrf) -} - -// ShutdownGracePeriod provides a mock function with given fields: -func (_m *ChainScopedConfig) ShutdownGracePeriod() time.Duration { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for ShutdownGracePeriod") - } - - var r0 time.Duration - if rf, ok := ret.Get(0).(func() time.Duration); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(time.Duration) - } - - return r0 -} - -// SolanaEnabled provides a mock function with given fields: -func (_m *ChainScopedConfig) SolanaEnabled() bool { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for SolanaEnabled") - } - - var r0 bool - if rf, ok := ret.Get(0).(func() bool); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(bool) - } - - return r0 -} - -// StarkNetEnabled provides a mock function with given fields: -func (_m *ChainScopedConfig) StarkNetEnabled() bool { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for StarkNetEnabled") - } - - var r0 bool - if rf, ok := ret.Get(0).(func() bool); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(bool) - } - - return r0 -} - -// TelemetryIngress provides a mock function with given fields: -func (_m *ChainScopedConfig) TelemetryIngress() coreconfig.TelemetryIngress { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for TelemetryIngress") - } - - var r0 coreconfig.TelemetryIngress - if rf, ok := ret.Get(0).(func() coreconfig.TelemetryIngress); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(coreconfig.TelemetryIngress) - } - } - - return r0 -} - -// Threshold provides a mock function with given fields: -func (_m *ChainScopedConfig) Threshold() coreconfig.Threshold { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Threshold") - } - - var r0 coreconfig.Threshold - if rf, ok := ret.Get(0).(func() coreconfig.Threshold); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(coreconfig.Threshold) - } - } - - return r0 -} - -// Tracing provides a mock function with given fields: -func (_m *ChainScopedConfig) Tracing() coreconfig.Tracing { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Tracing") - } - - var r0 coreconfig.Tracing - if rf, ok := ret.Get(0).(func() coreconfig.Tracing); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(coreconfig.Tracing) - } - } - - return r0 -} - -// Validate provides a mock function with given fields: -func (_m *ChainScopedConfig) Validate() error { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Validate") - } - - var r0 error - if rf, ok := ret.Get(0).(func() error); ok { - r0 = rf() - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// ValidateDB provides a mock function with given fields: -func (_m *ChainScopedConfig) ValidateDB() error { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for ValidateDB") - } - - var r0 error - if rf, ok := ret.Get(0).(func() error); ok { - r0 = rf() - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// WebServer provides a mock function with given fields: -func (_m *ChainScopedConfig) WebServer() coreconfig.WebServer { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for WebServer") - } - - var r0 coreconfig.WebServer - if rf, ok := ret.Get(0).(func() coreconfig.WebServer); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(coreconfig.WebServer) - } - } - - return r0 -} - // NewChainScopedConfig creates a new instance of ChainScopedConfig. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. // The first argument is typically a *testing.T value. func NewChainScopedConfig(t interface { diff --git a/core/chains/evm/config/mocks/gas_estimator.go b/core/chains/evm/config/mocks/gas_estimator.go index b1eb2b49b5c..549f16fe558 100644 --- a/core/chains/evm/config/mocks/gas_estimator.go +++ b/core/chains/evm/config/mocks/gas_estimator.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. package mocks diff --git a/core/chains/evm/config/toml/config.go b/core/chains/evm/config/toml/config.go index 0f647034162..1b1baf41094 100644 --- a/core/chains/evm/config/toml/config.go +++ b/core/chains/evm/config/toml/config.go @@ -702,6 +702,69 @@ func (t *HeadTracker) setFrom(f *HeadTracker) { } } +type ClientErrors struct { + NonceTooLow *string `toml:",omitempty"` + NonceTooHigh *string `toml:",omitempty"` + ReplacementTransactionUnderpriced *string `toml:",omitempty"` + LimitReached *string `toml:",omitempty"` + TransactionAlreadyInMempool *string `toml:",omitempty"` + TerminallyUnderpriced *string `toml:",omitempty"` + InsufficientEth *string `toml:",omitempty"` + TxFeeExceedsCap *string `toml:",omitempty"` + L2FeeTooLow *string `toml:",omitempty"` + L2FeeTooHigh *string `toml:",omitempty"` + L2Full *string `toml:",omitempty"` + TransactionAlreadyMined *string `toml:",omitempty"` + Fatal *string `toml:",omitempty"` + ServiceUnavailable *string `toml:",omitempty"` +} + +func (r *ClientErrors) setFrom(f *ClientErrors) bool { + if v := f.NonceTooLow; v != nil { + r.NonceTooLow = v + } + if v := f.NonceTooHigh; v != nil { + r.NonceTooHigh = v + } + if v := f.ReplacementTransactionUnderpriced; v != nil { + r.ReplacementTransactionUnderpriced = v + } + if v := f.LimitReached; v != nil { + r.LimitReached = v + } + if v := f.TransactionAlreadyInMempool; v != nil { + r.TransactionAlreadyInMempool = v + } + if v := f.TerminallyUnderpriced; v != nil { + r.TerminallyUnderpriced = v + } + if v := f.InsufficientEth; v != nil { + r.InsufficientEth = v + } + if v := f.TxFeeExceedsCap; v != nil { + r.TxFeeExceedsCap = v + } + if v := f.L2FeeTooLow; v != nil { + r.L2FeeTooLow = v + } + if v := f.L2FeeTooHigh; v != nil { + r.L2FeeTooHigh = v + } + if v := f.L2Full; v != nil { + r.L2Full = v + } + if v := f.TransactionAlreadyMined; v != nil { + r.TransactionAlreadyMined = v + } + if v := f.Fatal; v != nil { + r.Fatal = v + } + if v := f.ServiceUnavailable; v != nil { + r.ServiceUnavailable = v + } + return true +} + type NodePool struct { PollFailureThreshold *uint32 PollInterval *commonconfig.Duration @@ -710,6 +773,7 @@ type NodePool struct { LeaseDuration *commonconfig.Duration NodeIsSyncingEnabled *bool FinalizedBlockPollInterval *commonconfig.Duration + Errors ClientErrors `toml:",omitempty"` } func (p *NodePool) setFrom(f *NodePool) { @@ -734,6 +798,7 @@ func (p *NodePool) setFrom(f *NodePool) { if v := f.FinalizedBlockPollInterval; v != nil { p.FinalizedBlockPollInterval = v } + p.Errors.setFrom(&f.Errors) } type OCR struct { diff --git a/core/chains/evm/forwarders/mocks/orm.go b/core/chains/evm/forwarders/mocks/orm.go index 795c74e27e9..04e252fa7d4 100644 --- a/core/chains/evm/forwarders/mocks/orm.go +++ b/core/chains/evm/forwarders/mocks/orm.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. package mocks diff --git a/core/chains/evm/gas/mocks/config.go b/core/chains/evm/gas/mocks/config.go index 4a7b6f4d7eb..a3b6b8ee491 100644 --- a/core/chains/evm/gas/mocks/config.go +++ b/core/chains/evm/gas/mocks/config.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. package mocks diff --git a/core/chains/evm/gas/mocks/eth_client.go b/core/chains/evm/gas/mocks/eth_client.go new file mode 100644 index 00000000000..a8cc5afa8d9 --- /dev/null +++ b/core/chains/evm/gas/mocks/eth_client.go @@ -0,0 +1,61 @@ +// Code generated by mockery v2.42.2. DO NOT EDIT. + +package mocks + +import ( + context "context" + big "math/big" + + ethereum "github.com/ethereum/go-ethereum" + + mock "github.com/stretchr/testify/mock" +) + +// ETHClient is an autogenerated mock type for the ethClient type +type ETHClient struct { + mock.Mock +} + +// CallContract provides a mock function with given fields: ctx, msg, blockNumber +func (_m *ETHClient) CallContract(ctx context.Context, msg ethereum.CallMsg, blockNumber *big.Int) ([]byte, error) { + ret := _m.Called(ctx, msg, blockNumber) + + if len(ret) == 0 { + panic("no return value specified for CallContract") + } + + var r0 []byte + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, ethereum.CallMsg, *big.Int) ([]byte, error)); ok { + return rf(ctx, msg, blockNumber) + } + if rf, ok := ret.Get(0).(func(context.Context, ethereum.CallMsg, *big.Int) []byte); ok { + r0 = rf(ctx, msg, blockNumber) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).([]byte) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, ethereum.CallMsg, *big.Int) error); ok { + r1 = rf(ctx, msg, blockNumber) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// NewETHClient creates a new instance of ETHClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewETHClient(t interface { + mock.TestingT + Cleanup(func()) +}) *ETHClient { + mock := ÐClient{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/core/chains/evm/gas/mocks/evm_estimator.go b/core/chains/evm/gas/mocks/evm_estimator.go index 600e43a7c69..1213a71742d 100644 --- a/core/chains/evm/gas/mocks/evm_estimator.go +++ b/core/chains/evm/gas/mocks/evm_estimator.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. package mocks diff --git a/core/chains/evm/gas/mocks/evm_fee_estimator.go b/core/chains/evm/gas/mocks/evm_fee_estimator.go index 7ebde8bc0fd..5179a2560d0 100644 --- a/core/chains/evm/gas/mocks/evm_fee_estimator.go +++ b/core/chains/evm/gas/mocks/evm_fee_estimator.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. package mocks diff --git a/core/chains/evm/gas/mocks/fee_estimator_client.go b/core/chains/evm/gas/mocks/fee_estimator_client.go index 50eb17d2dac..d81120e2ed4 100644 --- a/core/chains/evm/gas/mocks/fee_estimator_client.go +++ b/core/chains/evm/gas/mocks/fee_estimator_client.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. package mocks diff --git a/core/chains/evm/gas/mocks/rpc_client.go b/core/chains/evm/gas/mocks/rpc_client.go new file mode 100644 index 00000000000..826fd66c463 --- /dev/null +++ b/core/chains/evm/gas/mocks/rpc_client.go @@ -0,0 +1,49 @@ +// Code generated by mockery v2.42.2. DO NOT EDIT. + +package mocks + +import ( + context "context" + + mock "github.com/stretchr/testify/mock" +) + +// RPCClient is an autogenerated mock type for the rpcClient type +type RPCClient struct { + mock.Mock +} + +// CallContext provides a mock function with given fields: ctx, result, method, args +func (_m *RPCClient) CallContext(ctx context.Context, result interface{}, method string, args ...interface{}) error { + var _ca []interface{} + _ca = append(_ca, ctx, result, method) + _ca = append(_ca, args...) + ret := _m.Called(_ca...) + + if len(ret) == 0 { + panic("no return value specified for CallContext") + } + + var r0 error + if rf, ok := ret.Get(0).(func(context.Context, interface{}, string, ...interface{}) error); ok { + r0 = rf(ctx, result, method, args...) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// NewRPCClient creates a new instance of RPCClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewRPCClient(t interface { + mock.TestingT + Cleanup(func()) +}) *RPCClient { + mock := &RPCClient{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/core/chains/evm/gas/rollups/mocks/da_price_reader.go b/core/chains/evm/gas/rollups/mocks/da_price_reader.go new file mode 100644 index 00000000000..4157eb1494c --- /dev/null +++ b/core/chains/evm/gas/rollups/mocks/da_price_reader.go @@ -0,0 +1,59 @@ +// Code generated by mockery v2.42.2. DO NOT EDIT. + +package mocks + +import ( + context "context" + big "math/big" + + mock "github.com/stretchr/testify/mock" +) + +// DAPriceReader is an autogenerated mock type for the daPriceReader type +type DAPriceReader struct { + mock.Mock +} + +// GetDAGasPrice provides a mock function with given fields: ctx +func (_m *DAPriceReader) GetDAGasPrice(ctx context.Context) (*big.Int, error) { + ret := _m.Called(ctx) + + if len(ret) == 0 { + panic("no return value specified for GetDAGasPrice") + } + + var r0 *big.Int + var r1 error + if rf, ok := ret.Get(0).(func(context.Context) (*big.Int, error)); ok { + return rf(ctx) + } + if rf, ok := ret.Get(0).(func(context.Context) *big.Int); ok { + r0 = rf(ctx) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*big.Int) + } + } + + if rf, ok := ret.Get(1).(func(context.Context) error); ok { + r1 = rf(ctx) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// NewDAPriceReader creates a new instance of DAPriceReader. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +// The first argument is typically a *testing.T value. +func NewDAPriceReader(t interface { + mock.TestingT + Cleanup(func()) +}) *DAPriceReader { + mock := &DAPriceReader{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/core/chains/evm/gas/rollups/mocks/l1_oracle.go b/core/chains/evm/gas/rollups/mocks/l1_oracle.go index 101090c0594..79d4d64ecdf 100644 --- a/core/chains/evm/gas/rollups/mocks/l1_oracle.go +++ b/core/chains/evm/gas/rollups/mocks/l1_oracle.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. package mocks diff --git a/core/chains/evm/gas/rollups/mocks/l1_oracle_client.go b/core/chains/evm/gas/rollups/mocks/l1_oracle_client.go index 3995a09513b..146f2cd6809 100644 --- a/core/chains/evm/gas/rollups/mocks/l1_oracle_client.go +++ b/core/chains/evm/gas/rollups/mocks/l1_oracle_client.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. package mocks diff --git a/core/chains/evm/headtracker/mocks/config.go b/core/chains/evm/headtracker/mocks/config.go index 6cc3900ba42..fea7d4629b5 100644 --- a/core/chains/evm/headtracker/mocks/config.go +++ b/core/chains/evm/headtracker/mocks/config.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. package mocks diff --git a/core/chains/evm/keystore/mocks/eth.go b/core/chains/evm/keystore/mocks/eth.go index 48bd738fdbe..9c11551e2c2 100644 --- a/core/chains/evm/keystore/mocks/eth.go +++ b/core/chains/evm/keystore/mocks/eth.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. package mocks diff --git a/core/chains/evm/log/helpers_test.go b/core/chains/evm/log/helpers_test.go index 8919b848aca..0d725b8594b 100644 --- a/core/chains/evm/log/helpers_test.go +++ b/core/chains/evm/log/helpers_test.go @@ -110,7 +110,7 @@ func newBroadcasterHelperWithEthClient(t *testing.T, ethClient evmclient.Client, m[r.Chain().ID().String()] = r.Chain() } legacyChains := legacyevm.NewLegacyChains(m, cc.AppConfig().EVMConfigs()) - pipelineHelper := cltest.NewJobPipelineV2(t, config.WebServer(), config.JobPipeline(), config.Database(), legacyChains, db, kst, nil, nil) + pipelineHelper := cltest.NewJobPipelineV2(t, globalConfig.WebServer(), globalConfig.JobPipeline(), globalConfig.Database(), legacyChains, db, kst, nil, nil) return &broadcasterHelper{ t: t, diff --git a/core/chains/evm/log/mocks/abigen_contract.go b/core/chains/evm/log/mocks/abigen_contract.go index fde8949e4fe..3ab5e350505 100644 --- a/core/chains/evm/log/mocks/abigen_contract.go +++ b/core/chains/evm/log/mocks/abigen_contract.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. package mocks diff --git a/core/chains/evm/log/mocks/broadcast.go b/core/chains/evm/log/mocks/broadcast.go index 6d9a83716d5..1f1817474ec 100644 --- a/core/chains/evm/log/mocks/broadcast.go +++ b/core/chains/evm/log/mocks/broadcast.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. package mocks diff --git a/core/chains/evm/log/mocks/broadcaster.go b/core/chains/evm/log/mocks/broadcaster.go index e5164b56611..221456c508b 100644 --- a/core/chains/evm/log/mocks/broadcaster.go +++ b/core/chains/evm/log/mocks/broadcaster.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. package mocks diff --git a/core/chains/evm/logpoller/mocks/log_poller.go b/core/chains/evm/logpoller/mocks/log_poller.go index a8eabaff115..548e9ca3b90 100644 --- a/core/chains/evm/logpoller/mocks/log_poller.go +++ b/core/chains/evm/logpoller/mocks/log_poller.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. package mocks diff --git a/core/chains/evm/mocks/balance_monitor.go b/core/chains/evm/mocks/balance_monitor.go index f03fd8829cc..7c55cd78ebd 100644 --- a/core/chains/evm/mocks/balance_monitor.go +++ b/core/chains/evm/mocks/balance_monitor.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. package mocks diff --git a/core/chains/evm/mocks/node.go b/core/chains/evm/mocks/node.go index 25944cfcf42..6a939d5e844 100644 --- a/core/chains/evm/mocks/node.go +++ b/core/chains/evm/mocks/node.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. package mocks diff --git a/core/chains/evm/mocks/send_only_node.go b/core/chains/evm/mocks/send_only_node.go index 8ec3270281d..e0ab9775be9 100644 --- a/core/chains/evm/mocks/send_only_node.go +++ b/core/chains/evm/mocks/send_only_node.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. package mocks diff --git a/core/chains/evm/txmgr/broadcaster_test.go b/core/chains/evm/txmgr/broadcaster_test.go index 14968126bf9..4e19a2ec7da 100644 --- a/core/chains/evm/txmgr/broadcaster_test.go +++ b/core/chains/evm/txmgr/broadcaster_test.go @@ -54,6 +54,7 @@ func NewTestEthBroadcaster( txStore txmgr.TestEvmTxStore, ethClient client.Client, keyStore keystore.Eth, + gconfig chainlink.GeneralConfig, config evmconfig.ChainScopedConfig, checkerFactory txmgr.TransmitCheckerFactory, nonceAutoSync bool, @@ -68,7 +69,7 @@ func NewTestEthBroadcaster( return gas.NewFixedPriceEstimator(config.EVM().GasEstimator(), nil, ge.BlockHistory(), lggr, nil) }, ge.EIP1559DynamicFees(), ge) txBuilder := txmgr.NewEvmTxAttemptBuilder(*ethClient.ConfiguredChainID(), ge, keyStore, estimator) - ethBroadcaster := txmgrcommon.NewBroadcaster(txStore, txmgr.NewEvmTxmClient(ethClient), txmgr.NewEvmTxmConfig(config.EVM()), txmgr.NewEvmTxmFeeConfig(config.EVM().GasEstimator()), config.EVM().Transactions(), config.Database().Listener(), keyStore, txBuilder, nonceTracker, lggr, checkerFactory, nonceAutoSync) + ethBroadcaster := txmgrcommon.NewBroadcaster(txStore, txmgr.NewEvmTxmClient(ethClient, nil), txmgr.NewEvmTxmConfig(config.EVM()), txmgr.NewEvmTxmFeeConfig(config.EVM().GasEstimator()), config.EVM().Transactions(), gconfig.Database().Listener(), keyStore, txBuilder, nonceTracker, lggr, checkerFactory, nonceAutoSync) // Mark instance as test ethBroadcaster.XXXTestDisableUnstartedTxAutoProcessing() @@ -85,7 +86,7 @@ func TestEthBroadcaster_Lifecycle(t *testing.T) { cltest.MustInsertRandomKeyReturningState(t, ethKeyStore) estimator := gasmocks.NewEvmFeeEstimator(t) txBuilder := txmgr.NewEvmTxAttemptBuilder(*ethClient.ConfiguredChainID(), evmcfg.EVM().GasEstimator(), ethKeyStore, estimator) - txmClient := txmgr.NewEvmTxmClient(ethClient) + txmClient := txmgr.NewEvmTxmClient(ethClient, nil) ethClient.On("PendingNonceAt", mock.Anything, mock.Anything).Return(uint64(0), nil) eb := txmgr.NewEvmBroadcaster( txStore, @@ -93,7 +94,7 @@ func TestEthBroadcaster_Lifecycle(t *testing.T) { txmgr.NewEvmTxmConfig(evmcfg.EVM()), txmgr.NewEvmTxmFeeConfig(evmcfg.EVM().GasEstimator()), evmcfg.EVM().Transactions(), - evmcfg.Database().Listener(), + cfg.Database().Listener(), ethKeyStore, txBuilder, logger.Test(t), @@ -144,14 +145,14 @@ func TestEthBroadcaster_LoadNextSequenceMapFailure_StartupSuccess(t *testing.T) estimator := gasmocks.NewEvmFeeEstimator(t) txBuilder := txmgr.NewEvmTxAttemptBuilder(*ethClient.ConfiguredChainID(), evmcfg.EVM().GasEstimator(), ethKeyStore, estimator) ethClient.On("PendingNonceAt", mock.Anything, mock.Anything).Return(uint64(0), errors.New("Getting on-chain nonce failed")) - txmClient := txmgr.NewEvmTxmClient(ethClient) + txmClient := txmgr.NewEvmTxmClient(ethClient, nil) eb := txmgr.NewEvmBroadcaster( txStore, txmClient, txmgr.NewEvmTxmConfig(evmcfg.EVM()), txmgr.NewEvmTxmFeeConfig(evmcfg.EVM().GasEstimator()), evmcfg.EVM().Transactions(), - evmcfg.Database().Listener(), + cfg.Database().Listener(), ethKeyStore, txBuilder, logger.Test(t), @@ -181,9 +182,8 @@ func TestEthBroadcaster_ProcessUnstartedEthTxs_Success(t *testing.T) { ethClient.On("PendingNonceAt", mock.Anything, fromAddress).Return(uint64(0), nil).Once() ethClient.On("PendingNonceAt", mock.Anything, otherAddress).Return(uint64(0), nil).Once() lggr := logger.Test(t) - nonceTracker := txmgr.NewNonceTracker(lggr, txStore, txmgr.NewEvmTxmClient(ethClient)) - eb := NewTestEthBroadcaster(t, txStore, ethClient, ethKeyStore, evmcfg, checkerFactory, false, nonceTracker) - + nonceTracker := txmgr.NewNonceTracker(lggr, txStore, txmgr.NewEvmTxmClient(ethClient, nil)) + eb := NewTestEthBroadcaster(t, txStore, ethClient, ethKeyStore, cfg, evmcfg, checkerFactory, false, nonceTracker) toAddress := gethCommon.HexToAddress("0x6C03DDA95a2AEd917EeCc6eddD4b9D16E6380411") timeNow := time.Now() @@ -382,8 +382,8 @@ func TestEthBroadcaster_ProcessUnstartedEthTxs_Success(t *testing.T) { }) evmcfg = evmtest.NewChainScopedConfig(t, cfg) ethClient.On("PendingNonceAt", mock.Anything, otherAddress).Return(uint64(1), nil).Once() - nonceTracker = txmgr.NewNonceTracker(lggr, txStore, txmgr.NewEvmTxmClient(ethClient)) - eb = NewTestEthBroadcaster(t, txStore, ethClient, ethKeyStore, evmcfg, checkerFactory, false, nonceTracker) + nonceTracker = txmgr.NewNonceTracker(lggr, txStore, txmgr.NewEvmTxmClient(ethClient, nil)) + eb = NewTestEthBroadcaster(t, txStore, ethClient, ethKeyStore, cfg, evmcfg, checkerFactory, false, nonceTracker) t.Run("sends transactions with type 0x2 in EIP-1559 mode", func(t *testing.T) { ethClient.On("SendTransactionReturnCode", mock.Anything, mock.MatchedBy(func(tx *gethTypes.Transaction) bool { @@ -532,8 +532,8 @@ func TestEthBroadcaster_TransmitChecking(t *testing.T) { evmcfg := evmtest.NewChainScopedConfig(t, cfg) checkerFactory := &testCheckerFactory{} ethClient.On("PendingNonceAt", mock.Anything, fromAddress).Return(uint64(0), nil).Once() - nonceTracker := txmgr.NewNonceTracker(logger.Test(t), txStore, txmgr.NewEvmTxmClient(ethClient)) - eb := NewTestEthBroadcaster(t, txStore, ethClient, ethKeyStore, evmcfg, checkerFactory, false, nonceTracker) + nonceTracker := txmgr.NewNonceTracker(logger.Test(t), txStore, txmgr.NewEvmTxmClient(ethClient, nil)) + eb := NewTestEthBroadcaster(t, txStore, ethClient, ethKeyStore, cfg, evmcfg, checkerFactory, false, nonceTracker) checker := txmgr.TransmitCheckerSpec{ CheckerType: txmgr.TransmitCheckerTypeSimulate, @@ -624,7 +624,7 @@ func TestEthBroadcaster_ProcessUnstartedEthTxs_OptimisticLockingOnEthTx(t *testi <-chBlock }).Once() ethClient.On("PendingNonceAt", mock.Anything, fromAddress).Return(uint64(0), nil) - txmClient := txmgr.NewEvmTxmClient(ethClient) + txmClient := txmgr.NewEvmTxmClient(ethClient, nil) eb := txmgr.NewEvmBroadcaster( txStore, txmClient, @@ -681,8 +681,8 @@ func TestEthBroadcaster_ProcessUnstartedEthTxs_Success_WithMultiplier(t *testing ethClient := evmtest.NewEthClientMockWithDefaultChain(t) ethClient.On("PendingNonceAt", mock.Anything, fromAddress).Return(uint64(0), nil).Once() - nonceTracker := txmgr.NewNonceTracker(logger.Test(t), txStore, txmgr.NewEvmTxmClient(ethClient)) - eb := NewTestEthBroadcaster(t, txStore, ethClient, ethKeyStore, evmcfg, &testCheckerFactory{}, false, nonceTracker) + nonceTracker := txmgr.NewNonceTracker(logger.Test(t), txStore, txmgr.NewEvmTxmClient(ethClient, nil)) + eb := NewTestEthBroadcaster(t, txStore, ethClient, ethKeyStore, cfg, evmcfg, &testCheckerFactory{}, false, nonceTracker) ethClient.On("SendTransactionReturnCode", mock.Anything, mock.MatchedBy(func(tx *gethTypes.Transaction) bool { assert.Equal(t, int(1600), int(tx.Gas())) @@ -763,8 +763,8 @@ func TestEthBroadcaster_ProcessUnstartedEthTxs_ResumingFromCrash(t *testing.T) { ethClient := evmtest.NewEthClientMockWithDefaultChain(t) ethClient.On("PendingNonceAt", mock.Anything, fromAddress).Return(uint64(0), nil).Once() - nonceTracker := txmgr.NewNonceTracker(logger.Test(t), txStore, txmgr.NewEvmTxmClient(ethClient)) - eb := NewTestEthBroadcaster(t, txStore, ethClient, ethKeyStore, evmcfg, &testCheckerFactory{}, false, nonceTracker) + nonceTracker := txmgr.NewNonceTracker(logger.Test(t), txStore, txmgr.NewEvmTxmClient(ethClient, nil)) + eb := NewTestEthBroadcaster(t, txStore, ethClient, ethKeyStore, cfg, evmcfg, &testCheckerFactory{}, false, nonceTracker) // Crashed right after we commit the database transaction that saved // the nonce to the eth_tx so evm.key_states.next_nonce has not been @@ -802,8 +802,8 @@ func TestEthBroadcaster_ProcessUnstartedEthTxs_ResumingFromCrash(t *testing.T) { ethClient := evmtest.NewEthClientMockWithDefaultChain(t) ethClient.On("PendingNonceAt", mock.Anything, fromAddress).Return(uint64(0), nil).Once() - nonceTracker := txmgr.NewNonceTracker(logger.Test(t), txStore, txmgr.NewEvmTxmClient(ethClient)) - eb := NewTestEthBroadcaster(t, txStore, ethClient, ethKeyStore, evmcfg, &testCheckerFactory{}, false, nonceTracker) + nonceTracker := txmgr.NewNonceTracker(logger.Test(t), txStore, txmgr.NewEvmTxmClient(ethClient, nil)) + eb := NewTestEthBroadcaster(t, txStore, ethClient, ethKeyStore, cfg, evmcfg, &testCheckerFactory{}, false, nonceTracker) // Crashed right after we commit the database transaction that saved the nonce to the eth_tx inProgressEthTx := mustInsertInProgressEthTxWithAttempt(t, txStore, firstNonce, fromAddress) @@ -839,8 +839,8 @@ func TestEthBroadcaster_ProcessUnstartedEthTxs_ResumingFromCrash(t *testing.T) { ethClient := evmtest.NewEthClientMockWithDefaultChain(t) ethClient.On("PendingNonceAt", mock.Anything, fromAddress).Return(uint64(0), nil).Once() - nonceTracker := txmgr.NewNonceTracker(logger.Test(t), txStore, txmgr.NewEvmTxmClient(ethClient)) - eb := NewTestEthBroadcaster(t, txStore, ethClient, ethKeyStore, evmcfg, &testCheckerFactory{}, false, nonceTracker) + nonceTracker := txmgr.NewNonceTracker(logger.Test(t), txStore, txmgr.NewEvmTxmClient(ethClient, nil)) + eb := NewTestEthBroadcaster(t, txStore, ethClient, ethKeyStore, cfg, evmcfg, &testCheckerFactory{}, false, nonceTracker) // Crashed right after we commit the database transaction that saved the nonce to the eth_tx inProgressEthTx := mustInsertInProgressEthTxWithAttempt(t, txStore, firstNonce, fromAddress) @@ -875,8 +875,8 @@ func TestEthBroadcaster_ProcessUnstartedEthTxs_ResumingFromCrash(t *testing.T) { ethClient := evmtest.NewEthClientMockWithDefaultChain(t) ethClient.On("PendingNonceAt", mock.Anything, fromAddress).Return(uint64(0), nil).Once() - nonceTracker := txmgr.NewNonceTracker(logger.Test(t), txStore, txmgr.NewEvmTxmClient(ethClient)) - eb := NewTestEthBroadcaster(t, txStore, ethClient, ethKeyStore, evmcfg, &testCheckerFactory{}, false, nonceTracker) + nonceTracker := txmgr.NewNonceTracker(logger.Test(t), txStore, txmgr.NewEvmTxmClient(ethClient, nil)) + eb := NewTestEthBroadcaster(t, txStore, ethClient, ethKeyStore, cfg, evmcfg, &testCheckerFactory{}, false, nonceTracker) // Crashed right after we commit the database transaction that saved the nonce to the eth_tx inProgressEthTx := mustInsertInProgressEthTxWithAttempt(t, txStore, firstNonce, fromAddress) @@ -913,8 +913,8 @@ func TestEthBroadcaster_ProcessUnstartedEthTxs_ResumingFromCrash(t *testing.T) { ethClient := evmtest.NewEthClientMockWithDefaultChain(t) ethClient.On("PendingNonceAt", mock.Anything, fromAddress).Return(uint64(0), nil).Once() - nonceTracker := txmgr.NewNonceTracker(logger.Test(t), txStore, txmgr.NewEvmTxmClient(ethClient)) - eb := NewTestEthBroadcaster(t, txStore, ethClient, ethKeyStore, evmcfg, &testCheckerFactory{}, false, nonceTracker) + nonceTracker := txmgr.NewNonceTracker(logger.Test(t), txStore, txmgr.NewEvmTxmClient(ethClient, nil)) + eb := NewTestEthBroadcaster(t, txStore, ethClient, ethKeyStore, cfg, evmcfg, &testCheckerFactory{}, false, nonceTracker) // Crashed right after we commit the database transaction that saved the nonce to the eth_tx inProgressEthTx := mustInsertInProgressEthTxWithAttempt(t, txStore, firstNonce, fromAddress) @@ -955,8 +955,8 @@ func TestEthBroadcaster_ProcessUnstartedEthTxs_ResumingFromCrash(t *testing.T) { ethClient := evmtest.NewEthClientMockWithDefaultChain(t) ethClient.On("PendingNonceAt", mock.Anything, fromAddress).Return(uint64(0), nil).Once() - nonceTracker := txmgr.NewNonceTracker(logger.Test(t), txStore, txmgr.NewEvmTxmClient(ethClient)) - eb := NewTestEthBroadcaster(t, txStore, ethClient, ethKeyStore, evmcfg, &testCheckerFactory{}, false, nonceTracker) + nonceTracker := txmgr.NewNonceTracker(logger.Test(t), txStore, txmgr.NewEvmTxmClient(ethClient, nil)) + eb := NewTestEthBroadcaster(t, txStore, ethClient, ethKeyStore, cfg, evmcfg, &testCheckerFactory{}, false, nonceTracker) // Crashed right after we commit the database transaction that saved the nonce to the eth_tx inProgressEthTx := mustInsertInProgressEthTxWithAttempt(t, txStore, firstNonce, fromAddress) @@ -1020,9 +1020,9 @@ func TestEthBroadcaster_ProcessUnstartedEthTxs_Errors(t *testing.T) { ethClient := evmtest.NewEthClientMockWithDefaultChain(t) ethClient.On("PendingNonceAt", mock.Anything, fromAddress).Return(uint64(0), nil).Once() lggr := logger.Test(t) - txmClient := txmgr.NewEvmTxmClient(ethClient) + txmClient := txmgr.NewEvmTxmClient(ethClient, nil) nonceTracker := txmgr.NewNonceTracker(lggr, txStore, txmClient) - eb := NewTestEthBroadcaster(t, txStore, ethClient, ethKeyStore, evmcfg, &testCheckerFactory{}, false, nonceTracker) + eb := NewTestEthBroadcaster(t, txStore, ethClient, ethKeyStore, cfg, evmcfg, &testCheckerFactory{}, false, nonceTracker) ctx := testutils.Context(t) require.NoError(t, commonutils.JustError(db.Exec(`SET CONSTRAINTS fk_pipeline_runs_pruning_key DEFERRED`))) @@ -1157,7 +1157,7 @@ func TestEthBroadcaster_ProcessUnstartedEthTxs_Errors(t *testing.T) { }, evmcfg.EVM().GasEstimator().EIP1559DynamicFees(), evmcfg.EVM().GasEstimator()) txBuilder := txmgr.NewEvmTxAttemptBuilder(*ethClient.ConfiguredChainID(), evmcfg.EVM().GasEstimator(), ethKeyStore, estimator) localNextNonce = getLocalNextNonce(t, nonceTracker, fromAddress) - eb2 := txmgr.NewEvmBroadcaster(txStore, txmClient, txmgr.NewEvmTxmConfig(evmcfg.EVM()), txmgr.NewEvmTxmFeeConfig(evmcfg.EVM().GasEstimator()), evmcfg.EVM().Transactions(), evmcfg.Database().Listener(), ethKeyStore, txBuilder, lggr, &testCheckerFactory{}, false) + eb2 := txmgr.NewEvmBroadcaster(txStore, txmClient, txmgr.NewEvmTxmConfig(evmcfg.EVM()), txmgr.NewEvmTxmFeeConfig(evmcfg.EVM().GasEstimator()), evmcfg.EVM().Transactions(), cfg.Database().Listener(), ethKeyStore, txBuilder, lggr, &testCheckerFactory{}, false) retryable, err := eb2.ProcessUnstartedTxs(ctx, fromAddress) assert.NoError(t, err) assert.False(t, retryable) @@ -1481,7 +1481,7 @@ func TestEthBroadcaster_ProcessUnstartedEthTxs_Errors(t *testing.T) { c.EVM[0].GasEstimator.BumpMin = assets.NewWeiI(0) c.EVM[0].GasEstimator.BumpPercent = ptr[uint16](0) })) - eb2 := NewTestEthBroadcaster(t, txStore, ethClient, ethKeyStore, evmcfg2, &testCheckerFactory{}, false, nonceTracker) + eb2 := NewTestEthBroadcaster(t, txStore, ethClient, ethKeyStore, cfg, evmcfg2, &testCheckerFactory{}, false, nonceTracker) mustCreateUnstartedTx(t, txStore, fromAddress, toAddress, encodedPayload, gasLimit, value, &cltest.FixtureChainID) // First was underpriced @@ -1573,7 +1573,7 @@ func TestEthBroadcaster_ProcessUnstartedEthTxs_Errors(t *testing.T) { })) localNextNonce := getLocalNextNonce(t, nonceTracker, fromAddress) ethClient.On("PendingNonceAt", mock.Anything, fromAddress).Return(localNextNonce, nil).Once() - eb2 := NewTestEthBroadcaster(t, txStore, ethClient, ethKeyStore, evmcfg2, &testCheckerFactory{}, false, nonceTracker) + eb2 := NewTestEthBroadcaster(t, txStore, ethClient, ethKeyStore, cfg, evmcfg2, &testCheckerFactory{}, false, nonceTracker) mustCreateUnstartedTx(t, txStore, fromAddress, toAddress, encodedPayload, gasLimit, value, &cltest.FixtureChainID) underpricedError := "transaction underpriced" localNextNonce = getLocalNextNonce(t, nonceTracker, fromAddress) @@ -1604,7 +1604,7 @@ func TestEthBroadcaster_ProcessUnstartedEthTxs_Errors(t *testing.T) { c.EVM[0].GasEstimator.TipCapDefault = assets.NewWeiI(0) })) ethClient.On("PendingNonceAt", mock.Anything, fromAddress).Return(localNextNonce, nil).Once() - eb2 := NewTestEthBroadcaster(t, txStore, ethClient, ethKeyStore, evmcfg2, &testCheckerFactory{}, false, nonceTracker) + eb2 := NewTestEthBroadcaster(t, txStore, ethClient, ethKeyStore, cfg, evmcfg2, &testCheckerFactory{}, false, nonceTracker) retryable, err := eb2.ProcessUnstartedTxs(ctx, fromAddress) require.Error(t, err) @@ -1619,7 +1619,7 @@ func TestEthBroadcaster_ProcessUnstartedEthTxs_Errors(t *testing.T) { })) localNextNonce = getLocalNextNonce(t, nonceTracker, fromAddress) ethClient.On("PendingNonceAt", mock.Anything, fromAddress).Return(localNextNonce, nil).Once() - eb2 = NewTestEthBroadcaster(t, txStore, ethClient, ethKeyStore, evmcfg2, &testCheckerFactory{}, false, nonceTracker) + eb2 = NewTestEthBroadcaster(t, txStore, ethClient, ethKeyStore, cfg, evmcfg2, &testCheckerFactory{}, false, nonceTracker) // Second was underpriced but above minimum ethClient.On("SendTransactionReturnCode", mock.Anything, mock.MatchedBy(func(tx *gethTypes.Transaction) bool { @@ -1666,8 +1666,8 @@ func TestEthBroadcaster_ProcessUnstartedEthTxs_KeystoreErrors(t *testing.T) { kst.On("EnabledAddressesForChain", mock.Anything, &cltest.FixtureChainID).Return(addresses, nil).Once() ethClient.On("PendingNonceAt", mock.Anything, fromAddress).Return(uint64(0), nil).Once() lggr := logger.Test(t) - nonceTracker := txmgr.NewNonceTracker(lggr, txStore, txmgr.NewEvmTxmClient(ethClient)) - eb := NewTestEthBroadcaster(t, txStore, ethClient, kst, evmcfg, &testCheckerFactory{}, false, nonceTracker) + nonceTracker := txmgr.NewNonceTracker(lggr, txStore, txmgr.NewEvmTxmClient(ethClient, nil)) + eb := NewTestEthBroadcaster(t, txStore, ethClient, kst, cfg, evmcfg, &testCheckerFactory{}, false, nonceTracker) ctx := testutils.Context(t) _, err := nonceTracker.GetNextSequence(ctx, fromAddress) require.NoError(t, err) @@ -1715,8 +1715,8 @@ func TestEthBroadcaster_Trigger(t *testing.T) { ethKeyStore := cltest.NewKeyStore(t, db).Eth() ethClient := evmtest.NewEthClientMockWithDefaultChain(t) lggr := logger.Test(t) - nonceTracker := txmgr.NewNonceTracker(lggr, txStore, txmgr.NewEvmTxmClient(ethClient)) - eb := NewTestEthBroadcaster(t, txStore, ethClient, ethKeyStore, evmcfg, &testCheckerFactory{}, false, nonceTracker) + nonceTracker := txmgr.NewNonceTracker(lggr, txStore, txmgr.NewEvmTxmClient(ethClient, nil)) + eb := NewTestEthBroadcaster(t, txStore, ethClient, ethKeyStore, cfg, evmcfg, &testCheckerFactory{}, false, nonceTracker) eb.Trigger(testutils.NewAddress()) eb.Trigger(testutils.NewAddress()) @@ -1753,7 +1753,7 @@ func TestEthBroadcaster_SyncNonce(t *testing.T) { addresses := []gethCommon.Address{fromAddress} kst.On("EnabledAddressesForChain", mock.Anything, &cltest.FixtureChainID).Return(addresses, nil).Once() ethClient.On("PendingNonceAt", mock.Anything, fromAddress).Return(uint64(0), nil).Once() - txmClient := txmgr.NewEvmTxmClient(ethClient) + txmClient := txmgr.NewEvmTxmClient(ethClient, nil) eb := txmgr.NewEvmBroadcaster(txStore, txmClient, evmTxmCfg, txmgr.NewEvmTxmFeeConfig(ge), evmcfg.EVM().Transactions(), cfg.Database().Listener(), kst, txBuilder, lggr, checkerFactory, false) err := eb.Start(ctx) assert.NoError(t, err) @@ -1787,8 +1787,8 @@ func TestEthBroadcaster_NonceTracker_InProgressTx(t *testing.T) { // Tx with nonce 0 in DB will set local nonce map to value to 1 mustInsertInProgressEthTxWithAttempt(t, txStore, evmtypes.Nonce(inProgressTxNonce), fromAddress) - nonceTracker := txmgr.NewNonceTracker(lggr, txStore, txmgr.NewEvmTxmClient(ethClient)) - eb := NewTestEthBroadcaster(t, txStore, ethClient, ethKeyStore, evmcfg, checkerFactory, false, nonceTracker) + nonceTracker := txmgr.NewNonceTracker(lggr, txStore, txmgr.NewEvmTxmClient(ethClient, nil)) + eb := NewTestEthBroadcaster(t, txStore, ethClient, ethKeyStore, cfg, evmcfg, checkerFactory, false, nonceTracker) // Check the local nonce map was set to 1 higher than in-progress tx nonce nonce := getLocalNextNonce(t, nonceTracker, fromAddress) diff --git a/core/chains/evm/txmgr/builder.go b/core/chains/evm/txmgr/builder.go index b345f48a671..f13efb2b258 100644 --- a/core/chains/evm/txmgr/builder.go +++ b/core/chains/evm/txmgr/builder.go @@ -26,6 +26,7 @@ func NewTxm( chainConfig ChainConfig, fCfg FeeConfig, txConfig config.Transactions, + clientErrors config.ClientErrors, dbConfig DatabaseConfig, listenerConfig ListenerConfig, client evmclient.Client, @@ -47,9 +48,9 @@ func NewTxm( // create tx attempt builder txAttemptBuilder := NewEvmTxAttemptBuilder(*client.ConfiguredChainID(), fCfg, keyStore, estimator) txStore := NewTxStore(sqlxDB, lggr) - txmCfg := NewEvmTxmConfig(chainConfig) // wrap Evm specific config - feeCfg := NewEvmTxmFeeConfig(fCfg) // wrap Evm specific config - txmClient := NewEvmTxmClient(client) // wrap Evm specific client + txmCfg := NewEvmTxmConfig(chainConfig) // wrap Evm specific config + feeCfg := NewEvmTxmFeeConfig(fCfg) // wrap Evm specific config + txmClient := NewEvmTxmClient(client, clientErrors) // wrap Evm specific client chainID := txmClient.ConfiguredChainID() evmBroadcaster := NewEvmBroadcaster(txStore, txmClient, txmCfg, feeCfg, txConfig, listenerConfig, keyStore, txAttemptBuilder, lggr, checker, chainConfig.NonceAutoSync()) evmTracker := NewEvmTracker(txStore, keyStore, chainID, lggr) diff --git a/core/chains/evm/txmgr/client.go b/core/chains/evm/txmgr/client.go index 89375e2d017..8ba3c841289 100644 --- a/core/chains/evm/txmgr/client.go +++ b/core/chains/evm/txmgr/client.go @@ -18,6 +18,7 @@ import ( commonclient "github.com/smartcontractkit/chainlink/v2/common/client" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/client" + evmconfig "github.com/smartcontractkit/chainlink/v2/core/chains/evm/config" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/gas" evmtypes "github.com/smartcontractkit/chainlink/v2/core/chains/evm/types" ) @@ -25,11 +26,12 @@ import ( var _ TxmClient = (*evmTxmClient)(nil) type evmTxmClient struct { - client client.Client + client client.Client + clientErrors evmconfig.ClientErrors } -func NewEvmTxmClient(c client.Client) *evmTxmClient { - return &evmTxmClient{client: c} +func NewEvmTxmClient(c client.Client, clientErrors evmconfig.ClientErrors) *evmTxmClient { + return &evmTxmClient{client: c, clientErrors: clientErrors} } func (c *evmTxmClient) PendingSequenceAt(ctx context.Context, addr common.Address) (evmtypes.Nonce, error) { @@ -84,7 +86,7 @@ func (c *evmTxmClient) BatchSendTransactions( return } sendErr := reqs[i].Error - codes[i] = client.ClassifySendError(sendErr, lggr, tx, attempts[i].Tx.FromAddress, c.client.IsL2()) + codes[i] = client.ClassifySendError(sendErr, c.clientErrors, lggr, tx, attempts[i].Tx.FromAddress, c.client.IsL2()) txErrs[i] = sendErr }(index) } diff --git a/core/chains/evm/txmgr/confirmer_test.go b/core/chains/evm/txmgr/confirmer_test.go index f368aea9c57..44449b7a44f 100644 --- a/core/chains/evm/txmgr/confirmer_test.go +++ b/core/chains/evm/txmgr/confirmer_test.go @@ -46,9 +46,9 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/services/chainlink" ) -func newTestChainScopedConfig(t *testing.T) evmconfig.ChainScopedConfig { +func newTestChainScopedConfig(t *testing.T) (chainlink.GeneralConfig, evmconfig.ChainScopedConfig) { cfg := configtest.NewTestGeneralConfig(t) - return evmtest.NewChainScopedConfig(t, cfg) + return cfg, evmtest.NewChainScopedConfig(t, cfg) } func newBroadcastLegacyEthTxAttempt(t *testing.T, etxID int64, gasPrice ...int64) txmgr.TxAttempt { @@ -114,7 +114,7 @@ func TestEthConfirmer_Lifecycle(t *testing.T) { t.Parallel() db := pgtest.NewSqlxDB(t) - config := newTestChainScopedConfig(t) + gconfig, config := newTestChainScopedConfig(t) txStore := newTxStore(t, db) ethClient := evmtest.NewEthClientMockWithDefaultChain(t) @@ -129,7 +129,7 @@ func TestEthConfirmer_Lifecycle(t *testing.T) { ge := config.EVM().GasEstimator() feeEstimator := gas.NewEvmFeeEstimator(lggr, newEst, ge.EIP1559DynamicFees(), ge) txBuilder := txmgr.NewEvmTxAttemptBuilder(*ethClient.ConfiguredChainID(), ge, ethKeyStore, feeEstimator) - ec := txmgr.NewEvmConfirmer(txStore, txmgr.NewEvmTxmClient(ethClient), txmgr.NewEvmTxmConfig(config.EVM()), txmgr.NewEvmTxmFeeConfig(ge), config.EVM().Transactions(), config.Database(), ethKeyStore, txBuilder, lggr) + ec := txmgr.NewEvmConfirmer(txStore, txmgr.NewEvmTxmClient(ethClient, nil), txmgr.NewEvmTxmConfig(config.EVM()), txmgr.NewEvmTxmFeeConfig(ge), config.EVM().Transactions(), gconfig.Database(), ethKeyStore, txBuilder, lggr) ctx := testutils.Context(t) // Can't close unstarted instance @@ -184,7 +184,7 @@ func TestEthConfirmer_CheckForReceipts(t *testing.T) { t.Parallel() db := pgtest.NewSqlxDB(t) - config := newTestChainScopedConfig(t) + gconfig, config := newTestChainScopedConfig(t) txStore := cltest.NewTestTxStore(t, db) ethClient := evmtest.NewEthClientMockWithDefaultChain(t) @@ -192,7 +192,7 @@ func TestEthConfirmer_CheckForReceipts(t *testing.T) { _, fromAddress := cltest.MustInsertRandomKey(t, ethKeyStore) - ec := newEthConfirmer(t, txStore, ethClient, config, ethKeyStore, nil) + ec := newEthConfirmer(t, txStore, ethClient, gconfig, config, ethKeyStore, nil) nonce := int64(0) ctx := testutils.Context(t) @@ -609,7 +609,7 @@ func TestEthConfirmer_CheckForReceipts_batching(t *testing.T) { evmcfg := evmtest.NewChainScopedConfig(t, cfg) - ec := newEthConfirmer(t, txStore, ethClient, evmcfg, ethKeyStore, nil) + ec := newEthConfirmer(t, txStore, ethClient, cfg, evmcfg, ethKeyStore, nil) ctx := testutils.Context(t) etx := cltest.MustInsertUnconfirmedEthTx(t, txStore, 0, fromAddress) @@ -669,7 +669,7 @@ func TestEthConfirmer_CheckForReceipts_HandlesNonFwdTxsWithForwardingEnabled(t * evmcfg := evmtest.NewChainScopedConfig(t, cfg) _, fromAddress := cltest.MustInsertRandomKeyReturningState(t, ethKeyStore) - ec := newEthConfirmer(t, txStore, ethClient, evmcfg, ethKeyStore, nil) + ec := newEthConfirmer(t, txStore, ethClient, cfg, evmcfg, ethKeyStore, nil) ctx := testutils.Context(t) // tx is not forwarded and doesn't have meta set. EthConfirmer should handle nil meta values etx := cltest.MustInsertUnconfirmedEthTx(t, txStore, 0, fromAddress) @@ -722,7 +722,7 @@ func TestEthConfirmer_CheckForReceipts_only_likely_confirmed(t *testing.T) { evmcfg := evmtest.NewChainScopedConfig(t, cfg) - ec := newEthConfirmer(t, txStore, ethClient, evmcfg, ethKeyStore, nil) + ec := newEthConfirmer(t, txStore, ethClient, cfg, evmcfg, ethKeyStore, nil) ctx := testutils.Context(t) var attempts []txmgr.TxAttempt @@ -767,7 +767,7 @@ func TestEthConfirmer_CheckForReceipts_should_not_check_for_likely_unconfirmed(t t.Parallel() db := pgtest.NewSqlxDB(t) - config := newTestChainScopedConfig(t) + gconfig, config := newTestChainScopedConfig(t) txStore := cltest.NewTestTxStore(t, db) ethKeyStore := cltest.NewKeyStore(t, db).Eth() @@ -776,7 +776,7 @@ func TestEthConfirmer_CheckForReceipts_should_not_check_for_likely_unconfirmed(t ethClient := evmtest.NewEthClientMockWithDefaultChain(t) - ec := newEthConfirmer(t, txStore, ethClient, config, ethKeyStore, nil) + ec := newEthConfirmer(t, txStore, ethClient, gconfig, config, ethKeyStore, nil) ctx := testutils.Context(t) etx := cltest.MustInsertUnconfirmedEthTx(t, txStore, 1, fromAddress) @@ -807,7 +807,7 @@ func TestEthConfirmer_CheckForReceipts_confirmed_missing_receipt_scoped_to_key(t ethClient.On("SequenceAt", mock.Anything, mock.Anything, mock.Anything).Return(evmtypes.Nonce(20), nil) evmcfg := evmtest.NewChainScopedConfig(t, cfg) - ec := newEthConfirmer(t, txStore, ethClient, evmcfg, ethKeyStore, nil) + ec := newEthConfirmer(t, txStore, ethClient, cfg, evmcfg, ethKeyStore, nil) ctx := testutils.Context(t) // STATE @@ -874,7 +874,7 @@ func TestEthConfirmer_CheckForReceipts_confirmed_missing_receipt(t *testing.T) { evmcfg := evmtest.NewChainScopedConfig(t, cfg) - ec := newEthConfirmer(t, txStore, ethClient, evmcfg, ethKeyStore, nil) + ec := newEthConfirmer(t, txStore, ethClient, cfg, evmcfg, ethKeyStore, nil) ctx := testutils.Context(t) // STATE @@ -1134,7 +1134,7 @@ func TestEthConfirmer_CheckConfirmedMissingReceipt(t *testing.T) { evmcfg := evmtest.NewChainScopedConfig(t, cfg) - ec := newEthConfirmer(t, txStore, ethClient, evmcfg, ethKeyStore, nil) + ec := newEthConfirmer(t, txStore, ethClient, cfg, evmcfg, ethKeyStore, nil) ctx := testutils.Context(t) // STATE @@ -1213,7 +1213,7 @@ func TestEthConfirmer_CheckConfirmedMissingReceipt_batchSendTransactions_fails(t evmcfg := evmtest.NewChainScopedConfig(t, cfg) - ec := newEthConfirmer(t, txStore, ethClient, evmcfg, ethKeyStore, nil) + ec := newEthConfirmer(t, txStore, ethClient, cfg, evmcfg, ethKeyStore, nil) ctx := testutils.Context(t) // STATE @@ -1277,7 +1277,7 @@ func TestEthConfirmer_CheckConfirmedMissingReceipt_smallEvmRPCBatchSize_middleBa evmcfg := evmtest.NewChainScopedConfig(t, cfg) - ec := newEthConfirmer(t, txStore, ethClient, evmcfg, ethKeyStore, nil) + ec := newEthConfirmer(t, txStore, ethClient, cfg, evmcfg, ethKeyStore, nil) ctx := testutils.Context(t) // STATE @@ -1360,7 +1360,7 @@ func TestEthConfirmer_FindTxsRequiringRebroadcast(t *testing.T) { lggr := logger.Test(t) - ec := newEthConfirmer(t, txStore, ethClient, evmcfg, ethKeyStore, nil) + ec := newEthConfirmer(t, txStore, ethClient, cfg, evmcfg, ethKeyStore, nil) t.Run("returns nothing when there are no transactions", func(t *testing.T) { etxs, err := ec.FindTxsRequiringRebroadcast(testutils.Context(t), lggr, evmFromAddress, currentHead, gasBumpThreshold, 10, 0, &cltest.FixtureChainID) @@ -1652,7 +1652,7 @@ func TestEthConfirmer_RebroadcastWhereNecessary_WithConnectivityCheck(t *testing addresses := []gethCommon.Address{fromAddress} kst.On("EnabledAddressesForChain", mock.Anything, &cltest.FixtureChainID).Return(addresses, nil).Maybe() // Create confirmer with necessary state - ec := txmgr.NewEvmConfirmer(txStore, txmgr.NewEvmTxmClient(ethClient), ccfg.EVM(), txmgr.NewEvmTxmFeeConfig(ccfg.EVM().GasEstimator()), ccfg.EVM().Transactions(), cfg.Database(), kst, txBuilder, lggr) + ec := txmgr.NewEvmConfirmer(txStore, txmgr.NewEvmTxmClient(ethClient, nil), ccfg.EVM(), txmgr.NewEvmTxmFeeConfig(ccfg.EVM().GasEstimator()), ccfg.EVM().Transactions(), cfg.Database(), kst, txBuilder, lggr) servicetest.Run(t, ec) currentHead := int64(30) oldEnough := int64(15) @@ -1699,7 +1699,7 @@ func TestEthConfirmer_RebroadcastWhereNecessary_WithConnectivityCheck(t *testing txBuilder := txmgr.NewEvmTxAttemptBuilder(*ethClient.ConfiguredChainID(), ge, kst, feeEstimator) addresses := []gethCommon.Address{fromAddress} kst.On("EnabledAddressesForChain", mock.Anything, &cltest.FixtureChainID).Return(addresses, nil).Maybe() - ec := txmgr.NewEvmConfirmer(txStore, txmgr.NewEvmTxmClient(ethClient), ccfg.EVM(), txmgr.NewEvmTxmFeeConfig(ccfg.EVM().GasEstimator()), ccfg.EVM().Transactions(), cfg.Database(), kst, txBuilder, lggr) + ec := txmgr.NewEvmConfirmer(txStore, txmgr.NewEvmTxmClient(ethClient, nil), ccfg.EVM(), txmgr.NewEvmTxmFeeConfig(ccfg.EVM().GasEstimator()), ccfg.EVM().Transactions(), cfg.Database(), kst, txBuilder, lggr) servicetest.Run(t, ec) currentHead := int64(30) oldEnough := int64(15) @@ -1746,7 +1746,7 @@ func TestEthConfirmer_RebroadcastWhereNecessary_MaxFeeScenario(t *testing.T) { addresses := []gethCommon.Address{fromAddress} kst.On("EnabledAddressesForChain", mock.Anything, &cltest.FixtureChainID).Return(addresses, nil).Maybe() // Use a mock keystore for this test - ec := newEthConfirmer(t, txStore, ethClient, evmcfg, kst, nil) + ec := newEthConfirmer(t, txStore, ethClient, cfg, evmcfg, kst, nil) currentHead := int64(30) oldEnough := int64(19) nonce := int64(0) @@ -1814,7 +1814,7 @@ func TestEthConfirmer_RebroadcastWhereNecessary(t *testing.T) { addresses := []gethCommon.Address{fromAddress} kst.On("EnabledAddressesForChain", mock.Anything, &cltest.FixtureChainID).Return(addresses, nil).Maybe() // Use a mock keystore for this test - ec := newEthConfirmer(t, txStore, ethClient, evmcfg, kst, nil) + ec := newEthConfirmer(t, txStore, ethClient, cfg, evmcfg, kst, nil) currentHead := int64(30) oldEnough := int64(19) nonce := int64(0) @@ -1879,7 +1879,7 @@ func TestEthConfirmer_RebroadcastWhereNecessary(t *testing.T) { var attempt1_2 txmgr.TxAttempt ethClient = evmtest.NewEthClientMockWithDefaultChain(t) - ec.XXXTestSetClient(txmgr.NewEvmTxmClient(ethClient)) + ec.XXXTestSetClient(txmgr.NewEvmTxmClient(ethClient, nil)) t.Run("creates new attempt with higher gas price if transaction has an attempt older than threshold", func(t *testing.T) { expectedBumpedGasPrice := big.NewInt(20000000000) @@ -2247,7 +2247,7 @@ func TestEthConfirmer_RebroadcastWhereNecessary(t *testing.T) { c.EVM[0].GasEstimator.PriceMax = assets.NewWeiI(60500000000) }) newCfg := evmtest.NewChainScopedConfig(t, gcfg) - ec2 := newEthConfirmer(t, txStore, ethClient, newCfg, ethKeyStore, nil) + ec2 := newEthConfirmer(t, txStore, ethClient, gcfg, newCfg, ethKeyStore, nil) ethClient.On("SendTransactionReturnCode", mock.Anything, mock.MatchedBy(func(tx *types.Transaction) bool { return evmtypes.Nonce(tx.Nonce()) == *etx3.Sequence && gasPrice.Cmp(tx.GasPrice()) == 0 @@ -2277,7 +2277,7 @@ func TestEthConfirmer_RebroadcastWhereNecessary(t *testing.T) { c.EVM[0].GasEstimator.PriceMax = assets.NewWeiI(60480000000) }) newCfg := evmtest.NewChainScopedConfig(t, gcfg) - ec2 := newEthConfirmer(t, txStore, ethClient, newCfg, ethKeyStore, nil) + ec2 := newEthConfirmer(t, txStore, ethClient, gcfg, newCfg, ethKeyStore, nil) ethClient.On("SendTransactionReturnCode", mock.Anything, mock.MatchedBy(func(tx *types.Transaction) bool { return evmtypes.Nonce(tx.Nonce()) == *etx3.Sequence && gasPrice.Cmp(tx.GasPrice()) == 0 @@ -2345,7 +2345,7 @@ func TestEthConfirmer_RebroadcastWhereNecessary(t *testing.T) { c.EVM[0].GasEstimator.PriceMax = assets.GWei(1000) }) newCfg := evmtest.NewChainScopedConfig(t, gcfg) - ec2 := newEthConfirmer(t, txStore, ethClient, newCfg, ethKeyStore, nil) + ec2 := newEthConfirmer(t, txStore, ethClient, gcfg, newCfg, ethKeyStore, nil) // Third attempt failed to bump, resubmits old one instead ethClient.On("SendTransactionReturnCode", mock.Anything, mock.MatchedBy(func(tx *types.Transaction) bool { @@ -2431,7 +2431,7 @@ func TestEthConfirmer_RebroadcastWhereNecessary_TerminallyUnderpriced_ThenGoesTh t.Run("terminally underpriced transaction with in_progress attempt is retried with more gas", func(t *testing.T) { ethClient := evmtest.NewEthClientMockWithDefaultChain(t) - ec := newEthConfirmer(t, txStore, ethClient, evmcfg, kst, nil) + ec := newEthConfirmer(t, txStore, ethClient, cfg, evmcfg, kst, nil) originalBroadcastAt := time.Unix(1616509100, 0) etx := mustInsertUnconfirmedEthTxWithAttemptState(t, txStore, nonce, fromAddress, txmgrtypes.TxAttemptInProgress, originalBroadcastAt) @@ -2455,7 +2455,7 @@ func TestEthConfirmer_RebroadcastWhereNecessary_TerminallyUnderpriced_ThenGoesTh t.Run("multiple gas bumps with existing broadcast attempts are retried with more gas until success in legacy mode", func(t *testing.T) { ethClient := evmtest.NewEthClientMockWithDefaultChain(t) - ec := newEthConfirmer(t, txStore, ethClient, evmcfg, kst, nil) + ec := newEthConfirmer(t, txStore, ethClient, cfg, evmcfg, kst, nil) etx := cltest.MustInsertUnconfirmedEthTxWithBroadcastLegacyAttempt(t, txStore, nonce, fromAddress) nonce++ @@ -2487,7 +2487,7 @@ func TestEthConfirmer_RebroadcastWhereNecessary_TerminallyUnderpriced_ThenGoesTh t.Run("multiple gas bumps with existing broadcast attempts are retried with more gas until success in EIP-1559 mode", func(t *testing.T) { ethClient := evmtest.NewEthClientMockWithDefaultChain(t) - ec := newEthConfirmer(t, txStore, ethClient, evmcfg, kst, nil) + ec := newEthConfirmer(t, txStore, ethClient, cfg, evmcfg, kst, nil) etx := mustInsertUnconfirmedEthTxWithBroadcastDynamicFeeAttempt(t, txStore, nonce, fromAddress) nonce++ @@ -2535,7 +2535,7 @@ func TestEthConfirmer_RebroadcastWhereNecessary_WhenOutOfEth(t *testing.T) { // keyStates, err := ethKeyStore.GetStatesForKeys(keys) // require.NoError(t, err) - config := newTestChainScopedConfig(t) + gconfig, config := newTestChainScopedConfig(t) currentHead := int64(30) oldEnough := int64(19) nonce := int64(0) @@ -2551,7 +2551,7 @@ func TestEthConfirmer_RebroadcastWhereNecessary_WhenOutOfEth(t *testing.T) { insufficientEthError := errors.New("insufficient funds for gas * price + value") t.Run("saves attempt with state 'insufficient_eth' if eth node returns this error", func(t *testing.T) { - ec := newEthConfirmer(t, txStore, ethClient, config, ethKeyStore, nil) + ec := newEthConfirmer(t, txStore, ethClient, gconfig, config, ethKeyStore, nil) expectedBumpedGasPrice := big.NewInt(20000000000) require.Greater(t, expectedBumpedGasPrice.Int64(), attempt1_1.TxFee.Legacy.ToInt().Int64()) @@ -2577,7 +2577,7 @@ func TestEthConfirmer_RebroadcastWhereNecessary_WhenOutOfEth(t *testing.T) { }) t.Run("does not bump gas when previous error was 'out of eth', instead resubmits existing transaction", func(t *testing.T) { - ec := newEthConfirmer(t, txStore, ethClient, config, ethKeyStore, nil) + ec := newEthConfirmer(t, txStore, ethClient, gconfig, config, ethKeyStore, nil) expectedBumpedGasPrice := big.NewInt(20000000000) require.Greater(t, expectedBumpedGasPrice.Int64(), attempt1_1.TxFee.Legacy.ToInt().Int64()) @@ -2602,7 +2602,7 @@ func TestEthConfirmer_RebroadcastWhereNecessary_WhenOutOfEth(t *testing.T) { }) t.Run("saves the attempt as broadcast after node wallet has been topped up with sufficient balance", func(t *testing.T) { - ec := newEthConfirmer(t, txStore, ethClient, config, ethKeyStore, nil) + ec := newEthConfirmer(t, txStore, ethClient, gconfig, config, ethKeyStore, nil) expectedBumpedGasPrice := big.NewInt(20000000000) require.Greater(t, expectedBumpedGasPrice.Int64(), attempt1_1.TxFee.Legacy.ToInt().Int64()) @@ -2634,7 +2634,7 @@ func TestEthConfirmer_RebroadcastWhereNecessary_WhenOutOfEth(t *testing.T) { c.EVM[0].GasEstimator.BumpTxDepth = ptr(uint32(depth)) }) evmcfg := evmtest.NewChainScopedConfig(t, cfg) - ec := newEthConfirmer(t, txStore, ethClient, evmcfg, ethKeyStore, nil) + ec := newEthConfirmer(t, txStore, ethClient, cfg, evmcfg, ethKeyStore, nil) for i := 0; i < etxCount; i++ { n := nonce @@ -2668,8 +2668,8 @@ func TestEthConfirmer_EnsureConfirmedTransactionsInLongestChain(t *testing.T) { ethClient := evmtest.NewEthClientMockWithDefaultChain(t) - config := newTestChainScopedConfig(t) - ec := newEthConfirmer(t, txStore, ethClient, config, ethKeyStore, nil) + gconfig, config := newTestChainScopedConfig(t) + ec := newEthConfirmer(t, txStore, ethClient, gconfig, config, ethKeyStore, nil) head := evmtypes.Head{ Hash: utils.NewHash(), @@ -2838,7 +2838,7 @@ func TestEthConfirmer_ForceRebroadcast(t *testing.T) { ethKeyStore := cltest.NewKeyStore(t, db).Eth() _, fromAddress := cltest.MustInsertRandomKeyReturningState(t, ethKeyStore) - config := newTestChainScopedConfig(t) + gconfig, config := newTestChainScopedConfig(t) mustCreateUnstartedGeneratedTx(t, txStore, fromAddress, config.EVM().ChainID()) mustInsertInProgressEthTx(t, txStore, 0, fromAddress) etx1 := cltest.MustInsertUnconfirmedEthTxWithBroadcastLegacyAttempt(t, txStore, 1, fromAddress) @@ -2849,7 +2849,7 @@ func TestEthConfirmer_ForceRebroadcast(t *testing.T) { t.Run("rebroadcasts one eth_tx if it falls within in nonce range", func(t *testing.T) { ethClient := evmtest.NewEthClientMockWithDefaultChain(t) - ec := newEthConfirmer(t, txStore, ethClient, config, ethKeyStore, nil) + ec := newEthConfirmer(t, txStore, ethClient, gconfig, config, ethKeyStore, nil) ethClient.On("SendTransactionReturnCode", mock.Anything, mock.MatchedBy(func(tx *types.Transaction) bool { return tx.Nonce() == uint64(*etx1.Sequence) && @@ -2864,7 +2864,7 @@ func TestEthConfirmer_ForceRebroadcast(t *testing.T) { t.Run("uses default gas limit if overrideGasLimit is 0", func(t *testing.T) { ethClient := evmtest.NewEthClientMockWithDefaultChain(t) - ec := newEthConfirmer(t, txStore, ethClient, config, ethKeyStore, nil) + ec := newEthConfirmer(t, txStore, ethClient, gconfig, config, ethKeyStore, nil) ethClient.On("SendTransactionReturnCode", mock.Anything, mock.MatchedBy(func(tx *types.Transaction) bool { return tx.Nonce() == uint64(*etx1.Sequence) && @@ -2879,7 +2879,7 @@ func TestEthConfirmer_ForceRebroadcast(t *testing.T) { t.Run("rebroadcasts several eth_txes in nonce range", func(t *testing.T) { ethClient := evmtest.NewEthClientMockWithDefaultChain(t) - ec := newEthConfirmer(t, txStore, ethClient, config, ethKeyStore, nil) + ec := newEthConfirmer(t, txStore, ethClient, gconfig, config, ethKeyStore, nil) ethClient.On("SendTransactionReturnCode", mock.Anything, mock.MatchedBy(func(tx *types.Transaction) bool { return tx.Nonce() == uint64(*etx1.Sequence) && tx.GasPrice().Int64() == gasPriceWei.Legacy.Int64() && tx.Gas() == overrideGasLimit @@ -2893,7 +2893,7 @@ func TestEthConfirmer_ForceRebroadcast(t *testing.T) { t.Run("broadcasts zero transactions if eth_tx doesn't exist for that nonce", func(t *testing.T) { ethClient := evmtest.NewEthClientMockWithDefaultChain(t) - ec := newEthConfirmer(t, txStore, ethClient, config, ethKeyStore, nil) + ec := newEthConfirmer(t, txStore, ethClient, gconfig, config, ethKeyStore, nil) ethClient.On("SendTransactionReturnCode", mock.Anything, mock.MatchedBy(func(tx *types.Transaction) bool { return tx.Nonce() == uint64(1) @@ -2919,7 +2919,7 @@ func TestEthConfirmer_ForceRebroadcast(t *testing.T) { t.Run("zero transactions use default gas limit if override wasn't specified", func(t *testing.T) { ethClient := evmtest.NewEthClientMockWithDefaultChain(t) - ec := newEthConfirmer(t, txStore, ethClient, config, ethKeyStore, nil) + ec := newEthConfirmer(t, txStore, ethClient, gconfig, config, ethKeyStore, nil) ethClient.On("SendTransactionReturnCode", mock.Anything, mock.MatchedBy(func(tx *types.Transaction) bool { return tx.Nonce() == uint64(0) && tx.GasPrice().Int64() == gasPriceWei.Legacy.Int64() && tx.Gas() == config.EVM().GasEstimator().LimitDefault() @@ -2964,7 +2964,7 @@ func TestEthConfirmer_ResumePendingRuns(t *testing.T) { pgtest.MustExec(t, db, `SET CONSTRAINTS pipeline_runs_pipeline_spec_id_fkey DEFERRED`) t.Run("doesn't process task runs that are not suspended (possibly already previously resumed)", func(t *testing.T) { - ec := newEthConfirmer(t, txStore, ethClient, evmcfg, ethKeyStore, func(context.Context, uuid.UUID, interface{}, error) error { + ec := newEthConfirmer(t, txStore, ethClient, config, evmcfg, ethKeyStore, func(context.Context, uuid.UUID, interface{}, error) error { t.Fatal("No value expected") return nil }) @@ -2983,7 +2983,7 @@ func TestEthConfirmer_ResumePendingRuns(t *testing.T) { }) t.Run("doesn't process task runs where the receipt is younger than minConfirmations", func(t *testing.T) { - ec := newEthConfirmer(t, txStore, ethClient, evmcfg, ethKeyStore, func(context.Context, uuid.UUID, interface{}, error) error { + ec := newEthConfirmer(t, txStore, ethClient, config, evmcfg, ethKeyStore, func(context.Context, uuid.UUID, interface{}, error) error { t.Fatal("No value expected") return nil }) @@ -3004,7 +3004,7 @@ func TestEthConfirmer_ResumePendingRuns(t *testing.T) { ch := make(chan interface{}) nonce := evmtypes.Nonce(3) var err error - ec := newEthConfirmer(t, txStore, ethClient, evmcfg, ethKeyStore, func(ctx context.Context, id uuid.UUID, value interface{}, thisErr error) error { + ec := newEthConfirmer(t, txStore, ethClient, config, evmcfg, ethKeyStore, func(ctx context.Context, id uuid.UUID, value interface{}, thisErr error) error { err = thisErr ch <- value return nil @@ -3057,7 +3057,7 @@ func TestEthConfirmer_ResumePendingRuns(t *testing.T) { } ch := make(chan data) nonce := evmtypes.Nonce(4) - ec := newEthConfirmer(t, txStore, ethClient, evmcfg, ethKeyStore, func(ctx context.Context, id uuid.UUID, value interface{}, err error) error { + ec := newEthConfirmer(t, txStore, ethClient, config, evmcfg, ethKeyStore, func(ctx context.Context, id uuid.UUID, value interface{}, err error) error { ch <- data{value, err} return nil }) @@ -3104,7 +3104,7 @@ func TestEthConfirmer_ResumePendingRuns(t *testing.T) { t.Run("does not mark callback complete if callback fails", func(t *testing.T) { nonce := evmtypes.Nonce(5) - ec := newEthConfirmer(t, txStore, ethClient, evmcfg, ethKeyStore, func(context.Context, uuid.UUID, interface{}, error) error { + ec := newEthConfirmer(t, txStore, ethClient, config, evmcfg, ethKeyStore, func(context.Context, uuid.UUID, interface{}, error) error { return errors.New("error") }) @@ -3127,14 +3127,14 @@ func TestEthConfirmer_ResumePendingRuns(t *testing.T) { func ptr[T any](t T) *T { return &t } -func newEthConfirmer(t testing.TB, txStore txmgr.EvmTxStore, ethClient client.Client, config evmconfig.ChainScopedConfig, ks keystore.Eth, fn txmgrcommon.ResumeCallback) *txmgr.Confirmer { +func newEthConfirmer(t testing.TB, txStore txmgr.EvmTxStore, ethClient client.Client, gconfig chainlink.GeneralConfig, config evmconfig.ChainScopedConfig, ks keystore.Eth, fn txmgrcommon.ResumeCallback) *txmgr.Confirmer { lggr := logger.Test(t) ge := config.EVM().GasEstimator() estimator := gas.NewEvmFeeEstimator(lggr, func(lggr logger.Logger) gas.EvmEstimator { return gas.NewFixedPriceEstimator(ge, nil, ge.BlockHistory(), lggr, nil) }, ge.EIP1559DynamicFees(), ge) txBuilder := txmgr.NewEvmTxAttemptBuilder(*ethClient.ConfiguredChainID(), ge, ks, estimator) - ec := txmgr.NewEvmConfirmer(txStore, txmgr.NewEvmTxmClient(ethClient), txmgr.NewEvmTxmConfig(config.EVM()), txmgr.NewEvmTxmFeeConfig(ge), config.EVM().Transactions(), config.Database(), ks, txBuilder, lggr) + ec := txmgr.NewEvmConfirmer(txStore, txmgr.NewEvmTxmClient(ethClient, nil), txmgr.NewEvmTxmConfig(config.EVM()), txmgr.NewEvmTxmFeeConfig(ge), config.EVM().Transactions(), gconfig.Database(), ks, txBuilder, lggr) ec.SetResumeCallback(fn) servicetest.Run(t, ec) return ec diff --git a/core/chains/evm/txmgr/evm_tx_store_test.go b/core/chains/evm/txmgr/evm_tx_store_test.go index 1d1d85c0960..cf38b2d1275 100644 --- a/core/chains/evm/txmgr/evm_tx_store_test.go +++ b/core/chains/evm/txmgr/evm_tx_store_test.go @@ -371,7 +371,7 @@ func TestORM_SetBroadcastBeforeBlockNum(t *testing.T) { t.Parallel() db := pgtest.NewSqlxDB(t) - cfg := newTestChainScopedConfig(t) + _, cfg := newTestChainScopedConfig(t) txStore := cltest.NewTestTxStore(t, db) ethKeyStore := cltest.NewKeyStore(t, db).Eth() ethClient := evmtest.NewEthClientMockWithDefaultChain(t) @@ -692,7 +692,7 @@ func TestORM_FindTxesPendingCallback(t *testing.T) { func Test_FindTxWithIdempotencyKey(t *testing.T) { t.Parallel() db := pgtest.NewSqlxDB(t) - cfg := newTestChainScopedConfig(t) + _, cfg := newTestChainScopedConfig(t) txStore := cltest.NewTestTxStore(t, db) ethKeyStore := cltest.NewKeyStore(t, db).Eth() _, fromAddress := cltest.MustInsertRandomKeyReturningState(t, ethKeyStore) diff --git a/core/chains/evm/txmgr/mocks/config.go b/core/chains/evm/txmgr/mocks/config.go index 0a0ece4b90b..5b8e77a69cc 100644 --- a/core/chains/evm/txmgr/mocks/config.go +++ b/core/chains/evm/txmgr/mocks/config.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. package mocks diff --git a/core/chains/evm/txmgr/mocks/evm_tx_store.go b/core/chains/evm/txmgr/mocks/evm_tx_store.go index a05f2a22c60..be59d0130a4 100644 --- a/core/chains/evm/txmgr/mocks/evm_tx_store.go +++ b/core/chains/evm/txmgr/mocks/evm_tx_store.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. package mocks diff --git a/core/chains/evm/txmgr/nonce_tracker_test.go b/core/chains/evm/txmgr/nonce_tracker_test.go index 38059b82335..c6af58ab7ac 100644 --- a/core/chains/evm/txmgr/nonce_tracker_test.go +++ b/core/chains/evm/txmgr/nonce_tracker_test.go @@ -33,7 +33,7 @@ func TestNonceTracker_LoadSequenceMap(t *testing.T) { client := clientmock.NewClient(t) client.On("ConfiguredChainID").Return(chainID) - nonceTracker := txmgr.NewNonceTracker(logger.Test(t), txStore, txmgr.NewEvmTxmClient(client)) + nonceTracker := txmgr.NewNonceTracker(logger.Test(t), txStore, txmgr.NewEvmTxmClient(client, nil)) addr1 := common.HexToAddress("0xd5e099c71b797516c10ed0f0d895f429c2781142") addr2 := common.HexToAddress("0xd5e099c71b797516c10ed0f0d895f429c2781140") @@ -85,7 +85,7 @@ func TestNonceTracker_syncOnChain(t *testing.T) { client := clientmock.NewClient(t) client.On("ConfiguredChainID").Return(chainID) - nonceTracker := txmgr.NewNonceTracker(logger.Test(t), txStore, txmgr.NewEvmTxmClient(client)) + nonceTracker := txmgr.NewNonceTracker(logger.Test(t), txStore, txmgr.NewEvmTxmClient(client, nil)) addr := common.HexToAddress("0xd5e099c71b797516c10ed0f0d895f429c2781142") @@ -142,7 +142,7 @@ func TestNonceTracker_SyncSequence(t *testing.T) { client := clientmock.NewClient(t) client.On("ConfiguredChainID").Return(chainID) - nonceTracker := txmgr.NewNonceTracker(logger.Test(t), txStore, txmgr.NewEvmTxmClient(client)) + nonceTracker := txmgr.NewNonceTracker(logger.Test(t), txStore, txmgr.NewEvmTxmClient(client, nil)) addr := common.HexToAddress("0xd5e099c71b797516c10ed0f0d895f429c2781142") enabledAddresses := []common.Address{addr} @@ -189,7 +189,7 @@ func TestNonceTracker_GetNextSequence(t *testing.T) { client := clientmock.NewClient(t) client.On("ConfiguredChainID").Return(chainID) - nonceTracker := txmgr.NewNonceTracker(logger.Test(t), txStore, txmgr.NewEvmTxmClient(client)) + nonceTracker := txmgr.NewNonceTracker(logger.Test(t), txStore, txmgr.NewEvmTxmClient(client, nil)) addr := common.HexToAddress("0xd5e099c71b797516c10ed0f0d895f429c2781142") @@ -241,7 +241,7 @@ func TestNonceTracker_GenerateNextSequence(t *testing.T) { client := clientmock.NewClient(t) client.On("ConfiguredChainID").Return(chainID) - nonceTracker := txmgr.NewNonceTracker(logger.Test(t), txStore, txmgr.NewEvmTxmClient(client)) + nonceTracker := txmgr.NewNonceTracker(logger.Test(t), txStore, txmgr.NewEvmTxmClient(client, nil)) addr := common.HexToAddress("0xd5e099c71b797516c10ed0f0d895f429c2781142") enabledAddresses := []common.Address{addr} @@ -271,7 +271,7 @@ func Test_SetNonceAfterInit(t *testing.T) { client := clientmock.NewClient(t) client.On("ConfiguredChainID").Return(chainID) - nonceTracker := txmgr.NewNonceTracker(logger.Test(t), txStore, txmgr.NewEvmTxmClient(client)) + nonceTracker := txmgr.NewNonceTracker(logger.Test(t), txStore, txmgr.NewEvmTxmClient(client, nil)) addr := common.HexToAddress("0xd5e099c71b797516c10ed0f0d895f429c2781142") enabledAddresses := []common.Address{addr} diff --git a/core/chains/evm/txmgr/resender_test.go b/core/chains/evm/txmgr/resender_test.go index 8df5344f57c..331e39d6ccf 100644 --- a/core/chains/evm/txmgr/resender_test.go +++ b/core/chains/evm/txmgr/resender_test.go @@ -64,7 +64,7 @@ func Test_EthResender_resendUnconfirmed(t *testing.T) { addr3TxesRawHex = append(addr3TxesRawHex, hexutil.Encode(etx.TxAttempts[0].SignedRawTx)) } - er := txmgr.NewEvmResender(lggr, txStore, txmgr.NewEvmTxmClient(ethClient), txmgr.NewEvmTracker(txStore, ethKeyStore, big.NewInt(0), lggr), ethKeyStore, 100*time.Millisecond, ccfg.EVM(), ccfg.EVM().Transactions()) + er := txmgr.NewEvmResender(lggr, txStore, txmgr.NewEvmTxmClient(ethClient, nil), txmgr.NewEvmTracker(txStore, ethKeyStore, big.NewInt(0), lggr), ethKeyStore, 100*time.Millisecond, ccfg.EVM(), ccfg.EVM().Transactions()) var resentHex = make(map[string]struct{}) ethClient.On("BatchCallContextAll", mock.Anything, mock.MatchedBy(func(elems []rpc.BatchElem) bool { @@ -119,7 +119,7 @@ func Test_EthResender_alertUnconfirmed(t *testing.T) { txStore := cltest.NewTestTxStore(t, db) originalBroadcastAt := time.Unix(1616509100, 0) - er := txmgr.NewEvmResender(lggr, txStore, txmgr.NewEvmTxmClient(ethClient), txmgr.NewEvmTracker(txStore, ethKeyStore, big.NewInt(0), lggr), ethKeyStore, 100*time.Millisecond, ccfg.EVM(), ccfg.EVM().Transactions()) + er := txmgr.NewEvmResender(lggr, txStore, txmgr.NewEvmTxmClient(ethClient, nil), txmgr.NewEvmTracker(txStore, ethKeyStore, big.NewInt(0), lggr), ethKeyStore, 100*time.Millisecond, ccfg.EVM(), ccfg.EVM().Transactions()) t.Run("alerts only once for unconfirmed transaction attempt within the unconfirmedTxAlertDelay duration", func(t *testing.T) { _ = cltest.MustInsertUnconfirmedEthTxWithBroadcastLegacyAttempt(t, txStore, int64(1), fromAddress, originalBroadcastAt) @@ -156,7 +156,7 @@ func Test_EthResender_Start(t *testing.T) { ctx := testutils.Context(t) ethClient := evmtest.NewEthClientMockWithDefaultChain(t) - er := txmgr.NewEvmResender(lggr, txStore, txmgr.NewEvmTxmClient(ethClient), txmgr.NewEvmTracker(txStore, ethKeyStore, big.NewInt(0), lggr), ethKeyStore, 100*time.Millisecond, ccfg.EVM(), ccfg.EVM().Transactions()) + er := txmgr.NewEvmResender(lggr, txStore, txmgr.NewEvmTxmClient(ethClient, nil), txmgr.NewEvmTracker(txStore, ethKeyStore, big.NewInt(0), lggr), ethKeyStore, 100*time.Millisecond, ccfg.EVM(), ccfg.EVM().Transactions()) originalBroadcastAt := time.Unix(1616509100, 0) etx := cltest.MustInsertUnconfirmedEthTxWithBroadcastLegacyAttempt(t, txStore, 0, fromAddress, originalBroadcastAt) diff --git a/core/chains/evm/txmgr/txmgr_test.go b/core/chains/evm/txmgr/txmgr_test.go index 691b83f8e4c..aac9d89c490 100644 --- a/core/chains/evm/txmgr/txmgr_test.go +++ b/core/chains/evm/txmgr/txmgr_test.go @@ -73,6 +73,7 @@ func makeTestEvmTxm( ccfg, fcfg, txConfig, + nil, dbConfig, listenerConfig, ethClient, @@ -547,7 +548,7 @@ func TestTxm_Reset(t *testing.T) { ethClient.On("PendingNonceAt", mock.Anything, addr2).Return(uint64(44), nil).Maybe() estimator := gas.NewEstimator(logger.Test(t), ethClient, cfg.EVM(), cfg.EVM().GasEstimator()) - txm, err := makeTestEvmTxm(t, db, ethClient, estimator, cfg.EVM(), cfg.EVM().GasEstimator(), cfg.EVM().Transactions(), cfg.Database(), cfg.Database().Listener(), kst.Eth()) + txm, err := makeTestEvmTxm(t, db, ethClient, estimator, cfg.EVM(), cfg.EVM().GasEstimator(), cfg.EVM().Transactions(), gcfg.Database(), gcfg.Database().Listener(), kst.Eth()) require.NoError(t, err) cltest.MustInsertUnconfirmedEthTxWithBroadcastLegacyAttempt(t, txStore, 2, addr2) diff --git a/core/chains/legacyevm/chain.go b/core/chains/legacyevm/chain.go index 1066eeecbea..920532518ab 100644 --- a/core/chains/legacyevm/chain.go +++ b/core/chains/legacyevm/chain.go @@ -206,7 +206,7 @@ func NewTOMLChain(ctx context.Context, chain *toml.EVMConfig, opts ChainRelayExt if !chain.IsEnabled() { return nil, errChainDisabled{ChainID: chainID} } - cfg := evmconfig.NewTOMLChainScopedConfig(opts.AppConfig, chain, l) + cfg := evmconfig.NewTOMLChainScopedConfig(chain, l) // note: per-chain validation is not necessary at this point since everything is checked earlier on boot. return newChain(ctx, cfg, chain.Nodes, opts) } @@ -215,10 +215,10 @@ func newChain(ctx context.Context, cfg *evmconfig.ChainScoped, nodes []*toml.Nod chainID := cfg.EVM().ChainID() l := opts.Logger var client evmclient.Client - if !cfg.EVMRPCEnabled() { + if !opts.AppConfig.EVMRPCEnabled() { client = evmclient.NewNullClient(chainID, l) } else if opts.GenEthClient == nil { - client = evmclient.NewEvmClient(cfg.EVM().NodePool(), cfg.EVM(), l, chainID, nodes) + client = evmclient.NewEvmClient(cfg.EVM().NodePool(), cfg.EVM(), cfg.EVM().NodePool().Errors(), l, chainID, nodes) } else { client = opts.GenEthClient(chainID) } @@ -226,7 +226,7 @@ func newChain(ctx context.Context, cfg *evmconfig.ChainScoped, nodes []*toml.Nod headBroadcaster := headtracker.NewHeadBroadcaster(l) headSaver := headtracker.NullSaver var headTracker httypes.HeadTracker - if !cfg.EVMRPCEnabled() { + if !opts.AppConfig.EVMRPCEnabled() { headTracker = headtracker.NullTracker } else if opts.GenHeadTracker == nil { orm := headtracker.NewORM(*chainID, opts.DB) @@ -237,7 +237,7 @@ func newChain(ctx context.Context, cfg *evmconfig.ChainScoped, nodes []*toml.Nod } logPoller := logpoller.LogPollerDisabled - if cfg.Feature().LogPoller() { + if opts.AppConfig.Feature().LogPoller() { if opts.GenLogPoller != nil { logPoller = opts.GenLogPoller(chainID) } else { @@ -256,7 +256,7 @@ func newChain(ctx context.Context, cfg *evmconfig.ChainScoped, nodes []*toml.Nod } // note: gas estimator is started as a part of the txm - txm, gasEstimator, err := newEvmTxm(opts.SqlxDB, opts.DB, cfg.EVM(), cfg.EVMRPCEnabled(), cfg.Database(), cfg.Database().Listener(), client, l, logPoller, opts) + txm, gasEstimator, err := newEvmTxm(opts.SqlxDB, opts.DB, cfg.EVM(), opts.AppConfig.EVMRPCEnabled(), opts.AppConfig.Database(), opts.AppConfig.Database().Listener(), client, l, logPoller, opts) if err != nil { return nil, fmt.Errorf("failed to instantiate EvmTxm for chain with ID %s: %w", chainID.String(), err) } @@ -270,13 +270,13 @@ func newChain(ctx context.Context, cfg *evmconfig.ChainScoped, nodes []*toml.Nod } var balanceMonitor monitor.BalanceMonitor - if cfg.EVMRPCEnabled() && cfg.EVM().BalanceMonitor().Enabled() { + if opts.AppConfig.EVMRPCEnabled() && cfg.EVM().BalanceMonitor().Enabled() { balanceMonitor = monitor.NewBalanceMonitor(client, opts.KeyStore, l) headBroadcaster.Subscribe(balanceMonitor) } var logBroadcaster log.Broadcaster - if !cfg.EVMRPCEnabled() { + if !opts.AppConfig.EVMRPCEnabled() { logBroadcaster = &log.NullBroadcaster{ErrMsg: fmt.Sprintf("Ethereum is disabled for chain %d", chainID)} } else if opts.GenLogBroadcaster == nil { logORM := log.NewORM(opts.SqlxDB, *chainID) diff --git a/core/chains/legacyevm/evm_txm.go b/core/chains/legacyevm/evm_txm.go index c4959b78a47..6b2d1262ce8 100644 --- a/core/chains/legacyevm/evm_txm.go +++ b/core/chains/legacyevm/evm_txm.go @@ -58,6 +58,7 @@ func newEvmTxm( cfg, txmgr.NewEvmTxmFeeConfig(cfg.GasEstimator()), cfg.Transactions(), + cfg.NodePool().Errors(), databaseConfig, listenerConfig, client, diff --git a/core/chains/legacyevm/mocks/chain.go b/core/chains/legacyevm/mocks/chain.go index 87bdccf1891..8f313ee45ef 100644 --- a/core/chains/legacyevm/mocks/chain.go +++ b/core/chains/legacyevm/mocks/chain.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. package mocks diff --git a/core/chains/legacyevm/mocks/legacy_chain_container.go b/core/chains/legacyevm/mocks/legacy_chain_container.go index 812b95d3697..527544de60d 100644 --- a/core/chains/legacyevm/mocks/legacy_chain_container.go +++ b/core/chains/legacyevm/mocks/legacy_chain_container.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. package mocks diff --git a/core/cmd/mocks/prompter.go b/core/cmd/mocks/prompter.go index a05d24d671b..38c1d327fb3 100644 --- a/core/cmd/mocks/prompter.go +++ b/core/cmd/mocks/prompter.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. package mocks diff --git a/core/cmd/shell_local.go b/core/cmd/shell_local.go index 66ceafa5cb2..a61390a4886 100644 --- a/core/cmd/shell_local.go +++ b/core/cmd/shell_local.go @@ -636,7 +636,8 @@ func (s *Shell) RebroadcastTransactions(c *cli.Context) (err error) { txBuilder := txmgr.NewEvmTxAttemptBuilder(*ethClient.ConfiguredChainID(), chain.Config().EVM().GasEstimator(), keyStore.Eth(), nil) cfg := txmgr.NewEvmTxmConfig(chain.Config().EVM()) feeCfg := txmgr.NewEvmTxmFeeConfig(chain.Config().EVM().GasEstimator()) - ec := txmgr.NewEvmConfirmer(orm, txmgr.NewEvmTxmClient(ethClient), cfg, feeCfg, chain.Config().EVM().Transactions(), chain.Config().Database(), keyStore.Eth(), txBuilder, chain.Logger()) + ec := txmgr.NewEvmConfirmer(orm, txmgr.NewEvmTxmClient(ethClient, chain.Config().EVM().NodePool().Errors()), + cfg, feeCfg, chain.Config().EVM().Transactions(), app.GetConfig().Database(), keyStore.Eth(), txBuilder, chain.Logger()) totalNonces := endingNonce - beginningNonce + 1 nonces := make([]evmtypes.Nonce, totalNonces) for i := int64(0); i < totalNonces; i++ { diff --git a/core/cmd/shell_local_test.go b/core/cmd/shell_local_test.go index 0db99d1a57a..d608d3931d0 100644 --- a/core/cmd/shell_local_test.go +++ b/core/cmd/shell_local_test.go @@ -302,6 +302,7 @@ func TestShell_RebroadcastTransactions_Txm(t *testing.T) { app.On("GetSqlxDB").Return(sqlxDB) app.On("GetKeyStore").Return(keyStore) app.On("ID").Maybe().Return(uuid.New()) + app.On("GetConfig").Return(config) ethClient := evmtest.NewEthClientMockWithDefaultChain(t) legacy := cltest.NewLegacyChainsWithMockChain(t, ethClient, config) @@ -383,6 +384,7 @@ func TestShell_RebroadcastTransactions_OutsideRange_Txm(t *testing.T) { app.On("GetSqlxDB").Return(sqlxDB) app.On("GetKeyStore").Return(keyStore) app.On("ID").Maybe().Return(uuid.New()) + app.On("GetConfig").Return(config) ethClient := evmtest.NewEthClientMockWithDefaultChain(t) ethClient.On("Dial", mock.Anything).Return(nil) legacy := cltest.NewLegacyChainsWithMockChain(t, ethClient, config) @@ -487,6 +489,7 @@ func TestShell_RebroadcastTransactions_AddressCheck(t *testing.T) { if test.shouldError { require.ErrorContains(t, client.RebroadcastTransactions(c), test.errorContains) } else { + app.On("GetConfig").Return(config).Once() require.NoError(t, client.RebroadcastTransactions(c)) } diff --git a/core/config/docs/chains-evm.toml b/core/config/docs/chains-evm.toml index dd63edaf694..49c42bc04fb 100644 --- a/core/config/docs/chains-evm.toml +++ b/core/config/docs/chains-evm.toml @@ -352,6 +352,39 @@ NodeIsSyncingEnabled = false # Default # # Set to 0 to disable. FinalizedBlockPollInterval = '5s' # Default + +# **ADVANCED** +# Errors enable the node to provide custom regex patterns to match against error messages from RPCs. +[EVM.NodePool.Errors] +# NonceTooLow is a regex pattern to match against nonce too low errors. +NonceTooLow = '(: |^)nonce too low' # Example +# NonceTooHigh is a regex pattern to match against nonce too high errors. +NonceTooHigh = '(: |^)nonce too high' # Example +# ReplacementTransactionUnderpriced is a regex pattern to match against replacement transaction underpriced errors. +ReplacementTransactionUnderpriced = '(: |^)replacement transaction underpriced' # Example +# LimitReached is a regex pattern to match against limit reached errors. +LimitReached = '(: |^)limit reached' # Example +# TransactionAlreadyInMempool is a regex pattern to match against transaction already in mempool errors. +TransactionAlreadyInMempool = '(: |^)transaction already in mempool' # Example +# TerminallyUnderpriced is a regex pattern to match against terminally underpriced errors. +TerminallyUnderpriced = '(: |^)terminally underpriced' # Example +# InsufficientEth is a regex pattern to match against insufficient eth errors. +InsufficientEth = '(: |^)insufficeint eth' # Example +# TxFeeExceedsCap is a regex pattern to match against tx fee exceeds cap errors. +TxFeeExceedsCap = '(: |^)tx fee exceeds cap' # Example +# L2FeeTooLow is a regex pattern to match against l2 fee too low errors. +L2FeeTooLow = '(: |^)l2 fee too low' # Example +# L2FeeTooHigh is a regex pattern to match against l2 fee too high errors. +L2FeeTooHigh = '(: |^)l2 fee too high' # Example +# L2Full is a regex pattern to match against l2 full errors. +L2Full = '(: |^)l2 full' # Example +# TransactionAlreadyMined is a regex pattern to match against transaction already mined errors. +TransactionAlreadyMined = '(: |^)transaction already mined' # Example +# Fatal is a regex pattern to match against fatal errors. +Fatal = '(: |^)fatal' # Example +# ServiceUnavailable is a regex pattern to match against service unavailable errors. +ServiceUnavailable = '(: |^)service unavailable' # Example + [EVM.OCR] # ContractConfirmations sets `OCR.ContractConfirmations` for this EVM chain. ContractConfirmations = 4 # Default diff --git a/core/config/docs/docs_test.go b/core/config/docs/docs_test.go index 35a78762e64..8c6429fd0df 100644 --- a/core/config/docs/docs_test.go +++ b/core/config/docs/docs_test.go @@ -84,6 +84,7 @@ func TestDoc(t *testing.T) { require.Empty(t, docDefaults.ChainWriter.ForwarderAddress) docDefaults.ChainWriter.FromAddress = nil docDefaults.ChainWriter.ForwarderAddress = nil + docDefaults.NodePool.Errors = evmcfg.ClientErrors{} assertTOML(t, fallbackDefaults, docDefaults) }) diff --git a/core/config/mocks/telemetry_ingress.go b/core/config/mocks/telemetry_ingress.go index 1a21c89e9ad..fb01cc29cd0 100644 --- a/core/config/mocks/telemetry_ingress.go +++ b/core/config/mocks/telemetry_ingress.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. package mocks diff --git a/core/config/mocks/telemetry_ingress_endpoint.go b/core/config/mocks/telemetry_ingress_endpoint.go index 08432cfe0ee..e5f8c3106eb 100644 --- a/core/config/mocks/telemetry_ingress_endpoint.go +++ b/core/config/mocks/telemetry_ingress_endpoint.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. package mocks diff --git a/core/gethwrappers/generated/automation_registry_wrapper_2_3/automation_registry_wrapper_2_3.go b/core/gethwrappers/generated/automation_registry_wrapper_2_3/automation_registry_wrapper_2_3.go index d648604895b..1edcb07dc6f 100644 --- a/core/gethwrappers/generated/automation_registry_wrapper_2_3/automation_registry_wrapper_2_3.go +++ b/core/gethwrappers/generated/automation_registry_wrapper_2_3/automation_registry_wrapper_2_3.go @@ -65,7 +65,7 @@ type AutomationRegistryBase23OnchainConfig struct { var AutomationRegistryMetaData = &bind.MetaData{ ABI: "[{\"inputs\":[{\"internalType\":\"contractAutomationRegistryLogicA2_3\",\"name\":\"logicA\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"ArrayHasNoEntries\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"CannotCancel\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"CheckDataExceedsLimit\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ConfigDigestMismatch\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"DuplicateEntry\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"DuplicateSigners\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"GasLimitCanOnlyIncrease\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"GasLimitOutsideRange\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"IncorrectNumberOfFaultyOracles\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"IncorrectNumberOfSignatures\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"IncorrectNumberOfSigners\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"IndexOutOfRange\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"available\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"requested\",\"type\":\"uint256\"}],\"name\":\"InsufficientBalance\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InsufficientLinkLiquidity\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidDataLength\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidFeed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidPayee\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidRecipient\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidReport\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidSigner\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidToken\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidTransmitter\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidTrigger\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidTriggerType\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MigrationNotPermitted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MustSettleOffchain\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MustSettleOnchain\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotAContract\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyActiveSigners\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyActiveTransmitters\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyCallableByAdmin\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyCallableByLINKToken\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyCallableByOwnerOrAdmin\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyCallableByOwnerOrRegistrar\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyCallableByPayee\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyCallableByProposedAdmin\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyCallableByProposedPayee\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyCallableByUpkeepPrivilegeManager\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyFinanceAdmin\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyPausedUpkeep\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlySimulatedBackend\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyUnpausedUpkeep\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ParameterLengthError\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ReentrantCall\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RegistryPaused\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RepeatedSigner\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RepeatedTransmitter\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"reason\",\"type\":\"bytes\"}],\"name\":\"TargetCheckReverted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TooManyOracles\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TranscoderNotSet\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TransferFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UpkeepAlreadyExists\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UpkeepCancelled\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UpkeepNotCanceled\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UpkeepNotNeeded\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ValueNotChanged\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAddressNotAllowed\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"privilegeConfig\",\"type\":\"bytes\"}],\"name\":\"AdminPrivilegeConfigSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"uint32\",\"name\":\"gasFeePPB\",\"type\":\"uint32\"},{\"internalType\":\"uint24\",\"name\":\"flatFeeMilliCents\",\"type\":\"uint24\"}],\"indexed\":false,\"internalType\":\"structAutomationRegistryBase2_3.BillingOverrides\",\"name\":\"overrides\",\"type\":\"tuple\"}],\"name\":\"BillingConfigOverridden\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"BillingConfigOverrideRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contractIERC20Metadata\",\"name\":\"token\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"uint32\",\"name\":\"gasFeePPB\",\"type\":\"uint32\"},{\"internalType\":\"uint24\",\"name\":\"flatFeeMilliCents\",\"type\":\"uint24\"},{\"internalType\":\"contractAggregatorV3Interface\",\"name\":\"priceFeed\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"decimals\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"fallbackPrice\",\"type\":\"uint256\"},{\"internalType\":\"uint96\",\"name\":\"minSpend\",\"type\":\"uint96\"}],\"indexed\":false,\"internalType\":\"structAutomationRegistryBase2_3.BillingConfig\",\"name\":\"config\",\"type\":\"tuple\"}],\"name\":\"BillingConfigSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"trigger\",\"type\":\"bytes\"}],\"name\":\"CancelledUpkeepReport\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newModule\",\"type\":\"address\"}],\"name\":\"ChainSpecificModuleUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"previousConfigBlockNumber\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"configDigest\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"configCount\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"signers\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"transmitters\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"f\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"onchainConfig\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"offchainConfigVersion\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"offchainConfig\",\"type\":\"bytes\"}],\"name\":\"ConfigSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"dedupKey\",\"type\":\"bytes32\"}],\"name\":\"DedupKeyAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"assetAddress\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"FeesWithdrawn\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"}],\"name\":\"FundsAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"FundsWithdrawn\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"trigger\",\"type\":\"bytes\"}],\"name\":\"InsufficientFundsUpkeepReport\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"payees\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"payments\",\"type\":\"uint256[]\"}],\"name\":\"NOPsSettledOffchain\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"transmitters\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"payees\",\"type\":\"address[]\"}],\"name\":\"PayeesUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"transmitter\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"PayeeshipTransferRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"transmitter\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"PayeeshipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"transmitter\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"payee\",\"type\":\"address\"}],\"name\":\"PaymentWithdrawn\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"trigger\",\"type\":\"bytes\"}],\"name\":\"ReorgedUpkeepReport\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"trigger\",\"type\":\"bytes\"}],\"name\":\"StaleUpkeepReport\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"configDigest\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"epoch\",\"type\":\"uint32\"}],\"name\":\"Transmitted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"UpkeepAdminTransferRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"UpkeepAdminTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"atBlockHeight\",\"type\":\"uint64\"}],\"name\":\"UpkeepCanceled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"newCheckData\",\"type\":\"bytes\"}],\"name\":\"UpkeepCheckDataSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"gasLimit\",\"type\":\"uint96\"}],\"name\":\"UpkeepGasLimitSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"remainingBalance\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"destination\",\"type\":\"address\"}],\"name\":\"UpkeepMigrated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"offchainConfig\",\"type\":\"bytes\"}],\"name\":\"UpkeepOffchainConfigSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"UpkeepPaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"totalPayment\",\"type\":\"uint96\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"gasUsed\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"gasOverhead\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"trigger\",\"type\":\"bytes\"}],\"name\":\"UpkeepPerformed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"privilegeConfig\",\"type\":\"bytes\"}],\"name\":\"UpkeepPrivilegeConfigSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"startingBalance\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"importedFrom\",\"type\":\"address\"}],\"name\":\"UpkeepReceived\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"performGas\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"}],\"name\":\"UpkeepRegistered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"triggerConfig\",\"type\":\"bytes\"}],\"name\":\"UpkeepTriggerConfigSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"UpkeepUnpaused\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"fallbackTo\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestConfigDetails\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"configCount\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"blockNumber\",\"type\":\"uint32\"},{\"internalType\":\"bytes32\",\"name\":\"configDigest\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestConfigDigestAndEpoch\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"scanLogs\",\"type\":\"bool\"},{\"internalType\":\"bytes32\",\"name\":\"configDigest\",\"type\":\"bytes32\"},{\"internalType\":\"uint32\",\"name\":\"epoch\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"onTokenTransfer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"signers\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"transmitters\",\"type\":\"address[]\"},{\"internalType\":\"uint8\",\"name\":\"f\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"onchainConfigBytes\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"offchainConfigVersion\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"offchainConfig\",\"type\":\"bytes\"}],\"name\":\"setConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"signers\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"transmitters\",\"type\":\"address[]\"},{\"internalType\":\"uint8\",\"name\":\"f\",\"type\":\"uint8\"},{\"components\":[{\"internalType\":\"uint32\",\"name\":\"checkGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxPerformGas\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxCheckDataSize\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"transcoder\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"reorgProtectionEnabled\",\"type\":\"bool\"},{\"internalType\":\"uint24\",\"name\":\"stalenessSeconds\",\"type\":\"uint24\"},{\"internalType\":\"uint32\",\"name\":\"maxPerformDataSize\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"maxRevertDataSize\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"upkeepPrivilegeManager\",\"type\":\"address\"},{\"internalType\":\"uint16\",\"name\":\"gasCeilingMultiplier\",\"type\":\"uint16\"},{\"internalType\":\"address\",\"name\":\"financeAdmin\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"fallbackGasPrice\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fallbackLinkPrice\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fallbackNativePrice\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"registrars\",\"type\":\"address[]\"},{\"internalType\":\"contractIChainModule\",\"name\":\"chainModule\",\"type\":\"address\"}],\"internalType\":\"structAutomationRegistryBase2_3.OnchainConfig\",\"name\":\"onchainConfig\",\"type\":\"tuple\"},{\"internalType\":\"uint64\",\"name\":\"offchainConfigVersion\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"offchainConfig\",\"type\":\"bytes\"},{\"internalType\":\"contractIERC20Metadata[]\",\"name\":\"billingTokens\",\"type\":\"address[]\"},{\"components\":[{\"internalType\":\"uint32\",\"name\":\"gasFeePPB\",\"type\":\"uint32\"},{\"internalType\":\"uint24\",\"name\":\"flatFeeMilliCents\",\"type\":\"uint24\"},{\"internalType\":\"contractAggregatorV3Interface\",\"name\":\"priceFeed\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"decimals\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"fallbackPrice\",\"type\":\"uint256\"},{\"internalType\":\"uint96\",\"name\":\"minSpend\",\"type\":\"uint96\"}],\"internalType\":\"structAutomationRegistryBase2_3.BillingConfig[]\",\"name\":\"billingConfigs\",\"type\":\"tuple[]\"}],\"name\":\"setConfigTypeSafe\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[3]\",\"name\":\"reportContext\",\"type\":\"bytes32[3]\"},{\"internalType\":\"bytes\",\"name\":\"rawReport\",\"type\":\"bytes\"},{\"internalType\":\"bytes32[]\",\"name\":\"rs\",\"type\":\"bytes32[]\"},{\"internalType\":\"bytes32[]\",\"name\":\"ss\",\"type\":\"bytes32[]\"},{\"internalType\":\"bytes32\",\"name\":\"rawVs\",\"type\":\"bytes32\"}],\"name\":\"transmit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"typeAndVersion\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]", - Bin: "0x6101806040523480156200001257600080fd5b50604051620065e2380380620065e283398101604081905262000035916200062f565b80816001600160a01b031663ca30e6036040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000075573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200009b91906200062f565b826001600160a01b031663226cf83c6040518163ffffffff1660e01b8152600401602060405180830381865afa158015620000da573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200010091906200062f565b836001600160a01b031663614486af6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156200013f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200016591906200062f565b846001600160a01b0316636709d0e56040518163ffffffff1660e01b8152600401602060405180830381865afa158015620001a4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001ca91906200062f565b856001600160a01b0316635425d8ac6040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000209573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200022f91906200062f565b866001600160a01b031663a08714c06040518163ffffffff1660e01b8152600401602060405180830381865afa1580156200026e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200029491906200062f565b876001600160a01b031663c5b964e06040518163ffffffff1660e01b8152600401602060405180830381865afa158015620002d3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620002f9919062000656565b886001600160a01b031663ac4dc59a6040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000338573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200035e91906200062f565b3380600081620003b55760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620003e857620003e8816200056b565b5050506001600160a01b0380891660805287811660a05286811660c05285811660e052848116610100528316610120526025805483919060ff19166001838181111562000439576200043962000679565b0217905550806001600160a01b0316610140816001600160a01b03168152505060c0516001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa1580156200049a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620004c091906200068f565b60ff1660a0516001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000504573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200052a91906200068f565b60ff16146200054c576040516301f86e1760e41b815260040160405180910390fd5b5050506001600160a01b039095166101605250620006b4945050505050565b336001600160a01b03821603620005c55760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c660000000000000000006044820152606401620003ac565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b6001600160a01b03811681146200062c57600080fd5b50565b6000602082840312156200064257600080fd5b81516200064f8162000616565b9392505050565b6000602082840312156200066957600080fd5b8151600281106200064f57600080fd5b634e487b7160e01b600052602160045260246000fd5b600060208284031215620006a257600080fd5b815160ff811681146200064f57600080fd5b60805160a05160c05160e05161010051610120516101405161016051615eae620007346000396000818160be015261019101526000505060005050600050506000505060006139a301526000505060008181610db101528181610ebf01528181610fea01528181611034015281816116b601526130ce0152615eae6000f3fe6080604052600436106100bc5760003560e01c80638da5cb5b11610074578063b1dc65a41161004e578063b1dc65a4146102f6578063e3d0e71214610316578063f2fde38b14610336576100bc565b80638da5cb5b14610265578063a4c0ed3614610290578063afcb95d7146102b0576100bc565b8063349e8cca116100a5578063349e8cca1461018257806379ba5097146101d657806381ff7048146101eb576100bc565b80630870d3a114610103578063181f5a7714610123575b7f00000000000000000000000000000000000000000000000000000000000000003660008037600080366000845af43d6000803e8080156100fc573d6000f35b3d6000fd5b005b34801561010f57600080fd5b5061010161011e366004614c23565b610356565b34801561012f57600080fd5b5061016c6040518060400160405280601881526020017f4175746f6d6174696f6e526567697374727920322e332e30000000000000000081525081565b6040516101799190614d9f565b60405180910390f35b34801561018e57600080fd5b507f00000000000000000000000000000000000000000000000000000000000000005b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610179565b3480156101e257600080fd5b50610101610c97565b3480156101f757600080fd5b5061024260175460135463ffffffff74010000000000000000000000000000000000000000830481169378010000000000000000000000000000000000000000000000009093041691565b6040805163ffffffff948516815293909216602084015290820152606001610179565b34801561027157600080fd5b5060005473ffffffffffffffffffffffffffffffffffffffff166101b1565b34801561029c57600080fd5b506101016102ab366004614dfb565b610d99565b3480156102bc57600080fd5b50601354601454604080516000815260208101939093526c0100000000000000000000000090910463ffffffff1690820152606001610179565b34801561030257600080fd5b50610101610311366004614e9c565b6110b5565b34801561032257600080fd5b50610101610331366004614f53565b611396565b34801561034257600080fd5b50610101610351366004615020565b6113d0565b61035e6113e4565b601f8851111561039a576040517f25d0209c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8560ff166000036103d7576040517fe77dba5600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b865188511415806103f657506103ee866003615073565b60ff16885111155b1561042d576040517f1d2d1c5800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8051825114610468576040517fcf54c06a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6104728282611467565b61047c8888611a9f565b604051806101200160405280601460000160009054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff168152602001600063ffffffff1681526020018660a0015162ffffff16815260200186610120015161ffff1681526020018760ff168152602001601460000160169054906101000a900460ff1615158152602001601460000160179054906101000a900460ff1615158152602001866080015115158152602001866101e0015173ffffffffffffffffffffffffffffffffffffffff16815250601460008201518160000160006101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff160217905550602082015181600001600c6101000a81548163ffffffff021916908363ffffffff16021790555060408201518160000160106101000a81548162ffffff021916908362ffffff16021790555060608201518160000160136101000a81548161ffff021916908361ffff16021790555060808201518160000160156101000a81548160ff021916908360ff16021790555060a08201518160000160166101000a81548160ff02191690831515021790555060c08201518160000160176101000a81548160ff02191690831515021790555060e08201518160000160186101000a81548160ff0219169083151502179055506101008201518160010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550905050604051806101600160405280866060015173ffffffffffffffffffffffffffffffffffffffff168152602001866000015163ffffffff168152602001866020015163ffffffff1681526020016016600001601c9054906101000a900463ffffffff1663ffffffff16815260200186610100015173ffffffffffffffffffffffffffffffffffffffff168152602001601660010160149054906101000a900463ffffffff1663ffffffff168152602001601660010160189054906101000a900463ffffffff1663ffffffff168152602001866040015163ffffffff16815260200186610140015173ffffffffffffffffffffffffffffffffffffffff1681526020018660c0015163ffffffff1681526020018660e0015163ffffffff16815250601660008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060208201518160000160146101000a81548163ffffffff021916908363ffffffff16021790555060408201518160000160186101000a81548163ffffffff021916908363ffffffff160217905550606082015181600001601c6101000a81548163ffffffff021916908363ffffffff16021790555060808201518160010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060a08201518160010160146101000a81548163ffffffff021916908363ffffffff16021790555060c08201518160010160186101000a81548163ffffffff021916908363ffffffff16021790555060e082015181600101601c6101000a81548163ffffffff021916908363ffffffff1602179055506101008201518160020160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506101208201518160020160146101000a81548163ffffffff021916908363ffffffff1602179055506101408201518160020160186101000a81548163ffffffff021916908363ffffffff160217905550905050846101600151601981905550846101800151601a81905550846101a00151601b819055506000601660010160189054906101000a900463ffffffff169050856101e0015173ffffffffffffffffffffffffffffffffffffffff166357e871e76040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a82573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610aa6919061508f565b601780547fffffffff00000000ffffffffffffffffffffffffffffffffffffffffffffffff16780100000000000000000000000000000000000000000000000063ffffffff9384160217808255600192601491610b1d918591740100000000000000000000000000000000000000009004166150a8565b92506101000a81548163ffffffff021916908363ffffffff160217905550600086604051602001610b4e9190615116565b604080518083037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0018152919052601754909150610bb3904690309074010000000000000000000000000000000000000000900463ffffffff168d8d8d878d8d612160565b601355600960008181610bc68282614677565b5050505060005b876101c0015151811015610c2057610c0d886101c001518281518110610bf557610bf561529c565b6020026020010151600961220a90919063ffffffff16565b5080610c18816152cb565b915050610bcd565b506013546017546040517f1591690b8638f5fb2dbec82ac741805ac5da8b45dc5263f4875b0496fdce4e0592610c839286927401000000000000000000000000000000000000000090910463ffffffff16908f908f908f9089908f908f90615303565b60405180910390a150505050505050505050565b60015473ffffffffffffffffffffffffffffffffffffffff163314610d1d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e65720000000000000000000060448201526064015b60405180910390fd5b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610e08576040517fc8bad78d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60208114610e42576040517fdfe9309000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000610e5082840184615399565b6000818152600460205260409020549091506601000000000000900463ffffffff90811614610eab576040517f9c0083a200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000818152600460205260409020600201547f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff908116911614610f2f576040517fc1ab6dc100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600081815260046020526040902060010154610f6e90859070010000000000000000000000000000000090046bffffffffffffffffffffffff166153b2565b600082815260046020908152604080832060010180546bffffffffffffffffffffffff95909516700100000000000000000000000000000000027fffffffff000000000000000000000000ffffffffffffffffffffffffffffffff9095169490941790935573ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016825260219052205461101d9085906153d7565b73ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000811660009081526021602090815260409182902093909355516bffffffffffffffffffffffff871681529087169183917fafd24114486da8ebfc32f3626dada8863652e187461aa74d4bfa734891506203910160405180910390a35050505050565b60005a60408051610120810182526014546bffffffffffffffffffffffff8116825263ffffffff6c01000000000000000000000000820416602083015262ffffff7001000000000000000000000000000000008204169282019290925261ffff730100000000000000000000000000000000000000830416606082015260ff75010000000000000000000000000000000000000000008304811660808301527601000000000000000000000000000000000000000000008304811615801560a08401527701000000000000000000000000000000000000000000000084048216151560c0840152780100000000000000000000000000000000000000000000000090930416151560e082015260155473ffffffffffffffffffffffffffffffffffffffff16610100820152919250611219576040517f24522f3400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b336000908152600b602052604090205460ff16611262576040517f1099ed7500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6013548a351461129e576040517fdfdcf8e700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60808101516112ae9060016153ea565b60ff16861415806112bf5750858414155b156112f6576040517f0244f71a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6113068a8a8a8a8a8a8a8a612235565b60006113128a8a61249e565b905060208b0135600881901c63ffffffff1661132f848487612557565b836020015163ffffffff168163ffffffff16111561138757601480547fffffffffffffffffffffffffffffffff00000000ffffffffffffffffffffffff166c0100000000000000000000000063ffffffff8416021790555b50505050505050505050505050565b6000806000858060200190518101906113af91906155d4565b9250925092506113c58989898689898888610356565b505050505050505050565b6113d86113e4565b6113e181613144565b50565b60005473ffffffffffffffffffffffffffffffffffffffff163314611465576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e6572000000000000000000006044820152606401610d14565b565b60005b60245481101561152557602260006024838154811061148b5761148b61529c565b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff168352820192909252604001812080547fffffffff00000000000000000000000000000000000000000000000000000000168155600181019190915560020180547fffffffffffffffffffffffffffffffffffffffff0000000000000000000000001690558061151d816152cb565b91505061146a565b5061153260246000614677565b60255460ff1660005b8351811015611a995760008482815181106115585761155861529c565b6020026020010151905060008483815181106115765761157661529c565b602002602001015190508173ffffffffffffffffffffffffffffffffffffffff1663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa1580156115cb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115ef919061577f565b60ff16816060015160ff1614158061167d5750806040015173ffffffffffffffffffffffffffffffffffffffff1663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015611651573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611675919061577f565b60ff16600814155b156116b4576040517fc1ab6dc100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161480156117205750600184600181111561171e5761171e61579c565b145b15611757576040517fc1ab6dc100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff821615806117925750604081015173ffffffffffffffffffffffffffffffffffffffff16155b156117c9576040517f8579befe00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff82811660009081526022602052604090205467010000000000000090041615611833576040517f357d0cc400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6024805460018181019092557f7cd332d19b93bcabe3cce7ca0c18a052f57e5fd03b4758a09f30f5ddc4b22ec401805473ffffffffffffffffffffffffffffffffffffffff8086167fffffffffffffffffffffffff0000000000000000000000000000000000000000909216821790925560008181526022602090815260409182902086518154928801518489015160608a015160ff167b01000000000000000000000000000000000000000000000000000000027fffffffff00ffffffffffffffffffffffffffffffffffffffffffffffffffffff9190981667010000000000000002167fffffffff000000000000000000000000000000000000000000ffffffffffffff62ffffff909216640100000000027fffffffffffffffffffffffffffffffffffffffffffffffffff0000000000000090951663ffffffff9093169290921793909317929092169190911793909317835560808501519383019390935560a0840151600290920180546bffffffffffffffffffffffff9093167fffffffffffffffffffffffffffffffffffffffff0000000000000000000000009093169290921790915590517fca93cbe727c73163ec538f71be6c0a64877d7f1f6dd35d5ca7cbaef3a3e34ba390611a7c908490600060c08201905063ffffffff835116825262ffffff602084015116602083015273ffffffffffffffffffffffffffffffffffffffff604084015116604083015260ff6060840151166060830152608083015160808301526bffffffffffffffffffffffff60a08401511660a083015292915050565b60405180910390a250508080611a91906152cb565b91505061153b565b50505050565b60005b600e54811015611b1657611b03600e8281548110611ac257611ac261529c565b600091825260209091200154601454600e5473ffffffffffffffffffffffffffffffffffffffff909216916bffffffffffffffffffffffff90911690613239565b5080611b0e816152cb565b915050611aa2565b5060255460009060ff16815b600e54811015611c8757600e8181548110611b3f57611b3f61529c565b6000918252602082200154600d805473ffffffffffffffffffffffffffffffffffffffff9092169550600c929184908110611b7c57611b7c61529c565b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff9081168452838201949094526040928301822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00001690559286168152600b909252902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690556001826001811115611c1e57611c1e61579c565b148015611c63575073ffffffffffffffffffffffffffffffffffffffff83166000908152600b60205260409020546201000090046bffffffffffffffffffffffff1615155b15611c7557611c73600f8461220a565b505b80611c7f816152cb565b915050611b22565b50611c94600d6000614677565b611ca0600e6000614677565b6040805160808101825260008082526020820181905291810182905260608101829052905b855181101561213057600c6000878381518110611ce457611ce461529c565b60209081029190910181015173ffffffffffffffffffffffffffffffffffffffff1682528101919091526040016000205460ff1615611d4f576040517f77cea0fa00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16868281518110611d7957611d7961529c565b602002602001015173ffffffffffffffffffffffffffffffffffffffff1603611dce576040517f815e1d6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60405180604001604052806001151581526020018260ff16815250600c6000888481518110611dff57611dff61529c565b60209081029190910181015173ffffffffffffffffffffffffffffffffffffffff1682528181019290925260400160002082518154939092015160ff16610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff921515929092167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000909316929092171790558451859082908110611ea757611ea761529c565b60200260200101519350600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1603611f17576040517f58a70a0a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff84166000908152600b60209081526040918290208251608081018452905460ff80821615801584526101008304909116938301939093526bffffffffffffffffffffffff6201000082048116948301949094526e01000000000000000000000000000090049092166060830152909250611fd2576040517f6a7281ad00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600180835260ff80831660208086019182526014546bffffffffffffffffffffffff9081166060880190815273ffffffffffffffffffffffffffffffffffffffff8a166000908152600b909352604092839020885181549551948a0151925184166e010000000000000000000000000000027fffffffffffff000000000000000000000000ffffffffffffffffffffffffffff939094166201000002929092167fffffffffffff000000000000000000000000000000000000000000000000ffff94909616610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff921515929092167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00009095169490941717919091169290921791909117905583600181111561210c5761210c61579c565b0361211e5761211c600f85613441565b505b80612128816152cb565b915050611cc5565b50845161214490600d906020880190614695565b50835161215890600e906020870190614695565b505050505050565b6000808a8a8a8a8a8a8a8a8a604051602001612184999897969594939291906157cb565b604080518083037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe001815291905280516020909101207dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff167e01000000000000000000000000000000000000000000000000000000000000179b9a5050505050505050505050565b600061222c8373ffffffffffffffffffffffffffffffffffffffff8416613463565b90505b92915050565b60008787604051612247929190615860565b60405190819003812061225e918b90602001615870565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815282825280516020918201208383019092526000808452908301819052909250906000805b88811015612435576001858783602081106122ca576122ca61529c565b6122d791901a601b6153ea565b8c8c858181106122e9576122e961529c565b905060200201358b8b868181106123025761230261529c565b905060200201356040516000815260200160405260405161233f949392919093845260ff9290921660208401526040830152606082015260800190565b6020604051602081039080840390855afa158015612361573d6000803e3d6000fd5b5050604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081015173ffffffffffffffffffffffffffffffffffffffff81166000908152600c602090815290849020838501909452925460ff808216151580855261010090920416938301939093529095509350905061240f576040517f0f4c073700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b826020015160080260ff166001901b84019350808061242d906152cb565b9150506122ad565b50827e01010101010101010101010101010101010101010101010101010101010101841614612490576040517fc103be2e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505050505050505050505050565b6124d76040518060c001604052806000815260200160008152602001606081526020016060815260200160608152602001606081525090565b60006124e583850185615961565b604081015151606082015151919250908114158061250857508082608001515114155b806125185750808260a001515114155b1561254f576040517fb55ac75400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b509392505050565b600082604001515167ffffffffffffffff8111156125775761257761472c565b60405190808252806020026020018201604052801561264357816020015b6040805161020081018252600060e08201818152610100830182905261012083018290526101408301829052610160830182905261018083018290526101a083018290526101c083018290526101e0830182905282526020808301829052928201819052606082018190526080820181905260a0820181905260c082015282527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9092019101816125955790505b50905060006040518060800160405280600061ffff16815260200160006bffffffffffffffffffffffff16815260200160006bffffffffffffffffffffffff16815260200160008152509050600085610100015173ffffffffffffffffffffffffffffffffffffffff166357e871e76040518163ffffffff1660e01b8152600401602060405180830381865afa1580156126e1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612705919061508f565b9050600086610100015173ffffffffffffffffffffffffffffffffffffffff166318b8f6136040518163ffffffff1660e01b8152600401602060405180830381865afa158015612759573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061277d919061508f565b905060005b866040015151811015612c0d5760046000886040015183815181106127a9576127a961529c565b6020908102919091018101518252818101929092526040908101600020815161012081018352815460ff8082161515835261010080830490911615159583019590955263ffffffff620100008204811694830194909452660100000000000081048416606083015273ffffffffffffffffffffffffffffffffffffffff6a01000000000000000000009091048116608083015260018301546fffffffffffffffffffffffffffffffff811660a08401526bffffffffffffffffffffffff70010000000000000000000000000000000082041660c08401527c0100000000000000000000000000000000000000000000000000000000900490931660e08201526002909101549091169181019190915285518690839081106128cc576128cc61529c565b602002602001015160000181905250612901876040015182815181106128f4576128f461529c565b60200260200101516134b2565b8582815181106129135761291361529c565b60200260200101516060019060018111156129305761293061579c565b908160018111156129435761294361579c565b815250506129a7876040015182815181106129605761296061529c565b6020026020010151848960800151848151811061297f5761297f61529c565b60200260200101518885815181106129995761299961529c565b60200260200101518c61355d565b8683815181106129b9576129b961529c565b60200260200101516020018784815181106129d6576129d661529c565b602002602001015160c0018281525082151515158152505050848181518110612a0157612a0161529c565b60200260200101516020015115612a3157600184600001818151612a259190615a4e565b61ffff16905250612a36565b612bfb565b612a9c858281518110612a4b57612a4b61529c565b6020026020010151600001516080015188606001518381518110612a7157612a7161529c565b60200260200101518960a001518481518110612a8f57612a8f61529c565b602002602001015161367c565b868381518110612aae57612aae61529c565b6020026020010151604001878481518110612acb57612acb61529c565b6020026020010151608001828152508215151515815250505087608001516001612af591906153ea565b612b039060ff166040615a69565b6103a48860a001518381518110612b1c57612b1c61529c565b602002602001015151612b2f91906153d7565b612b3991906153d7565b858281518110612b4b57612b4b61529c565b602002602001015160a0018181525050848181518110612b6d57612b6d61529c565b602002602001015160a0015184606001818151612b8a91906153d7565b9052508451859082908110612ba157612ba161529c565b60200260200101516080015186612bb89190615a80565b9550612bfb87604001518281518110612bd357612bd361529c565b602002602001015184878481518110612bee57612bee61529c565b6020026020010151613897565b80612c05816152cb565b915050612782565b50825161ffff16600003612c245750505050505050565b61c800612c32366010615a69565b5a612c3d9088615a80565b612c4791906153d7565b612c5191906153d7565b83519095506123f090612c689061ffff1687615ac2565b612c7291906153d7565b6040805160808101825260008082526020820181905291810182905260608101829052919650612ca18961399c565b905060005b886040015151811015612fdd57868181518110612cc557612cc561529c565b60200260200101516020015115612fcb57801580612d5d575086612cea600183615a80565b81518110612cfa57612cfa61529c565b602002602001015160000151610100015173ffffffffffffffffffffffffffffffffffffffff16878281518110612d3357612d3361529c565b602002602001015160000151610100015173ffffffffffffffffffffffffffffffffffffffff1614155b15612d9157612d8e8a888381518110612d7857612d7861529c565b6020026020010151600001516101000151613a8d565b92505b6000612eaf8b6040518061012001604052808b8681518110612db557612db561529c565b60200260200101516080015181526020018c81526020018a606001518c8781518110612de357612de361529c565b602002602001015160a001518a612dfa9190615a69565b612e049190615ac2565b81526020018d6000015181526020018d6020015181526020018681526020018b8681518110612e3557612e3561529c565b602002602001015160000151610100015173ffffffffffffffffffffffffffffffffffffffff168152602001878152602001600115158152508c604001518581518110612e8457612e8461529c565b60200260200101518b8681518110612e9e57612e9e61529c565b602002602001015160000151613c09565b9050806060015187604001818151612ec791906153b2565b6bffffffffffffffffffffffff169052506040810151602088018051612eee9083906153b2565b6bffffffffffffffffffffffff169052508751889083908110612f1357612f1361529c565b60200260200101516040015115158a604001518381518110612f3757612f3761529c565b60200260200101517fad8cc9579b21dfe2c2f6ea35ba15b656e46b4f5b0cb424f52739b8ce5cac9c5b83606001518460400151612f7491906153b2565b8b8681518110612f8657612f8661529c565b6020026020010151608001518d8f608001518881518110612fa957612fa961529c565b6020026020010151604051612fc19493929190615ad6565b60405180910390a3505b80612fd5816152cb565b915050612ca6565b505050602083810151336000908152600b9092526040909120805460029061301a9084906201000090046bffffffffffffffffffffffff166153b2565b92506101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055508260400151601460000160008282829054906101000a90046bffffffffffffffffffffffff1661307891906153b2565b92506101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff160217905550826040015183602001516130ba91906153b2565b6bffffffffffffffffffffffff16602160007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461313691906153d7565b909155505050505050505050565b3373ffffffffffffffffffffffffffffffffffffffff8216036131c3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c660000000000000000006044820152606401610d14565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b73ffffffffffffffffffffffffffffffffffffffff83166000908152600b602090815260408083208151608081018352905460ff80821615801584526101008304909116948301949094526bffffffffffffffffffffffff6201000082048116938301939093526e01000000000000000000000000000090049091166060820152906134355760008160600151856132d19190615b13565b905060006132df8583615b38565b905080836040018181516132f391906153b2565b6bffffffffffffffffffffffff1690525061330e8582615b63565b8360600181815161331f91906153b2565b6bffffffffffffffffffffffff90811690915273ffffffffffffffffffffffffffffffffffffffff89166000908152600b602090815260409182902087518154928901519389015160608a015186166e010000000000000000000000000000027fffffffffffff000000000000000000000000ffffffffffffffffffffffffffff919096166201000002167fffffffffffff000000000000000000000000000000000000000000000000ffff60ff95909516610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff921515929092167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000909416939093171792909216179190911790555050505b60400151949350505050565b600061222c8373ffffffffffffffffffffffffffffffffffffffff8416613f05565b60008181526001830160205260408120546134aa5750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915561222f565b50600061222f565b6000818160045b600f81101561353f577fff0000000000000000000000000000000000000000000000000000000000000082168382602081106134f7576134f761529c565b1a60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161461352d57506000949350505050565b80613537816152cb565b9150506134b9565b5081600f1a60018111156135555761355561579c565b949350505050565b6000808080856060015160018111156135785761357861579c565b0361359e5761358a8888888888613ff8565b61359957600092509050613672565b613616565b6001856060015160018111156135b6576135b661579c565b036135e45760006135c989898988614182565b92509050806135de5750600092509050613672565b50613616565b6040517ff2b2d41200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b84516060015163ffffffff16871061366b57877fc3237c8807c467c1b39b8d0395eff077313e691bf0a7388106792564ebfd5636876040516136589190614d9f565b60405180910390a2600092509050613672565b6001925090505b9550959350505050565b601454600090819077010000000000000000000000000000000000000000000000900460ff16156136d9576040517f37ed32e800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b601480547fffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffffffff16770100000000000000000000000000000000000000000000001790556040517f4585e33b000000000000000000000000000000000000000000000000000000009061374e908590602401614d9f565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009094169390931790925290517f79188d1600000000000000000000000000000000000000000000000000000000815290935073ffffffffffffffffffffffffffffffffffffffff8616906379188d16906138219087908790600401615b93565b60408051808303816000875af115801561383f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906138639190615bac565b601480547fffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffffffff16905590969095509350505050565b6000816060015160018111156138af576138af61579c565b0361391357600083815260046020526040902060010180547bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167c010000000000000000000000000000000000000000000000000000000063ffffffff851602179055505050565b60018160600151600181111561392b5761392b61579c565b036139975760c08101805160009081526008602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055915191517fa4a4e334c0e330143f9437484fe516c13bc560b86b5b0daf58e7084aaac228f29190a25b505050565b60008060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa158015613a0c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613a309190615bf4565b50935050925050600082131580613a4657508042105b80613a7657506000846040015162ffffff16118015613a765750613a6a8142615a80565b846040015162ffffff16105b15613a86575050601b5492915050565b5092915050565b60408051608081018252600080825260208083018281528385018381526060850184905273ffffffffffffffffffffffffffffffffffffffff878116855260229093528584208054640100000000810462ffffff1690925263ffffffff82169092527b01000000000000000000000000000000000000000000000000000000810460ff16855285517ffeaf968c00000000000000000000000000000000000000000000000000000000815295519495919484936701000000000000009092049091169163feaf968c9160048083019260a09291908290030181865afa158015613b7a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613b9e9190615bf4565b50935050925050600082131580613bb457508042105b80613be457506000866040015162ffffff16118015613be45750613bd88142615a80565b866040015162ffffff16105b15613bf85760018301546060850152613c00565b606084018290525b50505092915050565b604080516080810182526000808252602080830182905292820181905260608201529082015115613c825760008381526023602090815260409182902082518084018452905463ffffffff811680835262ffffff640100000000909204821692840192835260e089018051909401529051915191169101525b6000613c8e868661438f565b60c0840151602082015182519293509091600091613cab916153b2565b905082600001516bffffffffffffffffffffffff16826bffffffffffffffffffffffff161015613d3057819050613d1187608001518860e0015160600151846bffffffffffffffffffffffff16613d029190615a69565b613d0c9190615ac2565b6145d5565b6bffffffffffffffffffffffff16604084015260006060840152613dbc565b806bffffffffffffffffffffffff16826bffffffffffffffffffffffff161015613dbc57819050613da883604001516bffffffffffffffffffffffff1688608001518960e0015160600151856bffffffffffffffffffffffff16613d949190615a69565b613d9e9190615ac2565b613d0c9190615a80565b6bffffffffffffffffffffffff1660608401525b60008681526004602052604090206001018054829190601090613e0290849070010000000000000000000000000000000090046bffffffffffffffffffffffff16615b13565b82546101009290920a6bffffffffffffffffffffffff81810219909316918316021790915560008881526004602052604081206001018054928516935091613e5d9084906fffffffffffffffffffffffffffffffff16615c44565b92506101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff160217905550806bffffffffffffffffffffffff16602160008960c0015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254613ef49190615a80565b909155509298975050505050505050565b60008181526001830160205260408120548015613fee576000613f29600183615a80565b8554909150600090613f3d90600190615a80565b9050818114613fa2576000866000018281548110613f5d57613f5d61529c565b9060005260206000200154905080876000018481548110613f8057613f8061529c565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080613fb357613fb3615c6d565b60019003818190600052602060002001600090559055856001016000868152602001908152602001600020600090556001935050505061222f565b600091505061222f565b6000808480602001905181019061400f9190615c9c565b845160e00151815191925063ffffffff9081169116101561406c57867f405288ea7be309e16cfdf481367f90a413e1d4634fcdaf8966546db9b93012e88660405161405a9190614d9f565b60405180910390a26000915050614179565b8260e00151801561412c575060208101511580159061412c5750602081015161010084015182516040517f85df51fd00000000000000000000000000000000000000000000000000000000815263ffffffff909116600482015273ffffffffffffffffffffffffffffffffffffffff909116906385df51fd90602401602060405180830381865afa158015614105573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614129919061508f565b14155b8061413e5750805163ffffffff168611155b1561417357867f6aa7f60c176da7af894b384daea2249497448137f5943c1237ada8bc92bdc3018660405161405a9190614d9f565b60019150505b95945050505050565b60008060008480602001905181019061419b9190615cf4565b90506000878260000151836020015184604001516040516020016141fd94939291909384526020840192909252604083015260e01b7fffffffff0000000000000000000000000000000000000000000000000000000016606082015260640190565b6040516020818303038152906040528051906020012090508460e0015180156142d857506080820151158015906142d85750608082015161010086015160608401516040517f85df51fd00000000000000000000000000000000000000000000000000000000815263ffffffff909116600482015273ffffffffffffffffffffffffffffffffffffffff909116906385df51fd90602401602060405180830381865afa1580156142b1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906142d5919061508f565b14155b806142ed575086826060015163ffffffff1610155b1561433757877f6aa7f60c176da7af894b384daea2249497448137f5943c1237ada8bc92bdc301876040516143229190614d9f565b60405180910390a26000935091506143869050565b60008181526008602052604090205460ff161561437e57877f405288ea7be309e16cfdf481367f90a413e1d4634fcdaf8966546db9b93012e8876040516143229190614d9f565b600193509150505b94509492505050565b60408051608081018252600080825260208201819052918101829052606081019190915260008260e001516000015160ff1690506000846060015161ffff1684606001516143dd9190615a69565b905083610100015180156143f05750803a105b156143f857503a5b60006012831161440957600161441f565b614414601284615a80565b61441f90600a615e95565b9050600060128410614432576001614448565b61443d846012615a80565b61444890600a615e95565b905060008660a0015187604001518860200151896000015161446a91906153d7565b6144749087615a69565b61447e91906153d7565b6144889190615a69565b90506144ab828860e00151606001516144a19190615a69565b613d028584615a69565b6bffffffffffffffffffffffff16865260808701516144ce90613d0c9083615ac2565b6bffffffffffffffffffffffff1660408088019190915260e088015101516000906145079062ffffff16683635c9adc5dea00000615a69565b9050600081633b9aca008a60a001518b60e001516020015163ffffffff168c604001518d600001518b61453a9190615a69565b61454491906153d7565b61454e9190615a69565b6145589190615a69565b6145629190615ac2565b61456c91906153d7565b905061458f848a60e00151606001516145859190615a69565b613d028784615a69565b6bffffffffffffffffffffffff16602089015260808901516145b590613d0c9083615ac2565b6bffffffffffffffffffffffff1660608901525050505050505092915050565b60006bffffffffffffffffffffffff821115614673576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203960448201527f36206269747300000000000000000000000000000000000000000000000000006064820152608401610d14565b5090565b50805460008255906000526020600020908101906113e19190614717565b82805482825590600052602060002090810192821561470f579160200282015b8281111561470f57825182547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff9091161782556020909201916001909101906146b5565b506146739291505b5b808211156146735760008155600101614718565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051610200810167ffffffffffffffff8111828210171561477f5761477f61472c565b60405290565b60405160c0810167ffffffffffffffff8111828210171561477f5761477f61472c565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff811182821017156147ef576147ef61472c565b604052919050565b600067ffffffffffffffff8211156148115761481161472c565b5060051b60200190565b73ffffffffffffffffffffffffffffffffffffffff811681146113e157600080fd5b80356148488161481b565b919050565b600082601f83011261485e57600080fd5b8135602061487361486e836147f7565b6147a8565b82815260059290921b8401810191818101908684111561489257600080fd5b8286015b848110156148b65780356148a98161481b565b8352918301918301614896565b509695505050505050565b60ff811681146113e157600080fd5b8035614848816148c1565b63ffffffff811681146113e157600080fd5b8035614848816148db565b80151581146113e157600080fd5b8035614848816148f8565b62ffffff811681146113e157600080fd5b803561484881614911565b61ffff811681146113e157600080fd5b80356148488161492d565b6000610200828403121561495b57600080fd5b61496361475b565b905061496e826148ed565b815261497c602083016148ed565b602082015261498d604083016148ed565b604082015261499e6060830161483d565b60608201526149af60808301614906565b60808201526149c060a08301614922565b60a08201526149d160c083016148ed565b60c08201526149e260e083016148ed565b60e08201526101006149f581840161483d565b90820152610120614a0783820161493d565b90820152610140614a1983820161483d565b90820152610160828101359082015261018080830135908201526101a080830135908201526101c08083013567ffffffffffffffff811115614a5a57600080fd5b614a668582860161484d565b8284015250506101e0614a7a81840161483d565b9082015292915050565b803567ffffffffffffffff8116811461484857600080fd5b600082601f830112614aad57600080fd5b813567ffffffffffffffff811115614ac757614ac761472c565b614af860207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116016147a8565b818152846020838601011115614b0d57600080fd5b816020850160208301376000918101602001919091529392505050565b6bffffffffffffffffffffffff811681146113e157600080fd5b600082601f830112614b5557600080fd5b81356020614b6561486e836147f7565b82815260c09283028501820192828201919087851115614b8457600080fd5b8387015b85811015614c165781818a031215614ba05760008081fd5b614ba8614785565b8135614bb3816148db565b815281860135614bc281614911565b81870152604082810135614bd58161481b565b90820152606082810135614be8816148c1565b908201526080828101359082015260a080830135614c0581614b2a565b908201528452928401928101614b88565b5090979650505050505050565b600080600080600080600080610100898b031215614c4057600080fd5b883567ffffffffffffffff80821115614c5857600080fd5b614c648c838d0161484d565b995060208b0135915080821115614c7a57600080fd5b614c868c838d0161484d565b9850614c9460408c016148d0565b975060608b0135915080821115614caa57600080fd5b614cb68c838d01614948565b9650614cc460808c01614a84565b955060a08b0135915080821115614cda57600080fd5b614ce68c838d01614a9c565b945060c08b0135915080821115614cfc57600080fd5b614d088c838d0161484d565b935060e08b0135915080821115614d1e57600080fd5b50614d2b8b828c01614b44565b9150509295985092959890939650565b6000815180845260005b81811015614d6157602081850181015186830182015201614d45565b5060006020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b60208152600061222c6020830184614d3b565b60008083601f840112614dc457600080fd5b50813567ffffffffffffffff811115614ddc57600080fd5b602083019150836020828501011115614df457600080fd5b9250929050565b60008060008060608587031215614e1157600080fd5b8435614e1c8161481b565b935060208501359250604085013567ffffffffffffffff811115614e3f57600080fd5b614e4b87828801614db2565b95989497509550505050565b60008083601f840112614e6957600080fd5b50813567ffffffffffffffff811115614e8157600080fd5b6020830191508360208260051b8501011115614df457600080fd5b60008060008060008060008060e0898b031215614eb857600080fd5b606089018a811115614ec957600080fd5b8998503567ffffffffffffffff80821115614ee357600080fd5b614eef8c838d01614db2565b909950975060808b0135915080821115614f0857600080fd5b614f148c838d01614e57565b909750955060a08b0135915080821115614f2d57600080fd5b50614f3a8b828c01614e57565b999c989b50969995989497949560c00135949350505050565b60008060008060008060c08789031215614f6c57600080fd5b863567ffffffffffffffff80821115614f8457600080fd5b614f908a838b0161484d565b97506020890135915080821115614fa657600080fd5b614fb28a838b0161484d565b9650614fc060408a016148d0565b95506060890135915080821115614fd657600080fd5b614fe28a838b01614a9c565b9450614ff060808a01614a84565b935060a089013591508082111561500657600080fd5b5061501389828a01614a9c565b9150509295509295509295565b60006020828403121561503257600080fd5b813561503d8161481b565b9392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60ff8181168382160290811690818114613a8657613a86615044565b6000602082840312156150a157600080fd5b5051919050565b63ffffffff818116838216019080821115613a8657613a86615044565b600081518084526020808501945080840160005b8381101561510b57815173ffffffffffffffffffffffffffffffffffffffff16875295820195908201906001016150d9565b509495945050505050565b6020815261512d60208201835163ffffffff169052565b60006020830151615146604084018263ffffffff169052565b50604083015163ffffffff8116606084015250606083015173ffffffffffffffffffffffffffffffffffffffff8116608084015250608083015180151560a08401525060a083015162ffffff811660c08401525060c083015163ffffffff811660e08401525060e08301516101006151c58185018363ffffffff169052565b84015190506101206151ee8482018373ffffffffffffffffffffffffffffffffffffffff169052565b84015190506101406152058482018361ffff169052565b840151905061016061522e8482018373ffffffffffffffffffffffffffffffffffffffff169052565b840151610180848101919091528401516101a0808501919091528401516101c0808501919091528401516102006101e0808601829052919250906152766102208601846150c5565b95015173ffffffffffffffffffffffffffffffffffffffff169301929092525090919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036152fc576152fc615044565b5060010190565b600061012063ffffffff808d1684528b6020850152808b166040850152508060608401526153338184018a6150c5565b9050828103608084015261534781896150c5565b905060ff871660a084015282810360c08401526153648187614d3b565b905067ffffffffffffffff851660e08401528281036101008401526153898185614d3b565b9c9b505050505050505050505050565b6000602082840312156153ab57600080fd5b5035919050565b6bffffffffffffffffffffffff818116838216019080821115613a8657613a86615044565b8082018082111561222f5761222f615044565b60ff818116838216019081111561222f5761222f615044565b8051614848816148db565b80516148488161481b565b8051614848816148f8565b805161484881614911565b80516148488161492d565b600082601f83011261544b57600080fd5b8151602061545b61486e836147f7565b82815260059290921b8401810191818101908684111561547a57600080fd5b8286015b848110156148b65780516154918161481b565b835291830191830161547e565b600082601f8301126154af57600080fd5b815160206154bf61486e836147f7565b82815260059290921b840181019181810190868411156154de57600080fd5b8286015b848110156148b65780516154f58161481b565b83529183019183016154e2565b600082601f83011261551357600080fd5b8151602061552361486e836147f7565b82815260c0928302850182019282820191908785111561554257600080fd5b8387015b85811015614c165781818a03121561555e5760008081fd5b615566614785565b8151615571816148db565b81528186015161558081614911565b818701526040828101516155938161481b565b908201526060828101516155a6816148c1565b908201526080828101519082015260a0808301516155c381614b2a565b908201528452928401928101615546565b6000806000606084860312156155e957600080fd5b835167ffffffffffffffff8082111561560157600080fd5b90850190610200828803121561561657600080fd5b61561e61475b565b61562783615403565b815261563560208401615403565b602082015261564660408401615403565b60408201526156576060840161540e565b606082015261566860808401615419565b608082015261567960a08401615424565b60a082015261568a60c08401615403565b60c082015261569b60e08401615403565b60e08201526101006156ae81850161540e565b908201526101206156c084820161542f565b908201526101406156d284820161540e565b90820152610160838101519082015261018080840151908201526101a080840151908201526101c0808401518381111561570b57600080fd5b6157178a82870161543a565b8284015250506101e061572b81850161540e565b90820152602087015190955091508082111561574657600080fd5b6157528783880161549e565b9350604086015191508082111561576857600080fd5b5061577586828701615502565b9150509250925092565b60006020828403121561579157600080fd5b815161503d816148c1565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b60006101208b835273ffffffffffffffffffffffffffffffffffffffff8b16602084015267ffffffffffffffff808b1660408501528160608501526158128285018b6150c5565b91508382036080850152615826828a6150c5565b915060ff881660a085015283820360c08501526158438288614d3b565b90861660e085015283810361010085015290506153898185614d3b565b8183823760009101908152919050565b8281526080810160608360208401379392505050565b600082601f83011261589757600080fd5b813560206158a761486e836147f7565b82815260059290921b840181019181810190868411156158c657600080fd5b8286015b848110156148b657803583529183019183016158ca565b600082601f8301126158f257600080fd5b8135602061590261486e836147f7565b82815260059290921b8401810191818101908684111561592157600080fd5b8286015b848110156148b657803567ffffffffffffffff8111156159455760008081fd5b6159538986838b0101614a9c565b845250918301918301615925565b60006020828403121561597357600080fd5b813567ffffffffffffffff8082111561598b57600080fd5b9083019060c0828603121561599f57600080fd5b6159a7614785565b82358152602083013560208201526040830135828111156159c757600080fd5b6159d387828601615886565b6040830152506060830135828111156159eb57600080fd5b6159f787828601615886565b606083015250608083013582811115615a0f57600080fd5b615a1b878286016158e1565b60808301525060a083013582811115615a3357600080fd5b615a3f878286016158e1565b60a08301525095945050505050565b61ffff818116838216019080821115613a8657613a86615044565b808202811582820484141761222f5761222f615044565b8181038181111561222f5761222f615044565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600082615ad157615ad1615a93565b500490565b6bffffffffffffffffffffffff85168152836020820152826040820152608060608201526000615b096080830184614d3b565b9695505050505050565b6bffffffffffffffffffffffff828116828216039080821115613a8657613a86615044565b60006bffffffffffffffffffffffff80841680615b5757615b57615a93565b92169190910492915050565b6bffffffffffffffffffffffff818116838216028082169190828114615b8b57615b8b615044565b505092915050565b8281526040602082015260006135556040830184614d3b565b60008060408385031215615bbf57600080fd5b8251615bca816148f8565b6020939093015192949293505050565b805169ffffffffffffffffffff8116811461484857600080fd5b600080600080600060a08688031215615c0c57600080fd5b615c1586615bda565b9450602086015193506040860151925060608601519150615c3860808701615bda565b90509295509295909350565b6fffffffffffffffffffffffffffffffff818116838216019080821115613a8657613a86615044565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b600060408284031215615cae57600080fd5b6040516040810181811067ffffffffffffffff82111715615cd157615cd161472c565b6040528251615cdf816148db565b81526020928301519281019290925250919050565b600060a08284031215615d0657600080fd5b60405160a0810181811067ffffffffffffffff82111715615d2957615d2961472c565b806040525082518152602083015160208201526040830151615d4a816148db565b60408201526060830151615d5d816148db565b60608201526080928301519281019290925250919050565b600181815b80851115615dce57817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04821115615db457615db4615044565b80851615615dc157918102915b93841c9390800290615d7a565b509250929050565b600082615de55750600161222f565b81615df25750600061222f565b8160018114615e085760028114615e1257615e2e565b600191505061222f565b60ff841115615e2357615e23615044565b50506001821b61222f565b5060208310610133831016604e8410600b8410161715615e51575081810a61222f565b615e5b8383615d75565b807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04821115615e8d57615e8d615044565b029392505050565b600061222c8383615dd656fea164736f6c6343000813000a", + Bin: "0x6101806040523480156200001257600080fd5b506040516200668a3803806200668a83398101604081905262000035916200062f565b80816001600160a01b031663ca30e6036040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000075573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200009b91906200062f565b826001600160a01b031663226cf83c6040518163ffffffff1660e01b8152600401602060405180830381865afa158015620000da573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200010091906200062f565b836001600160a01b031663614486af6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156200013f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200016591906200062f565b846001600160a01b0316636709d0e56040518163ffffffff1660e01b8152600401602060405180830381865afa158015620001a4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001ca91906200062f565b856001600160a01b0316635425d8ac6040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000209573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200022f91906200062f565b866001600160a01b031663a08714c06040518163ffffffff1660e01b8152600401602060405180830381865afa1580156200026e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200029491906200062f565b876001600160a01b031663c5b964e06040518163ffffffff1660e01b8152600401602060405180830381865afa158015620002d3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620002f9919062000656565b886001600160a01b031663ac4dc59a6040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000338573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200035e91906200062f565b3380600081620003b55760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620003e857620003e8816200056b565b5050506001600160a01b0380891660805287811660a05286811660c05285811660e052848116610100528316610120526025805483919060ff19166001838181111562000439576200043962000679565b0217905550806001600160a01b0316610140816001600160a01b03168152505060c0516001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa1580156200049a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620004c091906200068f565b60ff1660a0516001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000504573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200052a91906200068f565b60ff16146200054c576040516301f86e1760e41b815260040160405180910390fd5b5050506001600160a01b039095166101605250620006b4945050505050565b336001600160a01b03821603620005c55760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c660000000000000000006044820152606401620003ac565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b6001600160a01b03811681146200062c57600080fd5b50565b6000602082840312156200064257600080fd5b81516200064f8162000616565b9392505050565b6000602082840312156200066957600080fd5b8151600281106200064f57600080fd5b634e487b7160e01b600052602160045260246000fd5b600060208284031215620006a257600080fd5b815160ff811681146200064f57600080fd5b60805160a05160c05160e05161010051610120516101405161016051615f56620007346000396000818160be01526101910152600050506000505060005050600050506000613b1701526000505060008181610de701528181610ef5015281816110200152818161106a015281816116ec01526131400152615f566000f3fe6080604052600436106100bc5760003560e01c80638da5cb5b11610074578063b1dc65a41161004e578063b1dc65a4146102f6578063e3d0e71214610316578063f2fde38b14610336576100bc565b80638da5cb5b14610265578063a4c0ed3614610290578063afcb95d7146102b0576100bc565b8063349e8cca116100a5578063349e8cca1461018257806379ba5097146101d657806381ff7048146101eb576100bc565b80630870d3a114610103578063181f5a7714610123575b7f00000000000000000000000000000000000000000000000000000000000000003660008037600080366000845af43d6000803e8080156100fc573d6000f35b3d6000fd5b005b34801561010f57600080fd5b5061010161011e366004614c9d565b610356565b34801561012f57600080fd5b5061016c6040518060400160405280601881526020017f4175746f6d6174696f6e526567697374727920322e332e30000000000000000081525081565b6040516101799190614e19565b60405180910390f35b34801561018e57600080fd5b507f00000000000000000000000000000000000000000000000000000000000000005b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610179565b3480156101e257600080fd5b50610101610ccd565b3480156101f757600080fd5b5061024260175460135463ffffffff74010000000000000000000000000000000000000000830481169378010000000000000000000000000000000000000000000000009093041691565b6040805163ffffffff948516815293909216602084015290820152606001610179565b34801561027157600080fd5b5060005473ffffffffffffffffffffffffffffffffffffffff166101b1565b34801561029c57600080fd5b506101016102ab366004614e75565b610dcf565b3480156102bc57600080fd5b50601354601454604080516000815260208101939093526c0100000000000000000000000090910463ffffffff1690820152606001610179565b34801561030257600080fd5b50610101610311366004614f16565b6110eb565b34801561032257600080fd5b50610101610331366004614fcd565b6113cc565b34801561034257600080fd5b5061010161035136600461509a565b611406565b61035e61141a565b601f8851111561039a576040517f25d0209c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8560ff166000036103d7576040517fe77dba5600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b865188511415806103f657506103ee8660036150e6565b60ff16885111155b1561042d576040517f1d2d1c5800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8051825114610468576040517fcf54c06a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610472828261149d565b61047c8888611ad5565b604051806101200160405280601460000160009054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff168152602001600063ffffffff1681526020018660a0015162ffffff16815260200186610120015161ffff1681526020018760ff168152602001601460000160169054906101000a900460ff1615158152602001601460000160179054906101000a900460ff1615158152602001866080015115158152602001866101e0015173ffffffffffffffffffffffffffffffffffffffff16815250601460008201518160000160006101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff160217905550602082015181600001600c6101000a81548163ffffffff021916908363ffffffff16021790555060408201518160000160106101000a81548162ffffff021916908362ffffff16021790555060608201518160000160136101000a81548161ffff021916908361ffff16021790555060808201518160000160156101000a81548160ff021916908360ff16021790555060a08201518160000160166101000a81548160ff02191690831515021790555060c08201518160000160176101000a81548160ff02191690831515021790555060e08201518160000160186101000a81548160ff0219169083151502179055506101008201518160010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550905050604051806101600160405280866060015173ffffffffffffffffffffffffffffffffffffffff168152602001866000015163ffffffff168152602001866020015163ffffffff1681526020016016600001601c9054906101000a900463ffffffff1663ffffffff16815260200186610100015173ffffffffffffffffffffffffffffffffffffffff168152602001601660010160149054906101000a900463ffffffff1663ffffffff168152602001601660010160189054906101000a900463ffffffff1663ffffffff168152602001866040015163ffffffff16815260200186610140015173ffffffffffffffffffffffffffffffffffffffff1681526020018660c0015163ffffffff1681526020018660e0015163ffffffff16815250601660008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060208201518160000160146101000a81548163ffffffff021916908363ffffffff16021790555060408201518160000160186101000a81548163ffffffff021916908363ffffffff160217905550606082015181600001601c6101000a81548163ffffffff021916908363ffffffff16021790555060808201518160010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060a08201518160010160146101000a81548163ffffffff021916908363ffffffff16021790555060c08201518160010160186101000a81548163ffffffff021916908363ffffffff16021790555060e082015181600101601c6101000a81548163ffffffff021916908363ffffffff1602179055506101008201518160020160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506101208201518160020160146101000a81548163ffffffff021916908363ffffffff1602179055506101408201518160020160186101000a81548163ffffffff021916908363ffffffff160217905550905050846101600151601981905550846101800151601a81905550846101a00151601b819055506000601660010160189054906101000a900463ffffffff169050856101e0015173ffffffffffffffffffffffffffffffffffffffff166357e871e76040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a82573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610aa69190615102565b601780547fffffffff00000000ffffffffffffffffffffffffffffffffffffffffffffffff16780100000000000000000000000000000000000000000000000063ffffffff9384160217808255600192601491610b1d9185917401000000000000000000000000000000000000000090041661511b565b92506101000a81548163ffffffff021916908363ffffffff160217905550600086604051602001610b4e9190615189565b604080518083037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0018152919052601754909150610bb3904690309074010000000000000000000000000000000000000000900463ffffffff168d8d8d878d8d612196565b6013556000610bc26009612240565b90505b8015610bff57610bec610be4610bdc60018461530f565b600990612250565b600990612263565b5080610bf781615322565b915050610bc5565b5060005b876101c0015151811015610c5657610c43886101c001518281518110610c2b57610c2b615357565b6020026020010151600961228590919063ffffffff16565b5080610c4e81615386565b915050610c03565b506013546017546040517f1591690b8638f5fb2dbec82ac741805ac5da8b45dc5263f4875b0496fdce4e0592610cb99286927401000000000000000000000000000000000000000090910463ffffffff16908f908f908f9089908f908f906153be565b60405180910390a150505050505050505050565b60015473ffffffffffffffffffffffffffffffffffffffff163314610d53576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e65720000000000000000000060448201526064015b60405180910390fd5b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610e3e576040517fc8bad78d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60208114610e78576040517fdfe9309000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000610e8682840184615454565b6000818152600460205260409020549091506601000000000000900463ffffffff90811614610ee1576040517f9c0083a200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000818152600460205260409020600201547f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff908116911614610f65576040517fc1ab6dc100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600081815260046020526040902060010154610fa490859070010000000000000000000000000000000090046bffffffffffffffffffffffff1661546d565b600082815260046020908152604080832060010180546bffffffffffffffffffffffff95909516700100000000000000000000000000000000027fffffffff000000000000000000000000ffffffffffffffffffffffffffffffff9095169490941790935573ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168252602190522054611053908590615492565b73ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000811660009081526021602090815260409182902093909355516bffffffffffffffffffffffff871681529087169183917fafd24114486da8ebfc32f3626dada8863652e187461aa74d4bfa734891506203910160405180910390a35050505050565b60005a60408051610120810182526014546bffffffffffffffffffffffff8116825263ffffffff6c01000000000000000000000000820416602083015262ffffff7001000000000000000000000000000000008204169282019290925261ffff730100000000000000000000000000000000000000830416606082015260ff75010000000000000000000000000000000000000000008304811660808301527601000000000000000000000000000000000000000000008304811615801560a08401527701000000000000000000000000000000000000000000000084048216151560c0840152780100000000000000000000000000000000000000000000000090930416151560e082015260155473ffffffffffffffffffffffffffffffffffffffff1661010082015291925061124f576040517f24522f3400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b336000908152600b602052604090205460ff16611298576040517f1099ed7500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6013548a35146112d4576040517fdfdcf8e700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60808101516112e49060016154a5565b60ff16861415806112f55750858414155b1561132c576040517f0244f71a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61133c8a8a8a8a8a8a8a8a6122a7565b60006113488a8a612510565b905060208b0135600881901c63ffffffff166113658484876125c9565b836020015163ffffffff168163ffffffff1611156113bd57601480547fffffffffffffffffffffffffffffffff00000000ffffffffffffffffffffffff166c0100000000000000000000000063ffffffff8416021790555b50505050505050505050505050565b6000806000858060200190518101906113e5919061568f565b9250925092506113fb8989898689898888610356565b505050505050505050565b61140e61141a565b611417816131b6565b50565b60005473ffffffffffffffffffffffffffffffffffffffff16331461149b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e6572000000000000000000006044820152606401610d4a565b565b60005b60245481101561155b5760226000602483815481106114c1576114c1615357565b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff168352820192909252604001812080547fffffffff00000000000000000000000000000000000000000000000000000000168155600181019190915560020180547fffffffffffffffffffffffffffffffffffffffff0000000000000000000000001690558061155381615386565b9150506114a0565b50611568602460006146f1565b60255460ff1660005b8351811015611acf57600084828151811061158e5761158e615357565b6020026020010151905060008483815181106115ac576115ac615357565b602002602001015190508173ffffffffffffffffffffffffffffffffffffffff1663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015611601573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611625919061583a565b60ff16816060015160ff161415806116b35750806040015173ffffffffffffffffffffffffffffffffffffffff1663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015611687573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116ab919061583a565b60ff16600814155b156116ea576040517fc1ab6dc100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161480156117565750600184600181111561175457611754615857565b145b1561178d576040517fc1ab6dc100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff821615806117c85750604081015173ffffffffffffffffffffffffffffffffffffffff16155b156117ff576040517f8579befe00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff82811660009081526022602052604090205467010000000000000090041615611869576040517f357d0cc400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6024805460018181019092557f7cd332d19b93bcabe3cce7ca0c18a052f57e5fd03b4758a09f30f5ddc4b22ec401805473ffffffffffffffffffffffffffffffffffffffff8086167fffffffffffffffffffffffff0000000000000000000000000000000000000000909216821790925560008181526022602090815260409182902086518154928801518489015160608a015160ff167b01000000000000000000000000000000000000000000000000000000027fffffffff00ffffffffffffffffffffffffffffffffffffffffffffffffffffff9190981667010000000000000002167fffffffff000000000000000000000000000000000000000000ffffffffffffff62ffffff909216640100000000027fffffffffffffffffffffffffffffffffffffffffffffffffff0000000000000090951663ffffffff9093169290921793909317929092169190911793909317835560808501519383019390935560a0840151600290920180546bffffffffffffffffffffffff9093167fffffffffffffffffffffffffffffffffffffffff0000000000000000000000009093169290921790915590517fca93cbe727c73163ec538f71be6c0a64877d7f1f6dd35d5ca7cbaef3a3e34ba390611ab2908490600060c08201905063ffffffff835116825262ffffff602084015116602083015273ffffffffffffffffffffffffffffffffffffffff604084015116604083015260ff6060840151166060830152608083015160808301526bffffffffffffffffffffffff60a08401511660a083015292915050565b60405180910390a250508080611ac790615386565b915050611571565b50505050565b60005b600e54811015611b4c57611b39600e8281548110611af857611af8615357565b600091825260209091200154601454600e5473ffffffffffffffffffffffffffffffffffffffff909216916bffffffffffffffffffffffff909116906132ab565b5080611b4481615386565b915050611ad8565b5060255460009060ff16815b600e54811015611cbd57600e8181548110611b7557611b75615357565b6000918252602082200154600d805473ffffffffffffffffffffffffffffffffffffffff9092169550600c929184908110611bb257611bb2615357565b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff9081168452838201949094526040928301822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00001690559286168152600b909252902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690556001826001811115611c5457611c54615857565b148015611c99575073ffffffffffffffffffffffffffffffffffffffff83166000908152600b60205260409020546201000090046bffffffffffffffffffffffff1615155b15611cab57611ca9600f84612285565b505b80611cb581615386565b915050611b58565b50611cca600d60006146f1565b611cd6600e60006146f1565b6040805160808101825260008082526020820181905291810182905260608101829052905b855181101561216657600c6000878381518110611d1a57611d1a615357565b60209081029190910181015173ffffffffffffffffffffffffffffffffffffffff1682528101919091526040016000205460ff1615611d85576040517f77cea0fa00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16868281518110611daf57611daf615357565b602002602001015173ffffffffffffffffffffffffffffffffffffffff1603611e04576040517f815e1d6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60405180604001604052806001151581526020018260ff16815250600c6000888481518110611e3557611e35615357565b60209081029190910181015173ffffffffffffffffffffffffffffffffffffffff1682528181019290925260400160002082518154939092015160ff16610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff921515929092167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000909316929092171790558451859082908110611edd57611edd615357565b60200260200101519350600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1603611f4d576040517f58a70a0a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff84166000908152600b60209081526040918290208251608081018452905460ff80821615801584526101008304909116938301939093526bffffffffffffffffffffffff6201000082048116948301949094526e01000000000000000000000000000090049092166060830152909250612008576040517f6a7281ad00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600180835260ff80831660208086019182526014546bffffffffffffffffffffffff9081166060880190815273ffffffffffffffffffffffffffffffffffffffff8a166000908152600b909352604092839020885181549551948a0151925184166e010000000000000000000000000000027fffffffffffff000000000000000000000000ffffffffffffffffffffffffffff939094166201000002929092167fffffffffffff000000000000000000000000000000000000000000000000ffff94909616610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff921515929092167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00009095169490941717919091169290921791909117905583600181111561214257612142615857565b0361215457612152600f85612263565b505b8061215e81615386565b915050611cfb565b50845161217a90600d90602088019061470f565b50835161218e90600e90602087019061470f565b505050505050565b6000808a8a8a8a8a8a8a8a8a6040516020016121ba99989796959493929190615886565b604080518083037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe001815291905280516020909101207dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff167e01000000000000000000000000000000000000000000000000000000000000179b9a5050505050505050505050565b600061224a825490565b92915050565b600061225c83836134b3565b9392505050565b600061225c8373ffffffffffffffffffffffffffffffffffffffff84166134dd565b600061225c8373ffffffffffffffffffffffffffffffffffffffff84166135d7565b600087876040516122b992919061591b565b6040519081900381206122d0918b9060200161592b565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815282825280516020918201208383019092526000808452908301819052909250906000805b888110156124a75760018587836020811061233c5761233c615357565b61234991901a601b6154a5565b8c8c8581811061235b5761235b615357565b905060200201358b8b8681811061237457612374615357565b90506020020135604051600081526020016040526040516123b1949392919093845260ff9290921660208401526040830152606082015260800190565b6020604051602081039080840390855afa1580156123d3573d6000803e3d6000fd5b5050604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081015173ffffffffffffffffffffffffffffffffffffffff81166000908152600c602090815290849020838501909452925460ff8082161515808552610100909204169383019390935290955093509050612481576040517f0f4c073700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b826020015160080260ff166001901b84019350808061249f90615386565b91505061231f565b50827e01010101010101010101010101010101010101010101010101010101010101841614612502576040517fc103be2e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505050505050505050505050565b6125496040518060c001604052806000815260200160008152602001606081526020016060815260200160608152602001606081525090565b600061255783850185615a1c565b604081015151606082015151919250908114158061257a57508082608001515114155b8061258a5750808260a001515114155b156125c1576040517fb55ac75400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b509392505050565b600082604001515167ffffffffffffffff8111156125e9576125e96147a6565b6040519080825280602002602001820160405280156126b557816020015b6040805161020081018252600060e08201818152610100830182905261012083018290526101408301829052610160830182905261018083018290526101a083018290526101c083018290526101e0830182905282526020808301829052928201819052606082018190526080820181905260a0820181905260c082015282527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9092019101816126075790505b50905060006040518060800160405280600061ffff16815260200160006bffffffffffffffffffffffff16815260200160006bffffffffffffffffffffffff16815260200160008152509050600085610100015173ffffffffffffffffffffffffffffffffffffffff166357e871e76040518163ffffffff1660e01b8152600401602060405180830381865afa158015612753573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127779190615102565b9050600086610100015173ffffffffffffffffffffffffffffffffffffffff166318b8f6136040518163ffffffff1660e01b8152600401602060405180830381865afa1580156127cb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127ef9190615102565b905060005b866040015151811015612c7f57600460008860400151838151811061281b5761281b615357565b6020908102919091018101518252818101929092526040908101600020815161012081018352815460ff8082161515835261010080830490911615159583019590955263ffffffff620100008204811694830194909452660100000000000081048416606083015273ffffffffffffffffffffffffffffffffffffffff6a01000000000000000000009091048116608083015260018301546fffffffffffffffffffffffffffffffff811660a08401526bffffffffffffffffffffffff70010000000000000000000000000000000082041660c08401527c0100000000000000000000000000000000000000000000000000000000900490931660e082015260029091015490911691810191909152855186908390811061293e5761293e615357565b6020026020010151600001819052506129738760400151828151811061296657612966615357565b6020026020010151613626565b85828151811061298557612985615357565b60200260200101516060019060018111156129a2576129a2615857565b908160018111156129b5576129b5615857565b81525050612a19876040015182815181106129d2576129d2615357565b602002602001015184896080015184815181106129f1576129f1615357565b6020026020010151888581518110612a0b57612a0b615357565b60200260200101518c6136d1565b868381518110612a2b57612a2b615357565b6020026020010151602001878481518110612a4857612a48615357565b602002602001015160c0018281525082151515158152505050848181518110612a7357612a73615357565b60200260200101516020015115612aa357600184600001818151612a979190615b09565b61ffff16905250612aa8565b612c6d565b612b0e858281518110612abd57612abd615357565b6020026020010151600001516080015188606001518381518110612ae357612ae3615357565b60200260200101518960a001518481518110612b0157612b01615357565b60200260200101516137f0565b868381518110612b2057612b20615357565b6020026020010151604001878481518110612b3d57612b3d615357565b6020026020010151608001828152508215151515815250505087608001516001612b6791906154a5565b612b759060ff166040615b24565b6103a48860a001518381518110612b8e57612b8e615357565b602002602001015151612ba19190615492565b612bab9190615492565b858281518110612bbd57612bbd615357565b602002602001015160a0018181525050848181518110612bdf57612bdf615357565b602002602001015160a0015184606001818151612bfc9190615492565b9052508451859082908110612c1357612c13615357565b60200260200101516080015186612c2a919061530f565b9550612c6d87604001518281518110612c4557612c45615357565b602002602001015184878481518110612c6057612c60615357565b6020026020010151613a0b565b80612c7781615386565b9150506127f4565b50825161ffff16600003612c965750505050505050565b61c800612ca4366010615b24565b5a612caf908861530f565b612cb99190615492565b612cc39190615492565b83519095506123f090612cda9061ffff1687615b6a565b612ce49190615492565b6040805160808101825260008082526020820181905291810182905260608101829052919650612d1389613b10565b905060005b88604001515181101561304f57868181518110612d3757612d37615357565b6020026020010151602001511561303d57801580612dcf575086612d5c60018361530f565b81518110612d6c57612d6c615357565b602002602001015160000151610100015173ffffffffffffffffffffffffffffffffffffffff16878281518110612da557612da5615357565b602002602001015160000151610100015173ffffffffffffffffffffffffffffffffffffffff1614155b15612e0357612e008a888381518110612dea57612dea615357565b6020026020010151600001516101000151613bfa565b92505b6000612f218b6040518061012001604052808b8681518110612e2757612e27615357565b60200260200101516080015181526020018c81526020018a606001518c8781518110612e5557612e55615357565b602002602001015160a001518a612e6c9190615b24565b612e769190615b6a565b81526020018d6000015181526020018d6020015181526020018681526020018b8681518110612ea757612ea7615357565b602002602001015160000151610100015173ffffffffffffffffffffffffffffffffffffffff168152602001878152602001600115158152508c604001518581518110612ef657612ef6615357565b60200260200101518b8681518110612f1057612f10615357565b602002602001015160000151613d76565b9050806060015187604001818151612f39919061546d565b6bffffffffffffffffffffffff169052506040810151602088018051612f6090839061546d565b6bffffffffffffffffffffffff169052508751889083908110612f8557612f85615357565b60200260200101516040015115158a604001518381518110612fa957612fa9615357565b60200260200101517fad8cc9579b21dfe2c2f6ea35ba15b656e46b4f5b0cb424f52739b8ce5cac9c5b83606001518460400151612fe6919061546d565b8b8681518110612ff857612ff8615357565b6020026020010151608001518d8f60800151888151811061301b5761301b615357565b60200260200101516040516130339493929190615b7e565b60405180910390a3505b8061304781615386565b915050612d18565b505050602083810151336000908152600b9092526040909120805460029061308c9084906201000090046bffffffffffffffffffffffff1661546d565b92506101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055508260400151601460000160008282829054906101000a90046bffffffffffffffffffffffff166130ea919061546d565b92506101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055508260400151836020015161312c919061546d565b6bffffffffffffffffffffffff16602160007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546131a89190615492565b909155505050505050505050565b3373ffffffffffffffffffffffffffffffffffffffff821603613235576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c660000000000000000006044820152606401610d4a565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b73ffffffffffffffffffffffffffffffffffffffff83166000908152600b602090815260408083208151608081018352905460ff80821615801584526101008304909116948301949094526bffffffffffffffffffffffff6201000082048116938301939093526e01000000000000000000000000000090049091166060820152906134a75760008160600151856133439190615bbb565b905060006133518583615be0565b90508083604001818151613365919061546d565b6bffffffffffffffffffffffff169052506133808582615c0b565b83606001818151613391919061546d565b6bffffffffffffffffffffffff90811690915273ffffffffffffffffffffffffffffffffffffffff89166000908152600b602090815260409182902087518154928901519389015160608a015186166e010000000000000000000000000000027fffffffffffff000000000000000000000000ffffffffffffffffffffffffffff919096166201000002167fffffffffffff000000000000000000000000000000000000000000000000ffff60ff95909516610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff921515929092167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000909416939093171792909216179190911790555050505b60400151949350505050565b60008260000182815481106134ca576134ca615357565b9060005260206000200154905092915050565b600081815260018301602052604081205480156135c657600061350160018361530f565b85549091506000906135159060019061530f565b905081811461357a57600086600001828154811061353557613535615357565b906000526020600020015490508087600001848154811061355857613558615357565b6000918252602080832090910192909255918252600188019052604090208390555b855486908061358b5761358b615c3b565b60019003818190600052602060002001600090559055856001016000868152602001908152602001600020600090556001935050505061224a565b600091505061224a565b5092915050565b600081815260018301602052604081205461361e5750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915561224a565b50600061224a565b6000818160045b600f8110156136b3577fff00000000000000000000000000000000000000000000000000000000000000821683826020811061366b5761366b615357565b1a60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916146136a157506000949350505050565b806136ab81615386565b91505061362d565b5081600f1a60018111156136c9576136c9615857565b949350505050565b6000808080856060015160018111156136ec576136ec615857565b03613712576136fe8888888888614072565b61370d576000925090506137e6565b61378a565b60018560600151600181111561372a5761372a615857565b0361375857600061373d898989886141fc565b925090508061375257506000925090506137e6565b5061378a565b6040517ff2b2d41200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b84516060015163ffffffff1687106137df57877fc3237c8807c467c1b39b8d0395eff077313e691bf0a7388106792564ebfd5636876040516137cc9190614e19565b60405180910390a26000925090506137e6565b6001925090505b9550959350505050565b601454600090819077010000000000000000000000000000000000000000000000900460ff161561384d576040517f37ed32e800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b601480547fffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffffffff16770100000000000000000000000000000000000000000000001790556040517f4585e33b00000000000000000000000000000000000000000000000000000000906138c2908590602401614e19565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009094169390931790925290517f79188d1600000000000000000000000000000000000000000000000000000000815290935073ffffffffffffffffffffffffffffffffffffffff8616906379188d16906139959087908790600401615c6a565b60408051808303816000875af11580156139b3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906139d79190615c83565b601480547fffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffffffff16905590969095509350505050565b600081606001516001811115613a2357613a23615857565b03613a8757600083815260046020526040902060010180547bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167c010000000000000000000000000000000000000000000000000000000063ffffffff851602179055505050565b600181606001516001811115613a9f57613a9f615857565b03613b0b5760c08101805160009081526008602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055915191517fa4a4e334c0e330143f9437484fe516c13bc560b86b5b0daf58e7084aaac228f29190a25b505050565b60008060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa158015613b80573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613ba49190615ccb565b50935050925050600082131580613bba57508042105b80613bea57506000846040015162ffffff16118015613bea5750613bde814261530f565b846040015162ffffff16105b156135d0575050601b5492915050565b60408051608081018252600080825260208083018281528385018381526060850184905273ffffffffffffffffffffffffffffffffffffffff878116855260229093528584208054640100000000810462ffffff1690925263ffffffff82169092527b01000000000000000000000000000000000000000000000000000000810460ff16855285517ffeaf968c00000000000000000000000000000000000000000000000000000000815295519495919484936701000000000000009092049091169163feaf968c9160048083019260a09291908290030181865afa158015613ce7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613d0b9190615ccb565b50935050925050600082131580613d2157508042105b80613d5157506000866040015162ffffff16118015613d515750613d45814261530f565b866040015162ffffff16105b15613d655760018301546060850152613d6d565b606084018290525b50505092915050565b604080516080810182526000808252602080830182905292820181905260608201529082015115613def5760008381526023602090815260409182902082518084018452905463ffffffff811680835262ffffff640100000000909204821692840192835260e089018051909401529051915191169101525b6000613dfb8686614409565b60c0840151602082015182519293509091600091613e189161546d565b905082600001516bffffffffffffffffffffffff16826bffffffffffffffffffffffff161015613e9d57819050613e7e87608001518860e0015160600151846bffffffffffffffffffffffff16613e6f9190615b24565b613e799190615b6a565b61464f565b6bffffffffffffffffffffffff16604084015260006060840152613f29565b806bffffffffffffffffffffffff16826bffffffffffffffffffffffff161015613f2957819050613f1583604001516bffffffffffffffffffffffff1688608001518960e0015160600151856bffffffffffffffffffffffff16613f019190615b24565b613f0b9190615b6a565b613e79919061530f565b6bffffffffffffffffffffffff1660608401525b60008681526004602052604090206001018054829190601090613f6f90849070010000000000000000000000000000000090046bffffffffffffffffffffffff16615bbb565b82546101009290920a6bffffffffffffffffffffffff81810219909316918316021790915560008881526004602052604081206001018054928516935091613fca9084906fffffffffffffffffffffffffffffffff16615d1b565b92506101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff160217905550806bffffffffffffffffffffffff16602160008960c0015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254614061919061530f565b909155509298975050505050505050565b600080848060200190518101906140899190615d44565b845160e00151815191925063ffffffff908116911610156140e657867f405288ea7be309e16cfdf481367f90a413e1d4634fcdaf8966546db9b93012e8866040516140d49190614e19565b60405180910390a260009150506141f3565b8260e0015180156141a657506020810151158015906141a65750602081015161010084015182516040517f85df51fd00000000000000000000000000000000000000000000000000000000815263ffffffff909116600482015273ffffffffffffffffffffffffffffffffffffffff909116906385df51fd90602401602060405180830381865afa15801561417f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906141a39190615102565b14155b806141b85750805163ffffffff168611155b156141ed57867f6aa7f60c176da7af894b384daea2249497448137f5943c1237ada8bc92bdc301866040516140d49190614e19565b60019150505b95945050505050565b6000806000848060200190518101906142159190615d9c565b905060008782600001518360200151846040015160405160200161427794939291909384526020840192909252604083015260e01b7fffffffff0000000000000000000000000000000000000000000000000000000016606082015260640190565b6040516020818303038152906040528051906020012090508460e00151801561435257506080820151158015906143525750608082015161010086015160608401516040517f85df51fd00000000000000000000000000000000000000000000000000000000815263ffffffff909116600482015273ffffffffffffffffffffffffffffffffffffffff909116906385df51fd90602401602060405180830381865afa15801561432b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061434f9190615102565b14155b80614367575086826060015163ffffffff1610155b156143b157877f6aa7f60c176da7af894b384daea2249497448137f5943c1237ada8bc92bdc3018760405161439c9190614e19565b60405180910390a26000935091506144009050565b60008181526008602052604090205460ff16156143f857877f405288ea7be309e16cfdf481367f90a413e1d4634fcdaf8966546db9b93012e88760405161439c9190614e19565b600193509150505b94509492505050565b60408051608081018252600080825260208201819052918101829052606081019190915260008260e001516000015160ff1690506000846060015161ffff1684606001516144579190615b24565b9050836101000151801561446a5750803a105b1561447257503a5b600060128311614483576001614499565b61448e60128461530f565b61449990600a615f3d565b90506000601284106144ac5760016144c2565b6144b784601261530f565b6144c290600a615f3d565b905060008660a001518760400151886020015189600001516144e49190615492565b6144ee9087615b24565b6144f89190615492565b6145029190615b24565b9050614525828860e001516060015161451b9190615b24565b613e6f8584615b24565b6bffffffffffffffffffffffff168652608087015161454890613e799083615b6a565b6bffffffffffffffffffffffff1660408088019190915260e088015101516000906145819062ffffff16683635c9adc5dea00000615b24565b9050600081633b9aca008a60a001518b60e001516020015163ffffffff168c604001518d600001518b6145b49190615b24565b6145be9190615492565b6145c89190615b24565b6145d29190615b24565b6145dc9190615b6a565b6145e69190615492565b9050614609848a60e00151606001516145ff9190615b24565b613e6f8784615b24565b6bffffffffffffffffffffffff166020890152608089015161462f90613e799083615b6a565b6bffffffffffffffffffffffff1660608901525050505050505092915050565b60006bffffffffffffffffffffffff8211156146ed576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203960448201527f36206269747300000000000000000000000000000000000000000000000000006064820152608401610d4a565b5090565b50805460008255906000526020600020908101906114179190614791565b828054828255906000526020600020908101928215614789579160200282015b8281111561478957825182547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff90911617825560209092019160019091019061472f565b506146ed9291505b5b808211156146ed5760008155600101614792565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051610200810167ffffffffffffffff811182821017156147f9576147f96147a6565b60405290565b60405160c0810167ffffffffffffffff811182821017156147f9576147f96147a6565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715614869576148696147a6565b604052919050565b600067ffffffffffffffff82111561488b5761488b6147a6565b5060051b60200190565b73ffffffffffffffffffffffffffffffffffffffff8116811461141757600080fd5b80356148c281614895565b919050565b600082601f8301126148d857600080fd5b813560206148ed6148e883614871565b614822565b82815260059290921b8401810191818101908684111561490c57600080fd5b8286015b8481101561493057803561492381614895565b8352918301918301614910565b509695505050505050565b60ff8116811461141757600080fd5b80356148c28161493b565b63ffffffff8116811461141757600080fd5b80356148c281614955565b801515811461141757600080fd5b80356148c281614972565b62ffffff8116811461141757600080fd5b80356148c28161498b565b61ffff8116811461141757600080fd5b80356148c2816149a7565b600061020082840312156149d557600080fd5b6149dd6147d5565b90506149e882614967565b81526149f660208301614967565b6020820152614a0760408301614967565b6040820152614a18606083016148b7565b6060820152614a2960808301614980565b6080820152614a3a60a0830161499c565b60a0820152614a4b60c08301614967565b60c0820152614a5c60e08301614967565b60e0820152610100614a6f8184016148b7565b90820152610120614a818382016149b7565b90820152610140614a938382016148b7565b90820152610160828101359082015261018080830135908201526101a080830135908201526101c08083013567ffffffffffffffff811115614ad457600080fd5b614ae0858286016148c7565b8284015250506101e0614af48184016148b7565b9082015292915050565b803567ffffffffffffffff811681146148c257600080fd5b600082601f830112614b2757600080fd5b813567ffffffffffffffff811115614b4157614b416147a6565b614b7260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011601614822565b818152846020838601011115614b8757600080fd5b816020850160208301376000918101602001919091529392505050565b6bffffffffffffffffffffffff8116811461141757600080fd5b600082601f830112614bcf57600080fd5b81356020614bdf6148e883614871565b82815260c09283028501820192828201919087851115614bfe57600080fd5b8387015b85811015614c905781818a031215614c1a5760008081fd5b614c226147ff565b8135614c2d81614955565b815281860135614c3c8161498b565b81870152604082810135614c4f81614895565b90820152606082810135614c628161493b565b908201526080828101359082015260a080830135614c7f81614ba4565b908201528452928401928101614c02565b5090979650505050505050565b600080600080600080600080610100898b031215614cba57600080fd5b883567ffffffffffffffff80821115614cd257600080fd5b614cde8c838d016148c7565b995060208b0135915080821115614cf457600080fd5b614d008c838d016148c7565b9850614d0e60408c0161494a565b975060608b0135915080821115614d2457600080fd5b614d308c838d016149c2565b9650614d3e60808c01614afe565b955060a08b0135915080821115614d5457600080fd5b614d608c838d01614b16565b945060c08b0135915080821115614d7657600080fd5b614d828c838d016148c7565b935060e08b0135915080821115614d9857600080fd5b50614da58b828c01614bbe565b9150509295985092959890939650565b6000815180845260005b81811015614ddb57602081850181015186830182015201614dbf565b5060006020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b60208152600061225c6020830184614db5565b60008083601f840112614e3e57600080fd5b50813567ffffffffffffffff811115614e5657600080fd5b602083019150836020828501011115614e6e57600080fd5b9250929050565b60008060008060608587031215614e8b57600080fd5b8435614e9681614895565b935060208501359250604085013567ffffffffffffffff811115614eb957600080fd5b614ec587828801614e2c565b95989497509550505050565b60008083601f840112614ee357600080fd5b50813567ffffffffffffffff811115614efb57600080fd5b6020830191508360208260051b8501011115614e6e57600080fd5b60008060008060008060008060e0898b031215614f3257600080fd5b606089018a811115614f4357600080fd5b8998503567ffffffffffffffff80821115614f5d57600080fd5b614f698c838d01614e2c565b909950975060808b0135915080821115614f8257600080fd5b614f8e8c838d01614ed1565b909750955060a08b0135915080821115614fa757600080fd5b50614fb48b828c01614ed1565b999c989b50969995989497949560c00135949350505050565b60008060008060008060c08789031215614fe657600080fd5b863567ffffffffffffffff80821115614ffe57600080fd5b61500a8a838b016148c7565b9750602089013591508082111561502057600080fd5b61502c8a838b016148c7565b965061503a60408a0161494a565b9550606089013591508082111561505057600080fd5b61505c8a838b01614b16565b945061506a60808a01614afe565b935060a089013591508082111561508057600080fd5b5061508d89828a01614b16565b9150509295509295509295565b6000602082840312156150ac57600080fd5b813561225c81614895565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60ff81811683821602908116908181146135d0576135d06150b7565b60006020828403121561511457600080fd5b5051919050565b63ffffffff8181168382160190808211156135d0576135d06150b7565b600081518084526020808501945080840160005b8381101561517e57815173ffffffffffffffffffffffffffffffffffffffff168752958201959082019060010161514c565b509495945050505050565b602081526151a060208201835163ffffffff169052565b600060208301516151b9604084018263ffffffff169052565b50604083015163ffffffff8116606084015250606083015173ffffffffffffffffffffffffffffffffffffffff8116608084015250608083015180151560a08401525060a083015162ffffff811660c08401525060c083015163ffffffff811660e08401525060e08301516101006152388185018363ffffffff169052565b84015190506101206152618482018373ffffffffffffffffffffffffffffffffffffffff169052565b84015190506101406152788482018361ffff169052565b84015190506101606152a18482018373ffffffffffffffffffffffffffffffffffffffff169052565b840151610180848101919091528401516101a0808501919091528401516101c0808501919091528401516102006101e0808601829052919250906152e9610220860184615138565b95015173ffffffffffffffffffffffffffffffffffffffff169301929092525090919050565b8181038181111561224a5761224a6150b7565b600081615331576153316150b7565b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036153b7576153b76150b7565b5060010190565b600061012063ffffffff808d1684528b6020850152808b166040850152508060608401526153ee8184018a615138565b905082810360808401526154028189615138565b905060ff871660a084015282810360c084015261541f8187614db5565b905067ffffffffffffffff851660e08401528281036101008401526154448185614db5565b9c9b505050505050505050505050565b60006020828403121561546657600080fd5b5035919050565b6bffffffffffffffffffffffff8181168382160190808211156135d0576135d06150b7565b8082018082111561224a5761224a6150b7565b60ff818116838216019081111561224a5761224a6150b7565b80516148c281614955565b80516148c281614895565b80516148c281614972565b80516148c28161498b565b80516148c2816149a7565b600082601f83011261550657600080fd5b815160206155166148e883614871565b82815260059290921b8401810191818101908684111561553557600080fd5b8286015b8481101561493057805161554c81614895565b8352918301918301615539565b600082601f83011261556a57600080fd5b8151602061557a6148e883614871565b82815260059290921b8401810191818101908684111561559957600080fd5b8286015b848110156149305780516155b081614895565b835291830191830161559d565b600082601f8301126155ce57600080fd5b815160206155de6148e883614871565b82815260c092830285018201928282019190878511156155fd57600080fd5b8387015b85811015614c905781818a0312156156195760008081fd5b6156216147ff565b815161562c81614955565b81528186015161563b8161498b565b8187015260408281015161564e81614895565b908201526060828101516156618161493b565b908201526080828101519082015260a08083015161567e81614ba4565b908201528452928401928101615601565b6000806000606084860312156156a457600080fd5b835167ffffffffffffffff808211156156bc57600080fd5b9085019061020082880312156156d157600080fd5b6156d96147d5565b6156e2836154be565b81526156f0602084016154be565b6020820152615701604084016154be565b6040820152615712606084016154c9565b6060820152615723608084016154d4565b608082015261573460a084016154df565b60a082015261574560c084016154be565b60c082015261575660e084016154be565b60e08201526101006157698185016154c9565b9082015261012061577b8482016154ea565b9082015261014061578d8482016154c9565b90820152610160838101519082015261018080840151908201526101a080840151908201526101c080840151838111156157c657600080fd5b6157d28a8287016154f5565b8284015250506101e06157e68185016154c9565b90820152602087015190955091508082111561580157600080fd5b61580d87838801615559565b9350604086015191508082111561582357600080fd5b50615830868287016155bd565b9150509250925092565b60006020828403121561584c57600080fd5b815161225c8161493b565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b60006101208b835273ffffffffffffffffffffffffffffffffffffffff8b16602084015267ffffffffffffffff808b1660408501528160608501526158cd8285018b615138565b915083820360808501526158e1828a615138565b915060ff881660a085015283820360c08501526158fe8288614db5565b90861660e085015283810361010085015290506154448185614db5565b8183823760009101908152919050565b8281526080810160608360208401379392505050565b600082601f83011261595257600080fd5b813560206159626148e883614871565b82815260059290921b8401810191818101908684111561598157600080fd5b8286015b848110156149305780358352918301918301615985565b600082601f8301126159ad57600080fd5b813560206159bd6148e883614871565b82815260059290921b840181019181810190868411156159dc57600080fd5b8286015b8481101561493057803567ffffffffffffffff811115615a005760008081fd5b615a0e8986838b0101614b16565b8452509183019183016159e0565b600060208284031215615a2e57600080fd5b813567ffffffffffffffff80821115615a4657600080fd5b9083019060c08286031215615a5a57600080fd5b615a626147ff565b8235815260208301356020820152604083013582811115615a8257600080fd5b615a8e87828601615941565b604083015250606083013582811115615aa657600080fd5b615ab287828601615941565b606083015250608083013582811115615aca57600080fd5b615ad68782860161599c565b60808301525060a083013582811115615aee57600080fd5b615afa8782860161599c565b60a08301525095945050505050565b61ffff8181168382160190808211156135d0576135d06150b7565b808202811582820484141761224a5761224a6150b7565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600082615b7957615b79615b3b565b500490565b6bffffffffffffffffffffffff85168152836020820152826040820152608060608201526000615bb16080830184614db5565b9695505050505050565b6bffffffffffffffffffffffff8281168282160390808211156135d0576135d06150b7565b60006bffffffffffffffffffffffff80841680615bff57615bff615b3b565b92169190910492915050565b6bffffffffffffffffffffffff818116838216028082169190828114615c3357615c336150b7565b505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b8281526040602082015260006136c96040830184614db5565b60008060408385031215615c9657600080fd5b8251615ca181614972565b6020939093015192949293505050565b805169ffffffffffffffffffff811681146148c257600080fd5b600080600080600060a08688031215615ce357600080fd5b615cec86615cb1565b9450602086015193506040860151925060608601519150615d0f60808701615cb1565b90509295509295909350565b6fffffffffffffffffffffffffffffffff8181168382160190808211156135d0576135d06150b7565b600060408284031215615d5657600080fd5b6040516040810181811067ffffffffffffffff82111715615d7957615d796147a6565b6040528251615d8781614955565b81526020928301519281019290925250919050565b600060a08284031215615dae57600080fd5b60405160a0810181811067ffffffffffffffff82111715615dd157615dd16147a6565b806040525082518152602083015160208201526040830151615df281614955565b60408201526060830151615e0581614955565b60608201526080928301519281019290925250919050565b600181815b80851115615e7657817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04821115615e5c57615e5c6150b7565b80851615615e6957918102915b93841c9390800290615e22565b509250929050565b600082615e8d5750600161224a565b81615e9a5750600061224a565b8160018114615eb05760028114615eba57615ed6565b600191505061224a565b60ff841115615ecb57615ecb6150b7565b50506001821b61224a565b5060208310610133831016604e8410600b8410161715615ef9575081810a61224a565b615f038383615e1d565b807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04821115615f3557615f356150b7565b029392505050565b600061225c8383615e7e56fea164736f6c6343000813000a", } var AutomationRegistryABI = AutomationRegistryMetaData.ABI diff --git a/core/gethwrappers/generated/vrfv2plus_wrapper/vrfv2plus_wrapper.go b/core/gethwrappers/generated/vrfv2plus_wrapper/vrfv2plus_wrapper.go index 897e4550adc..97143c3f30b 100644 --- a/core/gethwrappers/generated/vrfv2plus_wrapper/vrfv2plus_wrapper.go +++ b/core/gethwrappers/generated/vrfv2plus_wrapper/vrfv2plus_wrapper.go @@ -31,8 +31,8 @@ var ( ) var VRFV2PlusWrapperMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_link\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_linkNativeFeed\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_coordinator\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_subId\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"FailedToTransferLink\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"expectedMinimumLength\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"actualLength\",\"type\":\"uint16\"}],\"name\":\"IncorrectExtraArgsLength\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"premiumPercentage\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"max\",\"type\":\"uint8\"}],\"name\":\"InvalidPremiumPercentage\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"LINKPaymentInRequestRandomWordsInNative\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"LinkAlreadySet\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"flatFeeLinkDiscountPPM\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"flatFeeNativePPM\",\"type\":\"uint32\"}],\"name\":\"LinkDiscountTooHigh\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NativePaymentInOnTokenTransfer\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"have\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"want\",\"type\":\"address\"}],\"name\":\"OnlyCoordinatorCanFulfill\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"have\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"coordinator\",\"type\":\"address\"}],\"name\":\"OnlyOwnerOrCoordinator\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"SubscriptionIdMissing\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAddress\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"wrapperGasOverhead\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"coordinatorGasOverhead\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"coordinatorGasOverheadPerWord\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"coordinatorNativePremiumPercentage\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"coordinatorLinkPremiumPercentage\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"keyHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"maxNumWords\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"stalenessSeconds\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"int256\",\"name\":\"fallbackWeiPerUnitLink\",\"type\":\"int256\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"fulfillmentFlatFeeNativePPM\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"fulfillmentFlatFeeLinkDiscountPPM\",\"type\":\"uint32\"}],\"name\":\"ConfigSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"vrfCoordinator\",\"type\":\"address\"}],\"name\":\"CoordinatorSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"Disabled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"Enabled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"requestId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"int256\",\"name\":\"fallbackWeiPerUnitLink\",\"type\":\"int256\"}],\"name\":\"FallbackWeiPerUnitLinkUsed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"size\",\"type\":\"uint32\"}],\"name\":\"FulfillmentTxSizeSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"NativeWithdrawn\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Withdrawn\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"requestId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"consumer\",\"type\":\"address\"}],\"name\":\"WrapperFulfillmentFailed\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"SUBSCRIPTION_ID\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_callbackGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"_numWords\",\"type\":\"uint32\"}],\"name\":\"calculateRequestPrice\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_callbackGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"_numWords\",\"type\":\"uint32\"}],\"name\":\"calculateRequestPriceNative\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"extraArgs\",\"type\":\"bytes\"},{\"internalType\":\"bool\",\"name\":\"isLinkMode\",\"type\":\"bool\"}],\"name\":\"checkPaymentMode\",\"outputs\":[],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"disable\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"enable\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_callbackGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"_numWords\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"_requestGasPriceWei\",\"type\":\"uint256\"}],\"name\":\"estimateRequestPrice\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_callbackGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"_numWords\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"_requestGasPriceWei\",\"type\":\"uint256\"}],\"name\":\"estimateRequestPriceNative\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getConfig\",\"outputs\":[{\"internalType\":\"int256\",\"name\":\"fallbackWeiPerUnitLink\",\"type\":\"int256\"},{\"internalType\":\"uint32\",\"name\":\"stalenessSeconds\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"fulfillmentFlatFeeNativePPM\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"fulfillmentFlatFeeLinkDiscountPPM\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"wrapperGasOverhead\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"coordinatorGasOverhead\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"coordinatorGasOverheadPerWord\",\"type\":\"uint16\"},{\"internalType\":\"uint8\",\"name\":\"wrapperNativePremiumPercentage\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"wrapperLinkPremiumPercentage\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"keyHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint8\",\"name\":\"maxNumWords\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastRequestId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"link\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"linkNativeFeed\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_sender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"onTokenTransfer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"requestId\",\"type\":\"uint256\"},{\"internalType\":\"uint256[]\",\"name\":\"randomWords\",\"type\":\"uint256[]\"}],\"name\":\"rawFulfillRandomWords\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_callbackGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"_requestConfirmations\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"_numWords\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"extraArgs\",\"type\":\"bytes\"}],\"name\":\"requestRandomWordsInNative\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"requestId\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"s_callbacks\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"callbackAddress\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"callbackGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint64\",\"name\":\"requestGasPrice\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_configured\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_disabled\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_fulfillmentTxSizeBytes\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_vrfCoordinator\",\"outputs\":[{\"internalType\":\"contractIVRFCoordinatorV2Plus\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_wrapperGasOverhead\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"_coordinatorGasOverhead\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"_coordinatorGasOverheadPerWord\",\"type\":\"uint16\"},{\"internalType\":\"uint8\",\"name\":\"_coordinatorNativePremiumPercentage\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"_coordinatorLinkPremiumPercentage\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"_keyHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint8\",\"name\":\"_maxNumWords\",\"type\":\"uint8\"},{\"internalType\":\"uint32\",\"name\":\"_stalenessSeconds\",\"type\":\"uint32\"},{\"internalType\":\"int256\",\"name\":\"_fallbackWeiPerUnitLink\",\"type\":\"int256\"},{\"internalType\":\"uint32\",\"name\":\"_fulfillmentFlatFeeNativePPM\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"_fulfillmentFlatFeeLinkDiscountPPM\",\"type\":\"uint32\"}],\"name\":\"setConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_vrfCoordinator\",\"type\":\"address\"}],\"name\":\"setCoordinator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"size\",\"type\":\"uint32\"}],\"name\":\"setFulfillmentTxSize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"typeAndVersion\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_recipient\",\"type\":\"address\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_recipient\",\"type\":\"address\"}],\"name\":\"withdrawNative\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", - Bin: "0x60e06040526006805463ffffffff60401b191669024400000000000000001790553480156200002d57600080fd5b5060405162003cc838038062003cc88339810160408190526200005091620002a1565b813380600081620000a85760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620000db57620000db81620001d9565b5050506001600160a01b038116620001065760405163d92e233d60e01b815260040160405180910390fd5b600280546001600160a01b0319166001600160a01b0392831617905584811660a052831660c0526000819003620001505760405163a81c0bef60e01b815260040160405180910390fd5b60025460405163dc311dd360e01b8152600481018390526001600160a01b039091169063dc311dd390602401600060405180830381865afa1580156200019a573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052620001c4919081019062000321565b505050608092909252506200044a9350505050565b336001600160a01b03821603620002335760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c6600000000000000000060448201526064016200009f565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b80516001600160a01b03811681146200029c57600080fd5b919050565b60008060008060808587031215620002b857600080fd5b620002c38562000284565b9350620002d36020860162000284565b9250620002e36040860162000284565b6060959095015193969295505050565b80516001600160601b03811681146200029c57600080fd5b634e487b7160e01b600052604160045260246000fd5b600080600080600060a086880312156200033a57600080fd5b6200034586620002f3565b9450602062000356818801620002f3565b60408801519095506001600160401b0380821682146200037557600080fd5b8195506200038660608a0162000284565b945060808901519150808211156200039d57600080fd5b818901915089601f830112620003b257600080fd5b815181811115620003c757620003c76200030b565b8060051b604051601f19603f83011681018181108582111715620003ef57620003ef6200030b565b60405291825284820192508381018501918c8311156200040e57600080fd5b938501935b828510156200043757620004278562000284565b8452938501939285019262000413565b8096505050505050509295509295909350565b60805160a05160c051613824620004a46000396000818161037e01526122c90152600081816102ca0152818161123b0152818161130a0152611cb401526000818161020b015281816119090152611ea101526138246000f3fe6080604052600436106101c15760003560e01c806357a8070a116100f7578063a4c0ed3611610095578063cdd8d88511610064578063cdd8d88514610747578063e1cab74514610785578063f2fde38b146107a5578063fc2a88c3146107c557600080fd5b8063a4c0ed36146105b9578063a608a1e1146105d9578063bf17e5591461060c578063c3f909d41461062c57600080fd5b80638ea98117116100d15780638ea98117146105445780639cfc058e146105645780639eccacf614610577578063a3907d71146105a457600080fd5b806357a8070a146104c257806379ba5097146105045780638da5cb5b1461051957600080fd5b806321f25aa1116101645780632f2770db1161013e5780632f2770db146103a25780632f622e6b146103b757806348baa1c5146103d757806351cff8d9146104a257600080fd5b806321f25aa11461032f57806327e5c50a1461034f5780632808e6c81461036f57600080fd5b8063181f5a77116101a0578063181f5a771461024d57806318b6f4c8146102995780631c4695f4146102bb5780631fe543e31461030f57600080fd5b806226501b146101c6578063030932bb146101f957806313c34b7f1461022d575b600080fd5b3480156101d257600080fd5b506101e66101e1366004612e4d565b6107db565b6040519081526020015b60405180910390f35b34801561020557600080fd5b506101e67f000000000000000000000000000000000000000000000000000000000000000081565b34801561023957600080fd5b506101e6610248366004612e89565b610915565b34801561025957600080fd5b50604080518082018252601681527f5652465632506c75735772617070657220312e302e3000000000000000000000602082015290516101f09190612f20565b3480156102a557600080fd5b506102b96102b436600461301b565b610a3c565b005b3480156102c757600080fd5b507f00000000000000000000000000000000000000000000000000000000000000005b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101f0565b34801561031b57600080fd5b506102b961032a36600461306d565b610bbb565b34801561033b57600080fd5b506102b961034a36600461310f565b610c39565b34801561035b57600080fd5b506101e661036a366004612e89565b610f34565b34801561037b57600080fd5b507f00000000000000000000000000000000000000000000000000000000000000006102ea565b3480156103ae57600080fd5b506102b9611068565b3480156103c357600080fd5b506102b96103d23660046131f1565b6110db565b3480156103e357600080fd5b506104616103f236600461320c565b60076020526000908152604090205473ffffffffffffffffffffffffffffffffffffffff81169074010000000000000000000000000000000000000000810463ffffffff16907801000000000000000000000000000000000000000000000000900467ffffffffffffffff1683565b6040805173ffffffffffffffffffffffffffffffffffffffff909416845263ffffffff909216602084015267ffffffffffffffff16908201526060016101f0565b3480156104ae57600080fd5b506102b96104bd3660046131f1565b611202565b3480156104ce57600080fd5b506002546104f49074010000000000000000000000000000000000000000900460ff1681565b60405190151581526020016101f0565b34801561051057600080fd5b506102b9611403565b34801561052557600080fd5b5060005473ffffffffffffffffffffffffffffffffffffffff166102ea565b34801561055057600080fd5b506102b961055f3660046131f1565b611500565b6101e661057236600461326e565b61168b565b34801561058357600080fd5b506002546102ea9073ffffffffffffffffffffffffffffffffffffffff1681565b3480156105b057600080fd5b506102b9611b37565b3480156105c557600080fd5b506102b96105d43660046132e4565b611b92565b3480156105e557600080fd5b506002546104f4907501000000000000000000000000000000000000000000900460ff1681565b34801561061857600080fd5b506102b961062736600461333e565b612100565b34801561063857600080fd5b506005546006546003546002546040805194855263ffffffff808516602087015272010000000000000000000000000000000000008504811691860191909152760100000000000000000000000000000000000000000000808504821660608701526401000000008504821660808701526c01000000000000000000000000850490911660a086015261ffff70010000000000000000000000000000000085041660c086015260ff7a0100000000000000000000000000000000000000000000000000008504811660e08701527b0100000000000000000000000000000000000000000000000000000090940484166101008601526101208501929092520416610140820152610160016101f0565b34801561075357600080fd5b506006546107709068010000000000000000900463ffffffff1681565b60405163ffffffff90911681526020016101f0565b34801561079157600080fd5b506101e66107a0366004612e4d565b612179565b3480156107b157600080fd5b506102b96107c03660046131f1565b612297565b3480156107d157600080fd5b506101e660045481565b60025460009074010000000000000000000000000000000000000000900460ff16610867576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f77726170706572206973206e6f7420636f6e666967757265640000000000000060448201526064015b60405180910390fd5b6002547501000000000000000000000000000000000000000000900460ff16156108ed576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f777261707065722069732064697361626c656400000000000000000000000000604482015260640161085e565b60006108f76122ab565b50905061090c8563ffffffff16858584612401565b95945050505050565b60025460009074010000000000000000000000000000000000000000900460ff1661099c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f77726170706572206973206e6f7420636f6e6669677572656400000000000000604482015260640161085e565b6002547501000000000000000000000000000000000000000000900460ff1615610a22576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f777261707065722069732064697361626c656400000000000000000000000000604482015260640161085e565b610a338363ffffffff16833a61255a565b90505b92915050565b8151600003610a805780610a7c576040517f6b81746e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050565b815160241115610ad15781516040517f51200dce00000000000000000000000000000000000000000000000000000000815261085e9160249160040161ffff92831681529116602082015260400190565b600082602381518110610ae657610ae6613359565b6020910101517fff00000000000000000000000000000000000000000000000000000000000000167f0100000000000000000000000000000000000000000000000000000000000000149050808015610b3c5750815b15610b73576040517f6048aa6800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80158015610b7f575081155b15610bb6576040517f6b81746e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505050565b60025473ffffffffffffffffffffffffffffffffffffffff163314610c2e576002546040517f1cf993f400000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff909116602482015260440161085e565b610bb6838383612668565b610c4161284e565b8163ffffffff168163ffffffff161115610c97576040517f2780dcb200000000000000000000000000000000000000000000000000000000815263ffffffff80831660048301528316602482015260440161085e565b609b60ff89161115610ce1576040517f3acc511a00000000000000000000000000000000000000000000000000000000815260ff89166004820152609b602482015260440161085e565b609b60ff88161115610d2b576040517f3acc511a00000000000000000000000000000000000000000000000000000000815260ff88166004820152609b602482015260440161085e565b8a600660046101000a81548163ffffffff021916908363ffffffff160217905550896006600c6101000a81548163ffffffff021916908363ffffffff16021790555088600660106101000a81548161ffff021916908361ffff160217905550876006601a6101000a81548160ff021916908360ff160217905550866006601b6101000a81548160ff021916908360ff1602179055508560038190555084600260166101000a81548160ff021916908360ff1602179055506001600260146101000a81548160ff02191690831515021790555083600660006101000a81548163ffffffff021916908363ffffffff1602179055508260058190555081600660126101000a81548163ffffffff021916908363ffffffff16021790555080600660166101000a81548163ffffffff021916908363ffffffff1602179055507fc79a05559cababbb44ef05174d6efe2c7107d46ba6691bf92263ee796aaf24568b8b8b8b8b8b8b8b8b8b600660169054906101000a900463ffffffff16604051610f1f9b9a9998979695949392919063ffffffff9b8c168152998b1660208b015261ffff9890981660408a015260ff96871660608a0152948616608089015260a0880193909352931660c086015291851660e085015261010084019190915283166101208301529091166101408201526101600190565b60405180910390a15050505050505050505050565b60025460009074010000000000000000000000000000000000000000900460ff16610fbb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f77726170706572206973206e6f7420636f6e6669677572656400000000000000604482015260640161085e565b6002547501000000000000000000000000000000000000000000900460ff1615611041576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f777261707065722069732064697361626c656400000000000000000000000000604482015260640161085e565b600061104b6122ab565b5090506110608463ffffffff16843a84612401565b949350505050565b61107061284e565b600280547fffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffff1675010000000000000000000000000000000000000000001790556040517f75884cdadc4a89e8b545db800057f06ec7f5338a08183c7ba515f2bfdd9fe1e190600090a1565b6110e361284e565b604051479060009073ffffffffffffffffffffffffffffffffffffffff84169083908381818185875af1925050503d806000811461113d576040519150601f19603f3d011682016040523d82523d6000602084013e611142565b606091505b50509050806111ad576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f6661696c656420746f207769746864726177206e617469766500000000000000604482015260640161085e565b8273ffffffffffffffffffffffffffffffffffffffff167fc303ca808382409472acbbf899c316cf439f409f6584aae22df86dfa3c9ed504836040516111f591815260200190565b60405180910390a2505050565b61120a61284e565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526000907f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906370a0823190602401602060405180830381865afa158015611297573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112bb9190613388565b6040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8481166004830152602482018390529192507f00000000000000000000000000000000000000000000000000000000000000009091169063a9059cbb906044016020604051808303816000875af1158015611355573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061137991906133a1565b6113af576040517f7c07fc4c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8173ffffffffffffffffffffffffffffffffffffffff167f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5826040516113f791815260200190565b60405180910390a25050565b60015473ffffffffffffffffffffffffffffffffffffffff163314611484576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e657200000000000000000000604482015260640161085e565b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b60005473ffffffffffffffffffffffffffffffffffffffff163314801590611540575060025473ffffffffffffffffffffffffffffffffffffffff163314155b156115c4573361156560005473ffffffffffffffffffffffffffffffffffffffff1690565b6002546040517f061db9c100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9384166004820152918316602483015291909116604482015260640161085e565b73ffffffffffffffffffffffffffffffffffffffff8116611611576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600280547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040519081527fd1a6a14209a385a964d036e404cb5cfb71f4000cdb03c9366292430787261be6906020015b60405180910390a150565b60025460009074010000000000000000000000000000000000000000900460ff16611712576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f77726170706572206973206e6f7420636f6e6669677572656400000000000000604482015260640161085e565b6002547501000000000000000000000000000000000000000000900460ff1615611798576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f777261707065722069732064697361626c656400000000000000000000000000604482015260640161085e565b6117d783838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201829052509250610a3c915050565b60006117e2876128d1565b905060006117f78863ffffffff16873a61255a565b905080341015611863576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600b60248201527f66656520746f6f206c6f77000000000000000000000000000000000000000000604482015260640161085e565b600254760100000000000000000000000000000000000000000000900460ff1663ffffffff871611156118f2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f6e756d576f72647320746f6f2068696768000000000000000000000000000000604482015260640161085e565b60006040518060c0016040528060035481526020017f000000000000000000000000000000000000000000000000000000000000000081526020018961ffff168152602001600660049054906101000a900463ffffffff16858c61195691906133ed565b61196091906133ed565b63ffffffff1681526020018863ffffffff16815260200187878080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050509152506002546040517f9b1c385e00000000000000000000000000000000000000000000000000000000815291925073ffffffffffffffffffffffffffffffffffffffff1690639b1c385e90611a06908490600401613411565b6020604051808303816000875af1158015611a25573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a499190613388565b6040805160608101825233815263ffffffff808d16602080840191825267ffffffffffffffff3a81168587019081526000888152600790935295909120935184549251955190911678010000000000000000000000000000000000000000000000000277ffffffffffffffffffffffffffffffffffffffffffffffff9590931674010000000000000000000000000000000000000000027fffffffffffffffff00000000000000000000000000000000000000000000000090921673ffffffffffffffffffffffffffffffffffffffff91909116171792909216919091179055935050505095945050505050565b611b3f61284e565b600280547fffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffff1690556040517fc0f961051f97b04c496472d11cb6170d844e4b2c9dfd3b602a4fa0139712d48490600090a1565b60025474010000000000000000000000000000000000000000900460ff16611c16576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f77726170706572206973206e6f7420636f6e6669677572656400000000000000604482015260640161085e565b6002547501000000000000000000000000000000000000000000900460ff1615611c9c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f777261707065722069732064697361626c656400000000000000000000000000604482015260640161085e565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614611d3b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f6f6e6c792063616c6c61626c652066726f6d204c494e4b000000000000000000604482015260640161085e565b6000808080611d4c8587018761346e565b9350935093509350611d5f816001610a3c565b6000611d6a856128d1565b9050600080611d776122ab565b915091506000611d8f8863ffffffff16873a86612401565b9050808b1015611dfb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600b60248201527f66656520746f6f206c6f77000000000000000000000000000000000000000000604482015260640161085e565b600254760100000000000000000000000000000000000000000000900460ff1663ffffffff87161115611e8a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f6e756d576f72647320746f6f2068696768000000000000000000000000000000604482015260640161085e565b60006040518060c0016040528060035481526020017f000000000000000000000000000000000000000000000000000000000000000081526020018961ffff168152602001600660049054906101000a900463ffffffff16878c611eee91906133ed565b611ef891906133ed565b63ffffffff908116825289166020820152604090810188905260025490517f9b1c385e00000000000000000000000000000000000000000000000000000000815291925060009173ffffffffffffffffffffffffffffffffffffffff90911690639b1c385e90611f6c908590600401613411565b6020604051808303816000875af1158015611f8b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611faf9190613388565b905060405180606001604052808f73ffffffffffffffffffffffffffffffffffffffff1681526020018b63ffffffff1681526020013a67ffffffffffffffff168152506007600083815260200190815260200160002060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060208201518160000160146101000a81548163ffffffff021916908363ffffffff16021790555060408201518160000160186101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055509050508060048190555083156120f0576005546040805183815260208101929092527f6ca648a381f22ead7e37773d934e64885dcf861fbfbb26c40354cbf0c4662d1a910160405180910390a15b5050505050505050505050505050565b61210861284e565b600680547fffffffffffffffffffffffffffffffffffffffff00000000ffffffffffffffff166801000000000000000063ffffffff8416908102919091179091556040519081527f697b48b8b76cebb09a54ec4ff810e8a181c96f65395d51c744db09c115d1d5d090602001611680565b60025460009074010000000000000000000000000000000000000000900460ff16612200576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f77726170706572206973206e6f7420636f6e6669677572656400000000000000604482015260640161085e565b6002547501000000000000000000000000000000000000000000900460ff1615612286576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f777261707065722069732064697361626c656400000000000000000000000000604482015260640161085e565b6110608463ffffffff16848461255a565b61229f61284e565b6122a8816128e9565b50565b6000806000600660009054906101000a900463ffffffff16905060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa158015612332573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061235691906134f7565b50919650909250505063ffffffff82161580159061238257506123798142613547565b8263ffffffff16105b925082156123905760055493505b60008412156123fb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f496e76616c6964204c494e4b2077656920707269636500000000000000000000604482015260640161085e565b50509091565b600654600090819061242190640100000000900463ffffffff168561355a565b6006549091506000906124459068010000000000000000900463ffffffff166129de565b61244e87612aa6565b61245e9063ffffffff1689613571565b612468908761355a565b6124729190613571565b6006549091506000906124bd9063ffffffff76010000000000000000000000000000000000000000000082048116917201000000000000000000000000000000000000900416613584565b6124d29063ffffffff1664e8d4a5100061355a565b600654606490612504907b01000000000000000000000000000000000000000000000000000000900460ff16826135a1565b6125119060ff168561355a565b61251b91906135e9565b6125259190613571565b9050846125328285613571565b61254490670de0b6b3a764000061355a565b61254e91906135e9565b98975050505050505050565b600654600090819061257a90640100000000900463ffffffff168461355a565b60065490915060009061259e9068010000000000000000900463ffffffff166129de565b6125a786612aa6565b6125b79063ffffffff1688613571565b6125c1908661355a565b6125cb9190613571565b6006549091506000906125ff907201000000000000000000000000000000000000900463ffffffff1664e8d4a5100061355a565b600654606490612630907a010000000000000000000000000000000000000000000000000000900460ff16826135a1565b61263d9060ff168561355a565b61264791906135e9565b6126519190613571565b905061265d8184613571565b979650505050505050565b60008381526007602081815260408084208151606081018352815473ffffffffffffffffffffffffffffffffffffffff808216835274010000000000000000000000000000000000000000820463ffffffff1683870152780100000000000000000000000000000000000000000000000090910467ffffffffffffffff169382019390935288865293909252929055805190918116612763576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f72657175657374206e6f7420666f756e64000000000000000000000000000000604482015260640161085e565b600080631fe543e360e01b878787604051602401612783939291906135fd565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050905060006127f9856020015163ffffffff168584612af1565b9050806128445760405173ffffffffffffffffffffffffffffffffffffffff85169089907fc551b83c151f2d1c7eeb938ac59008e0409f1c1dc1e2f112449d4d79b458902290600090a35b5050505050505050565b60005473ffffffffffffffffffffffffffffffffffffffff1633146128cf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e657200000000000000000000604482015260640161085e565b565b60006128de603f83613656565b610a369060016133ed565b3373ffffffffffffffffffffffffffffffffffffffff821603612968576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640161085e565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b6000466129ea81612b3d565b15612a7f576000606c73ffffffffffffffffffffffffffffffffffffffff166341b247a86040518163ffffffff1660e01b815260040160c060405180830381865afa158015612a3d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612a619190613679565b5050505091505083608c612a759190613571565b611060908261355a565b612a8881612b60565b15612a9d57612a9683612b9a565b9392505050565b50600092915050565b600654600090612ace90700100000000000000000000000000000000900461ffff16836136c3565b600654610a3691906c01000000000000000000000000900463ffffffff166133ed565b60005a611388811015612b0357600080fd5b611388810390508460408204820311612b1b57600080fd5b50823b612b2757600080fd5b60008083516020850160008789f1949350505050565b600061a4b1821480612b51575062066eed82145b80610a3657505062066eee1490565b6000600a821480612b7257506101a482145b80612b7f575062aa37dc82145b80612b8b575061210582145b80610a3657505062014a331490565b60008073420000000000000000000000000000000000000f73ffffffffffffffffffffffffffffffffffffffff1663519b4bd36040518163ffffffff1660e01b8152600401602060405180830381865afa158015612bfc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c209190613388565b9050600080612c2f8186613547565b90506000612c3e82601061355a565b612c4984600461355a565b612c539190613571565b9050600073420000000000000000000000000000000000000f73ffffffffffffffffffffffffffffffffffffffff16630c18c1626040518163ffffffff1660e01b8152600401602060405180830381865afa158015612cb6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612cda9190613388565b9050600073420000000000000000000000000000000000000f73ffffffffffffffffffffffffffffffffffffffff1663f45e65d86040518163ffffffff1660e01b8152600401602060405180830381865afa158015612d3d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612d619190613388565b9050600073420000000000000000000000000000000000000f73ffffffffffffffffffffffffffffffffffffffff1663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015612dc4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612de89190613388565b90506000612df782600a61380b565b905060008184612e078789613571565b612e11908c61355a565b612e1b919061355a565b612e2591906135e9565b9b9a5050505050505050505050565b803563ffffffff81168114612e4857600080fd5b919050565b600080600060608486031215612e6257600080fd5b612e6b84612e34565b9250612e7960208501612e34565b9150604084013590509250925092565b60008060408385031215612e9c57600080fd5b612ea583612e34565b9150612eb360208401612e34565b90509250929050565b6000815180845260005b81811015612ee257602081850181015186830182015201612ec6565b5060006020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b602081526000610a336020830184612ebc565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600082601f830112612f7357600080fd5b813567ffffffffffffffff80821115612f8e57612f8e612f33565b604051601f83017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f01168101908282118183101715612fd457612fd4612f33565b81604052838152866020858801011115612fed57600080fd5b836020870160208301376000602085830101528094505050505092915050565b80151581146122a857600080fd5b6000806040838503121561302e57600080fd5b823567ffffffffffffffff81111561304557600080fd5b61305185828601612f62565b92505060208301356130628161300d565b809150509250929050565b60008060006040848603121561308257600080fd5b83359250602084013567ffffffffffffffff808211156130a157600080fd5b818601915086601f8301126130b557600080fd5b8135818111156130c457600080fd5b8760208260051b85010111156130d957600080fd5b6020830194508093505050509250925092565b803561ffff81168114612e4857600080fd5b803560ff81168114612e4857600080fd5b60008060008060008060008060008060006101608c8e03121561313157600080fd5b61313a8c612e34565b9a5061314860208d01612e34565b995061315660408d016130ec565b985061316460608d016130fe565b975061317260808d016130fe565b965060a08c0135955061318760c08d016130fe565b945061319560e08d01612e34565b93506101008c013592506131ac6101208d01612e34565b91506131bb6101408d01612e34565b90509295989b509295989b9093969950565b803573ffffffffffffffffffffffffffffffffffffffff81168114612e4857600080fd5b60006020828403121561320357600080fd5b610a33826131cd565b60006020828403121561321e57600080fd5b5035919050565b60008083601f84011261323757600080fd5b50813567ffffffffffffffff81111561324f57600080fd5b60208301915083602082850101111561326757600080fd5b9250929050565b60008060008060006080868803121561328657600080fd5b61328f86612e34565b945061329d602087016130ec565b93506132ab60408701612e34565b9250606086013567ffffffffffffffff8111156132c757600080fd5b6132d388828901613225565b969995985093965092949392505050565b600080600080606085870312156132fa57600080fd5b613303856131cd565b935060208501359250604085013567ffffffffffffffff81111561332657600080fd5b61333287828801613225565b95989497509550505050565b60006020828403121561335057600080fd5b610a3382612e34565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60006020828403121561339a57600080fd5b5051919050565b6000602082840312156133b357600080fd5b8151612a968161300d565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b63ffffffff81811683821601908082111561340a5761340a6133be565b5092915050565b60208152815160208201526020820151604082015261ffff60408301511660608201526000606083015163ffffffff80821660808501528060808601511660a0850152505060a083015160c08084015261106060e0840182612ebc565b6000806000806080858703121561348457600080fd5b61348d85612e34565b935061349b602086016130ec565b92506134a960408601612e34565b9150606085013567ffffffffffffffff8111156134c557600080fd5b6134d187828801612f62565b91505092959194509250565b805169ffffffffffffffffffff81168114612e4857600080fd5b600080600080600060a0868803121561350f57600080fd5b613518866134dd565b945060208601519350604086015192506060860151915061353b608087016134dd565b90509295509295909350565b81810381811115610a3657610a366133be565b8082028115828204841417610a3657610a366133be565b80820180821115610a3657610a366133be565b63ffffffff82811682821603908082111561340a5761340a6133be565b60ff8181168382160190811115610a3657610a366133be565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000826135f8576135f86135ba565b500490565b8381526040602082015281604082015260007f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff83111561363c57600080fd5b8260051b8085606085013791909101606001949350505050565b600063ffffffff8084168061366d5761366d6135ba565b92169190910492915050565b60008060008060008060c0878903121561369257600080fd5b865195506020870151945060408701519350606087015192506080870151915060a087015190509295509295509295565b63ffffffff8181168382160280821691908281146136e3576136e36133be565b505092915050565b600181815b8085111561374457817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0482111561372a5761372a6133be565b8085161561373757918102915b93841c93908002906136f0565b509250929050565b60008261375b57506001610a36565b8161376857506000610a36565b816001811461377e5760028114613788576137a4565b6001915050610a36565b60ff841115613799576137996133be565b50506001821b610a36565b5060208310610133831016604e8410600b84101617156137c7575081810a610a36565b6137d183836136eb565b807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04821115613803576138036133be565b029392505050565b6000610a33838361374c56fea164736f6c6343000813000a", + ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_link\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_linkNativeFeed\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_coordinator\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_subId\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"FailedToTransferLink\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"expectedMinimumLength\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"actualLength\",\"type\":\"uint16\"}],\"name\":\"IncorrectExtraArgsLength\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"premiumPercentage\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"max\",\"type\":\"uint8\"}],\"name\":\"InvalidPremiumPercentage\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"LINKPaymentInRequestRandomWordsInNative\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"LinkAlreadySet\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"flatFeeLinkDiscountPPM\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"flatFeeNativePPM\",\"type\":\"uint32\"}],\"name\":\"LinkDiscountTooHigh\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NativePaymentInOnTokenTransfer\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"have\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"want\",\"type\":\"address\"}],\"name\":\"OnlyCoordinatorCanFulfill\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"have\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"coordinator\",\"type\":\"address\"}],\"name\":\"OnlyOwnerOrCoordinator\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"SubscriptionIdMissing\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAddress\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"wrapperGasOverhead\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"coordinatorGasOverheadNative\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"coordinatorGasOverheadLink\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"coordinatorGasOverheadPerWord\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"coordinatorNativePremiumPercentage\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"coordinatorLinkPremiumPercentage\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"keyHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"maxNumWords\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"stalenessSeconds\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"int256\",\"name\":\"fallbackWeiPerUnitLink\",\"type\":\"int256\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"fulfillmentFlatFeeNativePPM\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"fulfillmentFlatFeeLinkDiscountPPM\",\"type\":\"uint32\"}],\"name\":\"ConfigSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"vrfCoordinator\",\"type\":\"address\"}],\"name\":\"CoordinatorSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"Disabled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"Enabled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"requestId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"int256\",\"name\":\"fallbackWeiPerUnitLink\",\"type\":\"int256\"}],\"name\":\"FallbackWeiPerUnitLinkUsed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"size\",\"type\":\"uint32\"}],\"name\":\"FulfillmentTxSizeSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"NativeWithdrawn\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Withdrawn\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"requestId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"consumer\",\"type\":\"address\"}],\"name\":\"WrapperFulfillmentFailed\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"SUBSCRIPTION_ID\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_callbackGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"_numWords\",\"type\":\"uint32\"}],\"name\":\"calculateRequestPrice\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_callbackGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"_numWords\",\"type\":\"uint32\"}],\"name\":\"calculateRequestPriceNative\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"extraArgs\",\"type\":\"bytes\"},{\"internalType\":\"bool\",\"name\":\"isLinkMode\",\"type\":\"bool\"}],\"name\":\"checkPaymentMode\",\"outputs\":[],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"disable\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"enable\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_callbackGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"_numWords\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"_requestGasPriceWei\",\"type\":\"uint256\"}],\"name\":\"estimateRequestPrice\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_callbackGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"_numWords\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"_requestGasPriceWei\",\"type\":\"uint256\"}],\"name\":\"estimateRequestPriceNative\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getConfig\",\"outputs\":[{\"internalType\":\"int256\",\"name\":\"fallbackWeiPerUnitLink\",\"type\":\"int256\"},{\"internalType\":\"uint32\",\"name\":\"stalenessSeconds\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"fulfillmentFlatFeeNativePPM\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"fulfillmentFlatFeeLinkDiscountPPM\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"wrapperGasOverhead\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"coordinatorGasOverheadNative\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"coordinatorGasOverheadLink\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"coordinatorGasOverheadPerWord\",\"type\":\"uint16\"},{\"internalType\":\"uint8\",\"name\":\"wrapperNativePremiumPercentage\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"wrapperLinkPremiumPercentage\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"keyHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint8\",\"name\":\"maxNumWords\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastRequestId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"link\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"linkNativeFeed\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_sender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"onTokenTransfer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"requestId\",\"type\":\"uint256\"},{\"internalType\":\"uint256[]\",\"name\":\"randomWords\",\"type\":\"uint256[]\"}],\"name\":\"rawFulfillRandomWords\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_callbackGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"_requestConfirmations\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"_numWords\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"extraArgs\",\"type\":\"bytes\"}],\"name\":\"requestRandomWordsInNative\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"requestId\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"s_callbacks\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"callbackAddress\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"callbackGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint64\",\"name\":\"requestGasPrice\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_configured\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_disabled\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_fulfillmentTxSizeBytes\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_vrfCoordinator\",\"outputs\":[{\"internalType\":\"contractIVRFCoordinatorV2Plus\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_wrapperGasOverhead\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"_coordinatorGasOverheadNative\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"_coordinatorGasOverheadLink\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"_coordinatorGasOverheadPerWord\",\"type\":\"uint16\"},{\"internalType\":\"uint8\",\"name\":\"_coordinatorNativePremiumPercentage\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"_coordinatorLinkPremiumPercentage\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"_keyHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint8\",\"name\":\"_maxNumWords\",\"type\":\"uint8\"},{\"internalType\":\"uint32\",\"name\":\"_stalenessSeconds\",\"type\":\"uint32\"},{\"internalType\":\"int256\",\"name\":\"_fallbackWeiPerUnitLink\",\"type\":\"int256\"},{\"internalType\":\"uint32\",\"name\":\"_fulfillmentFlatFeeNativePPM\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"_fulfillmentFlatFeeLinkDiscountPPM\",\"type\":\"uint32\"}],\"name\":\"setConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_vrfCoordinator\",\"type\":\"address\"}],\"name\":\"setCoordinator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"size\",\"type\":\"uint32\"}],\"name\":\"setFulfillmentTxSize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"typeAndVersion\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_recipient\",\"type\":\"address\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_recipient\",\"type\":\"address\"}],\"name\":\"withdrawNative\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", + Bin: "0x60e06040526006805463ffffffff60401b191669024400000000000000001790553480156200002d57600080fd5b5060405162003e0938038062003e098339810160408190526200005091620002a1565b813380600081620000a85760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620000db57620000db81620001d9565b5050506001600160a01b038116620001065760405163d92e233d60e01b815260040160405180910390fd5b600280546001600160a01b0319166001600160a01b0392831617905584811660a052831660c0526000819003620001505760405163a81c0bef60e01b815260040160405180910390fd5b60025460405163dc311dd360e01b8152600481018390526001600160a01b039091169063dc311dd390602401600060405180830381865afa1580156200019a573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052620001c4919081019062000321565b505050608092909252506200044a9350505050565b336001600160a01b03821603620002335760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c6600000000000000000060448201526064016200009f565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b80516001600160a01b03811681146200029c57600080fd5b919050565b60008060008060808587031215620002b857600080fd5b620002c38562000284565b9350620002d36020860162000284565b9250620002e36040860162000284565b6060959095015193969295505050565b80516001600160601b03811681146200029c57600080fd5b634e487b7160e01b600052604160045260246000fd5b600080600080600060a086880312156200033a57600080fd5b6200034586620002f3565b9450602062000356818801620002f3565b60408801519095506001600160401b0380821682146200037557600080fd5b8195506200038660608a0162000284565b945060808901519150808211156200039d57600080fd5b818901915089601f830112620003b257600080fd5b815181811115620003c757620003c76200030b565b8060051b604051601f19603f83011681018181108582111715620003ef57620003ef6200030b565b60405291825284820192508381018501918c8311156200040e57600080fd5b938501935b828510156200043757620004278562000284565b8452938501939285019262000413565b8096505050505050509295509295909350565b60805160a05160c051613965620004a46000396000818161037e01526122840152600081816102ea015281816111f6015281816112c50152611c6f01526000818161020b015281816118c40152611e5c01526139656000f3fe6080604052600436106101c15760003560e01c806357a8070a116100f7578063a4c0ed3611610095578063cdd8d88511610064578063cdd8d88514610741578063e1cab7451461077f578063f2fde38b1461079f578063fc2a88c3146107bf57600080fd5b8063a4c0ed36146105b9578063a608a1e1146105d9578063bf17e5591461060c578063c3f909d41461062c57600080fd5b80638ea98117116100d15780638ea98117146105445780639cfc058e146105645780639eccacf614610577578063a3907d71146105a457600080fd5b806357a8070a146104c257806379ba5097146105045780638da5cb5b1461051957600080fd5b80631fe543e3116101645780632f2770db1161013e5780632f2770db146103a25780632f622e6b146103b757806348baa1c5146103d757806351cff8d9146104a257600080fd5b80631fe543e31461032f57806327e5c50a1461034f5780632808e6c81461036f57600080fd5b806313c34b7f116101a057806313c34b7f1461024f578063181f5a771461026f57806318b6f4c8146102bb5780631c4695f4146102db57600080fd5b806226501b146101c6578063030932bb146101f9578063045343aa1461022d575b600080fd5b3480156101d257600080fd5b506101e66101e1366004612e80565b6107d5565b6040519081526020015b60405180910390f35b34801561020557600080fd5b506101e67f000000000000000000000000000000000000000000000000000000000000000081565b34801561023957600080fd5b5061024d610248366004612edf565b61090f565b005b34801561025b57600080fd5b506101e661026a366004612fad565b610bcb565b34801561027b57600080fd5b50604080518082018252601681527f5652465632506c75735772617070657220312e302e3000000000000000000000602082015290516101f09190613044565b3480156102c757600080fd5b5061024d6102d636600461313f565b610cf2565b3480156102e757600080fd5b507f00000000000000000000000000000000000000000000000000000000000000005b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101f0565b34801561033b57600080fd5b5061024d61034a366004613191565b610e71565b34801561035b57600080fd5b506101e661036a366004612fad565b610eef565b34801561037b57600080fd5b507f000000000000000000000000000000000000000000000000000000000000000061030a565b3480156103ae57600080fd5b5061024d611023565b3480156103c357600080fd5b5061024d6103d2366004613234565b611096565b3480156103e357600080fd5b506104616103f236600461324f565b60076020526000908152604090205473ffffffffffffffffffffffffffffffffffffffff81169074010000000000000000000000000000000000000000810463ffffffff16907801000000000000000000000000000000000000000000000000900467ffffffffffffffff1683565b6040805173ffffffffffffffffffffffffffffffffffffffff909416845263ffffffff909216602084015267ffffffffffffffff16908201526060016101f0565b3480156104ae57600080fd5b5061024d6104bd366004613234565b6111bd565b3480156104ce57600080fd5b506002546104f49074010000000000000000000000000000000000000000900460ff1681565b60405190151581526020016101f0565b34801561051057600080fd5b5061024d6113be565b34801561052557600080fd5b5060005473ffffffffffffffffffffffffffffffffffffffff1661030a565b34801561055057600080fd5b5061024d61055f366004613234565b6114bb565b6101e66105723660046132b1565b611646565b34801561058357600080fd5b5060025461030a9073ffffffffffffffffffffffffffffffffffffffff1681565b3480156105b057600080fd5b5061024d611af2565b3480156105c557600080fd5b5061024d6105d4366004613327565b611b4d565b3480156105e557600080fd5b506002546104f4907501000000000000000000000000000000000000000000900460ff1681565b34801561061857600080fd5b5061024d610627366004613381565b6120bb565b34801561063857600080fd5b506005546006546003546002546040516101f0949363ffffffff808216947601000000000000000000000000000000000000000000008084048316957a010000000000000000000000000000000000000000000000000000850484169564010000000086048516956c0100000000000000000000000081048616957001000000000000000000000000000000008204169461ffff740100000000000000000000000000000000000000008304169460ff7e0100000000000000000000000000000000000000000000000000000000000084048116957f0100000000000000000000000000000000000000000000000000000000000000909404811694929391909104169061339c565b34801561074d57600080fd5b5060065461076a9068010000000000000000900463ffffffff1681565b60405163ffffffff90911681526020016101f0565b34801561078b57600080fd5b506101e661079a366004612e80565b612134565b3480156107ab57600080fd5b5061024d6107ba366004613234565b612252565b3480156107cb57600080fd5b506101e660045481565b60025460009074010000000000000000000000000000000000000000900460ff16610861576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f77726170706572206973206e6f7420636f6e666967757265640000000000000060448201526064015b60405180910390fd5b6002547501000000000000000000000000000000000000000000900460ff16156108e7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f777261707065722069732064697361626c6564000000000000000000000000006044820152606401610858565b60006108f1612266565b5090506109068563ffffffff168585846123bc565b95945050505050565b610917612523565b8163ffffffff168163ffffffff16111561096d576040517f2780dcb200000000000000000000000000000000000000000000000000000000815263ffffffff808316600483015283166024820152604401610858565b609b60ff891611156109b7576040517f3acc511a00000000000000000000000000000000000000000000000000000000815260ff89166004820152609b6024820152604401610858565b609b60ff88161115610a01576040517f3acc511a00000000000000000000000000000000000000000000000000000000815260ff88166004820152609b6024820152604401610858565b8b600660046101000a81548163ffffffff021916908363ffffffff1602179055508a6006600c6101000a81548163ffffffff021916908363ffffffff16021790555089600660106101000a81548163ffffffff021916908363ffffffff16021790555088600660146101000a81548161ffff021916908361ffff160217905550876006601e6101000a81548160ff021916908360ff160217905550866006601f6101000a81548160ff021916908360ff1602179055508560038190555084600260166101000a81548160ff021916908360ff1602179055506001600260146101000a81548160ff02191690831515021790555083600660006101000a81548163ffffffff021916908363ffffffff1602179055508260058190555081600660166101000a81548163ffffffff021916908363ffffffff160217905550806006601a6101000a81548163ffffffff021916908363ffffffff1602179055507f8aee1a8c131eaf1a5bd30594737b6926a7c5cb29281a97639f6ac93947c8995e8c8c8c8c8c8c8c8c8c8c8c6006601a9054906101000a900463ffffffff16604051610bb59c9b9a9998979695949392919061341d565b60405180910390a1505050505050505050505050565b60025460009074010000000000000000000000000000000000000000900460ff16610c52576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f77726170706572206973206e6f7420636f6e66696775726564000000000000006044820152606401610858565b6002547501000000000000000000000000000000000000000000900460ff1615610cd8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f777261707065722069732064697361626c6564000000000000000000000000006044820152606401610858565b610ce98363ffffffff16833a6125a6565b90505b92915050565b8151600003610d365780610d32576040517f6b81746e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050565b815160241115610d875781516040517f51200dce0000000000000000000000000000000000000000000000000000000081526108589160249160040161ffff92831681529116602082015260400190565b600082602381518110610d9c57610d9c61349a565b6020910101517fff00000000000000000000000000000000000000000000000000000000000000167f0100000000000000000000000000000000000000000000000000000000000000149050808015610df25750815b15610e29576040517f6048aa6800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80158015610e35575081155b15610e6c576040517f6b81746e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505050565b60025473ffffffffffffffffffffffffffffffffffffffff163314610ee4576002546040517f1cf993f400000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff9091166024820152604401610858565b610e6c8383836126be565b60025460009074010000000000000000000000000000000000000000900460ff16610f76576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f77726170706572206973206e6f7420636f6e66696775726564000000000000006044820152606401610858565b6002547501000000000000000000000000000000000000000000900460ff1615610ffc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f777261707065722069732064697361626c6564000000000000000000000000006044820152606401610858565b6000611006612266565b50905061101b8463ffffffff16843a846123bc565b949350505050565b61102b612523565b600280547fffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffff1675010000000000000000000000000000000000000000001790556040517f75884cdadc4a89e8b545db800057f06ec7f5338a08183c7ba515f2bfdd9fe1e190600090a1565b61109e612523565b604051479060009073ffffffffffffffffffffffffffffffffffffffff84169083908381818185875af1925050503d80600081146110f8576040519150601f19603f3d011682016040523d82523d6000602084013e6110fd565b606091505b5050905080611168576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f6661696c656420746f207769746864726177206e6174697665000000000000006044820152606401610858565b8273ffffffffffffffffffffffffffffffffffffffff167fc303ca808382409472acbbf899c316cf439f409f6584aae22df86dfa3c9ed504836040516111b091815260200190565b60405180910390a2505050565b6111c5612523565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526000907f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906370a0823190602401602060405180830381865afa158015611252573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061127691906134c9565b6040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8481166004830152602482018390529192507f00000000000000000000000000000000000000000000000000000000000000009091169063a9059cbb906044016020604051808303816000875af1158015611310573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061133491906134e2565b61136a576040517f7c07fc4c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8173ffffffffffffffffffffffffffffffffffffffff167f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5826040516113b291815260200190565b60405180910390a25050565b60015473ffffffffffffffffffffffffffffffffffffffff16331461143f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e6572000000000000000000006044820152606401610858565b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b60005473ffffffffffffffffffffffffffffffffffffffff1633148015906114fb575060025473ffffffffffffffffffffffffffffffffffffffff163314155b1561157f573361152060005473ffffffffffffffffffffffffffffffffffffffff1690565b6002546040517f061db9c100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff93841660048201529183166024830152919091166044820152606401610858565b73ffffffffffffffffffffffffffffffffffffffff81166115cc576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600280547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040519081527fd1a6a14209a385a964d036e404cb5cfb71f4000cdb03c9366292430787261be6906020015b60405180910390a150565b60025460009074010000000000000000000000000000000000000000900460ff166116cd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f77726170706572206973206e6f7420636f6e66696775726564000000000000006044820152606401610858565b6002547501000000000000000000000000000000000000000000900460ff1615611753576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f777261707065722069732064697361626c6564000000000000000000000000006044820152606401610858565b61179283838080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201829052509250610cf2915050565b600061179d876128a4565b905060006117b28863ffffffff16873a6125a6565b90508034101561181e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600b60248201527f66656520746f6f206c6f770000000000000000000000000000000000000000006044820152606401610858565b600254760100000000000000000000000000000000000000000000900460ff1663ffffffff871611156118ad576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f6e756d576f72647320746f6f20686967680000000000000000000000000000006044820152606401610858565b60006040518060c0016040528060035481526020017f000000000000000000000000000000000000000000000000000000000000000081526020018961ffff168152602001600660049054906101000a900463ffffffff16858c611911919061352e565b61191b919061352e565b63ffffffff1681526020018863ffffffff16815260200187878080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050509152506002546040517f9b1c385e00000000000000000000000000000000000000000000000000000000815291925073ffffffffffffffffffffffffffffffffffffffff1690639b1c385e906119c1908490600401613552565b6020604051808303816000875af11580156119e0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a0491906134c9565b6040805160608101825233815263ffffffff808d16602080840191825267ffffffffffffffff3a81168587019081526000888152600790935295909120935184549251955190911678010000000000000000000000000000000000000000000000000277ffffffffffffffffffffffffffffffffffffffffffffffff9590931674010000000000000000000000000000000000000000027fffffffffffffffff00000000000000000000000000000000000000000000000090921673ffffffffffffffffffffffffffffffffffffffff91909116171792909216919091179055935050505095945050505050565b611afa612523565b600280547fffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffff1690556040517fc0f961051f97b04c496472d11cb6170d844e4b2c9dfd3b602a4fa0139712d48490600090a1565b60025474010000000000000000000000000000000000000000900460ff16611bd1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f77726170706572206973206e6f7420636f6e66696775726564000000000000006044820152606401610858565b6002547501000000000000000000000000000000000000000000900460ff1615611c57576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f777261707065722069732064697361626c6564000000000000000000000000006044820152606401610858565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614611cf6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f6f6e6c792063616c6c61626c652066726f6d204c494e4b0000000000000000006044820152606401610858565b6000808080611d07858701876135af565b9350935093509350611d1a816001610cf2565b6000611d25856128a4565b9050600080611d32612266565b915091506000611d4a8863ffffffff16873a866123bc565b9050808b1015611db6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600b60248201527f66656520746f6f206c6f770000000000000000000000000000000000000000006044820152606401610858565b600254760100000000000000000000000000000000000000000000900460ff1663ffffffff87161115611e45576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f6e756d576f72647320746f6f20686967680000000000000000000000000000006044820152606401610858565b60006040518060c0016040528060035481526020017f000000000000000000000000000000000000000000000000000000000000000081526020018961ffff168152602001600660049054906101000a900463ffffffff16878c611ea9919061352e565b611eb3919061352e565b63ffffffff908116825289166020820152604090810188905260025490517f9b1c385e00000000000000000000000000000000000000000000000000000000815291925060009173ffffffffffffffffffffffffffffffffffffffff90911690639b1c385e90611f27908590600401613552565b6020604051808303816000875af1158015611f46573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f6a91906134c9565b905060405180606001604052808f73ffffffffffffffffffffffffffffffffffffffff1681526020018b63ffffffff1681526020013a67ffffffffffffffff168152506007600083815260200190815260200160002060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060208201518160000160146101000a81548163ffffffff021916908363ffffffff16021790555060408201518160000160186101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055509050508060048190555083156120ab576005546040805183815260208101929092527f6ca648a381f22ead7e37773d934e64885dcf861fbfbb26c40354cbf0c4662d1a910160405180910390a15b5050505050505050505050505050565b6120c3612523565b600680547fffffffffffffffffffffffffffffffffffffffff00000000ffffffffffffffff166801000000000000000063ffffffff8416908102919091179091556040519081527f697b48b8b76cebb09a54ec4ff810e8a181c96f65395d51c744db09c115d1d5d09060200161163b565b60025460009074010000000000000000000000000000000000000000900460ff166121bb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f77726170706572206973206e6f7420636f6e66696775726564000000000000006044820152606401610858565b6002547501000000000000000000000000000000000000000000900460ff1615612241576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f777261707065722069732064697361626c6564000000000000000000000000006044820152606401610858565b61101b8463ffffffff1684846125a6565b61225a612523565b612263816128bc565b50565b6000806000600660009054906101000a900463ffffffff16905060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa1580156122ed573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123119190613638565b50919650909250505063ffffffff82161580159061233d57506123348142613688565b8263ffffffff16105b9250821561234b5760055493505b60008412156123b6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f496e76616c6964204c494e4b20776569207072696365000000000000000000006044820152606401610858565b50509091565b60065460009081906123dc90640100000000900463ffffffff168561369b565b6006549091506000906124009068010000000000000000900463ffffffff166129b1565b61240b876000612a79565b61241b9063ffffffff16896136b2565b612425908761369b565b61242f91906136b2565b6006549091506000906124829063ffffffff7a01000000000000000000000000000000000000000000000000000082048116917601000000000000000000000000000000000000000000009004166136c5565b6124979063ffffffff1664e8d4a5100061369b565b6006546064906124cd907f0100000000000000000000000000000000000000000000000000000000000000900460ff16826136e2565b6124da9060ff168561369b565b6124e4919061372a565b6124ee91906136b2565b9050846124fb82856136b2565b61250d90670de0b6b3a764000061369b565b612517919061372a565b98975050505050505050565b60005473ffffffffffffffffffffffffffffffffffffffff1633146125a4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e6572000000000000000000006044820152606401610858565b565b60065460009081906125c690640100000000900463ffffffff168461369b565b6006549091506000906125ea9068010000000000000000900463ffffffff166129b1565b6125f5866001612a79565b6126059063ffffffff16886136b2565b61260f908661369b565b61261991906136b2565b60065490915060009061265190760100000000000000000000000000000000000000000000900463ffffffff1664e8d4a5100061369b565b600654606490612686907e01000000000000000000000000000000000000000000000000000000000000900460ff16826136e2565b6126939060ff168561369b565b61269d919061372a565b6126a791906136b2565b90506126b381846136b2565b979650505050505050565b60008381526007602081815260408084208151606081018352815473ffffffffffffffffffffffffffffffffffffffff808216835274010000000000000000000000000000000000000000820463ffffffff1683870152780100000000000000000000000000000000000000000000000090910467ffffffffffffffff1693820193909352888652939092529290558051909181166127b9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f72657175657374206e6f7420666f756e640000000000000000000000000000006044820152606401610858565b600080631fe543e360e01b8787876040516024016127d99392919061373e565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050509050600061284f856020015163ffffffff168584612b24565b90508061289a5760405173ffffffffffffffffffffffffffffffffffffffff85169089907fc551b83c151f2d1c7eeb938ac59008e0409f1c1dc1e2f112449d4d79b458902290600090a35b5050505050505050565b60006128b1603f83613797565b610cec90600161352e565b3373ffffffffffffffffffffffffffffffffffffffff82160361293b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c660000000000000000006044820152606401610858565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b6000466129bd81612b70565b15612a52576000606c73ffffffffffffffffffffffffffffffffffffffff166341b247a86040518163ffffffff1660e01b815260040160c060405180830381865afa158015612a10573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612a3491906137ba565b5050505091505083608c612a4891906136b2565b61101b908261369b565b612a5b81612b93565b15612a7057612a6983612bcd565b9392505050565b50600092915050565b60008115612ad457600654612aaa9074010000000000000000000000000000000000000000900461ffff1684613804565b600654612acd91906c01000000000000000000000000900463ffffffff1661352e565b9050610cec565b600654612afd9074010000000000000000000000000000000000000000900461ffff1684613804565b600654612acd9190700100000000000000000000000000000000900463ffffffff1661352e565b60005a611388811015612b3657600080fd5b611388810390508460408204820311612b4e57600080fd5b50823b612b5a57600080fd5b60008083516020850160008789f1949350505050565b600061a4b1821480612b84575062066eed82145b80610cec57505062066eee1490565b6000600a821480612ba557506101a482145b80612bb2575062aa37dc82145b80612bbe575061210582145b80610cec57505062014a331490565b60008073420000000000000000000000000000000000000f73ffffffffffffffffffffffffffffffffffffffff1663519b4bd36040518163ffffffff1660e01b8152600401602060405180830381865afa158015612c2f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c5391906134c9565b9050600080612c628186613688565b90506000612c7182601061369b565b612c7c84600461369b565b612c8691906136b2565b9050600073420000000000000000000000000000000000000f73ffffffffffffffffffffffffffffffffffffffff16630c18c1626040518163ffffffff1660e01b8152600401602060405180830381865afa158015612ce9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612d0d91906134c9565b9050600073420000000000000000000000000000000000000f73ffffffffffffffffffffffffffffffffffffffff1663f45e65d86040518163ffffffff1660e01b8152600401602060405180830381865afa158015612d70573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612d9491906134c9565b9050600073420000000000000000000000000000000000000f73ffffffffffffffffffffffffffffffffffffffff1663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015612df7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612e1b91906134c9565b90506000612e2a82600a61394c565b905060008184612e3a87896136b2565b612e44908c61369b565b612e4e919061369b565b612e58919061372a565b9b9a5050505050505050505050565b803563ffffffff81168114612e7b57600080fd5b919050565b600080600060608486031215612e9557600080fd5b612e9e84612e67565b9250612eac60208501612e67565b9150604084013590509250925092565b803561ffff81168114612e7b57600080fd5b803560ff81168114612e7b57600080fd5b6000806000806000806000806000806000806101808d8f031215612f0257600080fd5b612f0b8d612e67565b9b50612f1960208e01612e67565b9a50612f2760408e01612e67565b9950612f3560608e01612ebc565b9850612f4360808e01612ece565b9750612f5160a08e01612ece565b965060c08d01359550612f6660e08e01612ece565b9450612f756101008e01612e67565b93506101208d01359250612f8c6101408e01612e67565b9150612f9b6101608e01612e67565b90509295989b509295989b509295989b565b60008060408385031215612fc057600080fd5b612fc983612e67565b9150612fd760208401612e67565b90509250929050565b6000815180845260005b8181101561300657602081850181015186830182015201612fea565b5060006020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b602081526000610ce96020830184612fe0565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600082601f83011261309757600080fd5b813567ffffffffffffffff808211156130b2576130b2613057565b604051601f83017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f011681019082821181831017156130f8576130f8613057565b8160405283815286602085880101111561311157600080fd5b836020870160208301376000602085830101528094505050505092915050565b801515811461226357600080fd5b6000806040838503121561315257600080fd5b823567ffffffffffffffff81111561316957600080fd5b61317585828601613086565b925050602083013561318681613131565b809150509250929050565b6000806000604084860312156131a657600080fd5b83359250602084013567ffffffffffffffff808211156131c557600080fd5b818601915086601f8301126131d957600080fd5b8135818111156131e857600080fd5b8760208260051b85010111156131fd57600080fd5b6020830194508093505050509250925092565b803573ffffffffffffffffffffffffffffffffffffffff81168114612e7b57600080fd5b60006020828403121561324657600080fd5b610ce982613210565b60006020828403121561326157600080fd5b5035919050565b60008083601f84011261327a57600080fd5b50813567ffffffffffffffff81111561329257600080fd5b6020830191508360208285010111156132aa57600080fd5b9250929050565b6000806000806000608086880312156132c957600080fd5b6132d286612e67565b94506132e060208701612ebc565b93506132ee60408701612e67565b9250606086013567ffffffffffffffff81111561330a57600080fd5b61331688828901613268565b969995985093965092949392505050565b6000806000806060858703121561333d57600080fd5b61334685613210565b935060208501359250604085013567ffffffffffffffff81111561336957600080fd5b61337587828801613268565b95989497509550505050565b60006020828403121561339357600080fd5b610ce982612e67565b8c815263ffffffff8c811660208301528b811660408301528a81166060830152898116608083015288811660a0830152871660c082015261ffff861660e082015260ff858116610100830152841661012082015261018081018361014083015261340c61016083018460ff169052565b9d9c50505050505050505050505050565b63ffffffff8d811682528c811660208301528b8116604083015261ffff8b16606083015260ff8a8116608084015289811660a084015260c08301899052871660e0830152851661010082015261018081018461012083015261348861014083018563ffffffff169052565b63ffffffff831661016083015261340c565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6000602082840312156134db57600080fd5b5051919050565b6000602082840312156134f457600080fd5b8151612a6981613131565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b63ffffffff81811683821601908082111561354b5761354b6134ff565b5092915050565b60208152815160208201526020820151604082015261ffff60408301511660608201526000606083015163ffffffff80821660808501528060808601511660a0850152505060a083015160c08084015261101b60e0840182612fe0565b600080600080608085870312156135c557600080fd5b6135ce85612e67565b93506135dc60208601612ebc565b92506135ea60408601612e67565b9150606085013567ffffffffffffffff81111561360657600080fd5b61361287828801613086565b91505092959194509250565b805169ffffffffffffffffffff81168114612e7b57600080fd5b600080600080600060a0868803121561365057600080fd5b6136598661361e565b945060208601519350604086015192506060860151915061367c6080870161361e565b90509295509295909350565b81810381811115610cec57610cec6134ff565b8082028115828204841417610cec57610cec6134ff565b80820180821115610cec57610cec6134ff565b63ffffffff82811682821603908082111561354b5761354b6134ff565b60ff8181168382160190811115610cec57610cec6134ff565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600082613739576137396136fb565b500490565b8381526040602082015281604082015260007f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff83111561377d57600080fd5b8260051b8085606085013791909101606001949350505050565b600063ffffffff808416806137ae576137ae6136fb565b92169190910492915050565b60008060008060008060c087890312156137d357600080fd5b865195506020870151945060408701519350606087015192506080870151915060a087015190509295509295509295565b63ffffffff818116838216028082169190828114613824576138246134ff565b505092915050565b600181815b8085111561388557817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0482111561386b5761386b6134ff565b8085161561387857918102915b93841c9390800290613831565b509250929050565b60008261389c57506001610cec565b816138a957506000610cec565b81600181146138bf57600281146138c9576138e5565b6001915050610cec565b60ff8411156138da576138da6134ff565b50506001821b610cec565b5060208310610133831016604e8410600b8410161715613908575081810a610cec565b613912838361382c565b807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04821115613944576139446134ff565b029392505050565b6000610ce9838361388d56fea164736f6c6343000813000a", } var VRFV2PlusWrapperABI = VRFV2PlusWrapperMetaData.ABI @@ -317,12 +317,13 @@ func (_VRFV2PlusWrapper *VRFV2PlusWrapperCaller) GetConfig(opts *bind.CallOpts) outstruct.FulfillmentFlatFeeNativePPM = *abi.ConvertType(out[2], new(uint32)).(*uint32) outstruct.FulfillmentFlatFeeLinkDiscountPPM = *abi.ConvertType(out[3], new(uint32)).(*uint32) outstruct.WrapperGasOverhead = *abi.ConvertType(out[4], new(uint32)).(*uint32) - outstruct.CoordinatorGasOverhead = *abi.ConvertType(out[5], new(uint32)).(*uint32) - outstruct.CoordinatorGasOverheadPerWord = *abi.ConvertType(out[6], new(uint16)).(*uint16) - outstruct.WrapperNativePremiumPercentage = *abi.ConvertType(out[7], new(uint8)).(*uint8) - outstruct.WrapperLinkPremiumPercentage = *abi.ConvertType(out[8], new(uint8)).(*uint8) - outstruct.KeyHash = *abi.ConvertType(out[9], new([32]byte)).(*[32]byte) - outstruct.MaxNumWords = *abi.ConvertType(out[10], new(uint8)).(*uint8) + outstruct.CoordinatorGasOverheadNative = *abi.ConvertType(out[5], new(uint32)).(*uint32) + outstruct.CoordinatorGasOverheadLink = *abi.ConvertType(out[6], new(uint32)).(*uint32) + outstruct.CoordinatorGasOverheadPerWord = *abi.ConvertType(out[7], new(uint16)).(*uint16) + outstruct.WrapperNativePremiumPercentage = *abi.ConvertType(out[8], new(uint8)).(*uint8) + outstruct.WrapperLinkPremiumPercentage = *abi.ConvertType(out[9], new(uint8)).(*uint8) + outstruct.KeyHash = *abi.ConvertType(out[10], new([32]byte)).(*[32]byte) + outstruct.MaxNumWords = *abi.ConvertType(out[11], new(uint8)).(*uint8) return *outstruct, err @@ -641,16 +642,16 @@ func (_VRFV2PlusWrapper *VRFV2PlusWrapperTransactorSession) RequestRandomWordsIn return _VRFV2PlusWrapper.Contract.RequestRandomWordsInNative(&_VRFV2PlusWrapper.TransactOpts, _callbackGasLimit, _requestConfirmations, _numWords, extraArgs) } -func (_VRFV2PlusWrapper *VRFV2PlusWrapperTransactor) SetConfig(opts *bind.TransactOpts, _wrapperGasOverhead uint32, _coordinatorGasOverhead uint32, _coordinatorGasOverheadPerWord uint16, _coordinatorNativePremiumPercentage uint8, _coordinatorLinkPremiumPercentage uint8, _keyHash [32]byte, _maxNumWords uint8, _stalenessSeconds uint32, _fallbackWeiPerUnitLink *big.Int, _fulfillmentFlatFeeNativePPM uint32, _fulfillmentFlatFeeLinkDiscountPPM uint32) (*types.Transaction, error) { - return _VRFV2PlusWrapper.contract.Transact(opts, "setConfig", _wrapperGasOverhead, _coordinatorGasOverhead, _coordinatorGasOverheadPerWord, _coordinatorNativePremiumPercentage, _coordinatorLinkPremiumPercentage, _keyHash, _maxNumWords, _stalenessSeconds, _fallbackWeiPerUnitLink, _fulfillmentFlatFeeNativePPM, _fulfillmentFlatFeeLinkDiscountPPM) +func (_VRFV2PlusWrapper *VRFV2PlusWrapperTransactor) SetConfig(opts *bind.TransactOpts, _wrapperGasOverhead uint32, _coordinatorGasOverheadNative uint32, _coordinatorGasOverheadLink uint32, _coordinatorGasOverheadPerWord uint16, _coordinatorNativePremiumPercentage uint8, _coordinatorLinkPremiumPercentage uint8, _keyHash [32]byte, _maxNumWords uint8, _stalenessSeconds uint32, _fallbackWeiPerUnitLink *big.Int, _fulfillmentFlatFeeNativePPM uint32, _fulfillmentFlatFeeLinkDiscountPPM uint32) (*types.Transaction, error) { + return _VRFV2PlusWrapper.contract.Transact(opts, "setConfig", _wrapperGasOverhead, _coordinatorGasOverheadNative, _coordinatorGasOverheadLink, _coordinatorGasOverheadPerWord, _coordinatorNativePremiumPercentage, _coordinatorLinkPremiumPercentage, _keyHash, _maxNumWords, _stalenessSeconds, _fallbackWeiPerUnitLink, _fulfillmentFlatFeeNativePPM, _fulfillmentFlatFeeLinkDiscountPPM) } -func (_VRFV2PlusWrapper *VRFV2PlusWrapperSession) SetConfig(_wrapperGasOverhead uint32, _coordinatorGasOverhead uint32, _coordinatorGasOverheadPerWord uint16, _coordinatorNativePremiumPercentage uint8, _coordinatorLinkPremiumPercentage uint8, _keyHash [32]byte, _maxNumWords uint8, _stalenessSeconds uint32, _fallbackWeiPerUnitLink *big.Int, _fulfillmentFlatFeeNativePPM uint32, _fulfillmentFlatFeeLinkDiscountPPM uint32) (*types.Transaction, error) { - return _VRFV2PlusWrapper.Contract.SetConfig(&_VRFV2PlusWrapper.TransactOpts, _wrapperGasOverhead, _coordinatorGasOverhead, _coordinatorGasOverheadPerWord, _coordinatorNativePremiumPercentage, _coordinatorLinkPremiumPercentage, _keyHash, _maxNumWords, _stalenessSeconds, _fallbackWeiPerUnitLink, _fulfillmentFlatFeeNativePPM, _fulfillmentFlatFeeLinkDiscountPPM) +func (_VRFV2PlusWrapper *VRFV2PlusWrapperSession) SetConfig(_wrapperGasOverhead uint32, _coordinatorGasOverheadNative uint32, _coordinatorGasOverheadLink uint32, _coordinatorGasOverheadPerWord uint16, _coordinatorNativePremiumPercentage uint8, _coordinatorLinkPremiumPercentage uint8, _keyHash [32]byte, _maxNumWords uint8, _stalenessSeconds uint32, _fallbackWeiPerUnitLink *big.Int, _fulfillmentFlatFeeNativePPM uint32, _fulfillmentFlatFeeLinkDiscountPPM uint32) (*types.Transaction, error) { + return _VRFV2PlusWrapper.Contract.SetConfig(&_VRFV2PlusWrapper.TransactOpts, _wrapperGasOverhead, _coordinatorGasOverheadNative, _coordinatorGasOverheadLink, _coordinatorGasOverheadPerWord, _coordinatorNativePremiumPercentage, _coordinatorLinkPremiumPercentage, _keyHash, _maxNumWords, _stalenessSeconds, _fallbackWeiPerUnitLink, _fulfillmentFlatFeeNativePPM, _fulfillmentFlatFeeLinkDiscountPPM) } -func (_VRFV2PlusWrapper *VRFV2PlusWrapperTransactorSession) SetConfig(_wrapperGasOverhead uint32, _coordinatorGasOverhead uint32, _coordinatorGasOverheadPerWord uint16, _coordinatorNativePremiumPercentage uint8, _coordinatorLinkPremiumPercentage uint8, _keyHash [32]byte, _maxNumWords uint8, _stalenessSeconds uint32, _fallbackWeiPerUnitLink *big.Int, _fulfillmentFlatFeeNativePPM uint32, _fulfillmentFlatFeeLinkDiscountPPM uint32) (*types.Transaction, error) { - return _VRFV2PlusWrapper.Contract.SetConfig(&_VRFV2PlusWrapper.TransactOpts, _wrapperGasOverhead, _coordinatorGasOverhead, _coordinatorGasOverheadPerWord, _coordinatorNativePremiumPercentage, _coordinatorLinkPremiumPercentage, _keyHash, _maxNumWords, _stalenessSeconds, _fallbackWeiPerUnitLink, _fulfillmentFlatFeeNativePPM, _fulfillmentFlatFeeLinkDiscountPPM) +func (_VRFV2PlusWrapper *VRFV2PlusWrapperTransactorSession) SetConfig(_wrapperGasOverhead uint32, _coordinatorGasOverheadNative uint32, _coordinatorGasOverheadLink uint32, _coordinatorGasOverheadPerWord uint16, _coordinatorNativePremiumPercentage uint8, _coordinatorLinkPremiumPercentage uint8, _keyHash [32]byte, _maxNumWords uint8, _stalenessSeconds uint32, _fallbackWeiPerUnitLink *big.Int, _fulfillmentFlatFeeNativePPM uint32, _fulfillmentFlatFeeLinkDiscountPPM uint32) (*types.Transaction, error) { + return _VRFV2PlusWrapper.Contract.SetConfig(&_VRFV2PlusWrapper.TransactOpts, _wrapperGasOverhead, _coordinatorGasOverheadNative, _coordinatorGasOverheadLink, _coordinatorGasOverheadPerWord, _coordinatorNativePremiumPercentage, _coordinatorLinkPremiumPercentage, _keyHash, _maxNumWords, _stalenessSeconds, _fallbackWeiPerUnitLink, _fulfillmentFlatFeeNativePPM, _fulfillmentFlatFeeLinkDiscountPPM) } func (_VRFV2PlusWrapper *VRFV2PlusWrapperTransactor) SetCoordinator(opts *bind.TransactOpts, _vrfCoordinator common.Address) (*types.Transaction, error) { @@ -775,7 +776,8 @@ func (it *VRFV2PlusWrapperConfigSetIterator) Close() error { type VRFV2PlusWrapperConfigSet struct { WrapperGasOverhead uint32 - CoordinatorGasOverhead uint32 + CoordinatorGasOverheadNative uint32 + CoordinatorGasOverheadLink uint32 CoordinatorGasOverheadPerWord uint16 CoordinatorNativePremiumPercentage uint8 CoordinatorLinkPremiumPercentage uint8 @@ -2094,7 +2096,8 @@ type GetConfig struct { FulfillmentFlatFeeNativePPM uint32 FulfillmentFlatFeeLinkDiscountPPM uint32 WrapperGasOverhead uint32 - CoordinatorGasOverhead uint32 + CoordinatorGasOverheadNative uint32 + CoordinatorGasOverheadLink uint32 CoordinatorGasOverheadPerWord uint16 WrapperNativePremiumPercentage uint8 WrapperLinkPremiumPercentage uint8 @@ -2138,7 +2141,7 @@ func (_VRFV2PlusWrapper *VRFV2PlusWrapper) ParseLog(log types.Log) (generated.Ab } func (VRFV2PlusWrapperConfigSet) Topic() common.Hash { - return common.HexToHash("0xc79a05559cababbb44ef05174d6efe2c7107d46ba6691bf92263ee796aaf2456") + return common.HexToHash("0x8aee1a8c131eaf1a5bd30594737b6926a7c5cb29281a97639f6ac93947c8995e") } func (VRFV2PlusWrapperCoordinatorSet) Topic() common.Hash { @@ -2236,7 +2239,7 @@ type VRFV2PlusWrapperInterface interface { RequestRandomWordsInNative(opts *bind.TransactOpts, _callbackGasLimit uint32, _requestConfirmations uint16, _numWords uint32, extraArgs []byte) (*types.Transaction, error) - SetConfig(opts *bind.TransactOpts, _wrapperGasOverhead uint32, _coordinatorGasOverhead uint32, _coordinatorGasOverheadPerWord uint16, _coordinatorNativePremiumPercentage uint8, _coordinatorLinkPremiumPercentage uint8, _keyHash [32]byte, _maxNumWords uint8, _stalenessSeconds uint32, _fallbackWeiPerUnitLink *big.Int, _fulfillmentFlatFeeNativePPM uint32, _fulfillmentFlatFeeLinkDiscountPPM uint32) (*types.Transaction, error) + SetConfig(opts *bind.TransactOpts, _wrapperGasOverhead uint32, _coordinatorGasOverheadNative uint32, _coordinatorGasOverheadLink uint32, _coordinatorGasOverheadPerWord uint16, _coordinatorNativePremiumPercentage uint8, _coordinatorLinkPremiumPercentage uint8, _keyHash [32]byte, _maxNumWords uint8, _stalenessSeconds uint32, _fallbackWeiPerUnitLink *big.Int, _fulfillmentFlatFeeNativePPM uint32, _fulfillmentFlatFeeLinkDiscountPPM uint32) (*types.Transaction, error) SetCoordinator(opts *bind.TransactOpts, _vrfCoordinator common.Address) (*types.Transaction, error) diff --git a/core/gethwrappers/generated/vrfv2plus_wrapper_consumer_example/vrfv2plus_wrapper_consumer_example.go b/core/gethwrappers/generated/vrfv2plus_wrapper_consumer_example/vrfv2plus_wrapper_consumer_example.go index 4a4370bdf5e..c92a6496d3f 100644 --- a/core/gethwrappers/generated/vrfv2plus_wrapper_consumer_example/vrfv2plus_wrapper_consumer_example.go +++ b/core/gethwrappers/generated/vrfv2plus_wrapper_consumer_example/vrfv2plus_wrapper_consumer_example.go @@ -31,8 +31,8 @@ var ( ) var VRFV2PlusWrapperConsumerExampleMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_vrfV2Wrapper\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"have\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"want\",\"type\":\"address\"}],\"name\":\"OnlyVRFWrapperCanFulfill\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"requestId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"randomWords\",\"type\":\"uint256[]\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"payment\",\"type\":\"uint256\"}],\"name\":\"WrappedRequestFulfilled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"requestId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"paid\",\"type\":\"uint256\"}],\"name\":\"WrapperRequestMade\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getLinkToken\",\"outputs\":[{\"internalType\":\"contractLinkTokenInterface\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_requestId\",\"type\":\"uint256\"}],\"name\":\"getRequestStatus\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"paid\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"fulfilled\",\"type\":\"bool\"},{\"internalType\":\"uint256[]\",\"name\":\"randomWords\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"i_vrfV2PlusWrapper\",\"outputs\":[{\"internalType\":\"contractIVRFV2PlusWrapper\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_callbackGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"_requestConfirmations\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"_numWords\",\"type\":\"uint32\"}],\"name\":\"makeRequest\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"requestId\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_callbackGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"_requestConfirmations\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"_numWords\",\"type\":\"uint32\"}],\"name\":\"makeRequestNative\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"requestId\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_requestId\",\"type\":\"uint256\"},{\"internalType\":\"uint256[]\",\"name\":\"_randomWords\",\"type\":\"uint256[]\"}],\"name\":\"rawFulfillRandomWords\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"s_requests\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"paid\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"fulfilled\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"native\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"withdrawLink\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"withdrawNative\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", - Bin: "0x60c06040523480156200001157600080fd5b5060405162001672380380620016728339810160408190526200003491620001f5565b33806000836000819050806001600160a01b0316631c4695f46040518163ffffffff1660e01b8152600401602060405180830381865afa1580156200007d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000a39190620001f5565b6001600160a01b0390811660805290811660a052831690506200010d5760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620001405762000140816200014a565b5050505062000227565b336001600160a01b03821603620001a45760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640162000104565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b6000602082840312156200020857600080fd5b81516001600160a01b03811681146200022057600080fd5b9392505050565b60805160a0516113ed62000285600039600081816101aa0152818161047b01528181610ab001528181610b5b01528181610c0501528181610cf30152610d62015260008181610242015281816106220152610b1f01526113ed6000f3fe608060405234801561001057600080fd5b50600436106100df5760003560e01c806384276d811161008c578063a168fa8911610066578063a168fa89146101cc578063d8a4676f1461021e578063e76d516814610240578063f2fde38b1461026657600080fd5b806384276d81146101535780638da5cb5b146101665780639ed0868d146101a557600080fd5b80631fe543e3116100bd5780631fe543e31461012357806379ba5097146101385780637a8042bd1461014057600080fd5b80630c09b832146100e457806312065fe01461010a5780631e1a349914610110575b600080fd5b6100f76100f2366004611088565b610279565b6040519081526020015b60405180910390f35b476100f7565b6100f761011e366004611088565b6103b4565b610136610131366004611103565b610479565b005b61013661051b565b61013661014e3660046111eb565b610618565b6101366101613660046111eb565b610715565b60005473ffffffffffffffffffffffffffffffffffffffff165b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610101565b6101807f000000000000000000000000000000000000000000000000000000000000000081565b6102016101da3660046111eb565b600260205260009081526040902080546001820154600390920154909160ff908116911683565b604080519384529115156020840152151590820152606001610101565b61023161022c3660046111eb565b6107e7565b6040516101019392919061123f565b7f0000000000000000000000000000000000000000000000000000000000000000610180565b610136610274366004611269565b610907565b600061028361091b565b600061029f60405180602001604052806000151581525061099e565b905060006102af86868685610a5a565b604080516080810182528281526000602080830182815284518381528083018652848601908152606085018490528784526002808452959093208451815590516001820180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016911515919091179055915180519699509496509194909361033c93850192019061100f565b5060609190910151600390910180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001691151591909117905560405181815283907f5f56b4c20db9f5b294cbf6f681368de4a992a27e2de2ee702dcf2cbbfa791ec49060200160405180910390a250509392505050565b60006103be61091b565b60006103da60405180602001604052806001151581525061099e565b905060006103ea86868685610c9d565b60408051608081018252828152600060208083018281528451838152808301865284860190815260016060860181905288855260028085529690942085518155915193820180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001694151594909417909355915180519699509496509194909361033c93850192019061100f565b7f00000000000000000000000000000000000000000000000000000000000000003373ffffffffffffffffffffffffffffffffffffffff82161461050c576040517f8ba9316e00000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff821660248201526044015b60405180910390fd5b6105168383610e03565b505050565b60015473ffffffffffffffffffffffffffffffffffffffff16331461059c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e6572000000000000000000006044820152606401610503565b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b61062061091b565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb61067b60005473ffffffffffffffffffffffffffffffffffffffff1690565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b16815273ffffffffffffffffffffffffffffffffffffffff9091166004820152602481018490526044016020604051808303816000875af11580156106ed573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061071191906112a6565b5050565b61071d61091b565b6000805460405173ffffffffffffffffffffffffffffffffffffffff9091169083908381818185875af1925050503d8060008114610777576040519150601f19603f3d011682016040523d82523d6000602084013e61077c565b606091505b5050905080610711576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f77697468647261774e6174697665206661696c656400000000000000000000006044820152606401610503565b6000818152600260205260408120548190606090610861576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f72657175657374206e6f7420666f756e640000000000000000000000000000006044820152606401610503565b6000848152600260208181526040808420815160808101835281548152600182015460ff16151581850152938101805483518186028101860185528181529294938601938301828280156108d457602002820191906000526020600020905b8154815260200190600101908083116108c0575b50505091835250506003919091015460ff1615156020918201528151908201516040909201519097919650945092505050565b61090f61091b565b61091881610f1a565b50565b60005473ffffffffffffffffffffffffffffffffffffffff16331461099c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e6572000000000000000000006044820152606401610503565b565b60607f92fd13387c7fe7befbc38d303d6468778fb9731bc4583f17d92989c6fcfdeaaa826040516024016109d791511515815260200190565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915292915050565b6040517f27e5c50a00000000000000000000000000000000000000000000000000000000815263ffffffff808616600483015283166024820152600090819073ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016906327e5c50a90604401602060405180830381865afa158015610af7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b1b91906112c8565b90507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16634000aea07f00000000000000000000000000000000000000000000000000000000000000008389898989604051602001610b929493929190611345565b6040516020818303038152906040526040518463ffffffff1660e01b8152600401610bbf93929190611382565b6020604051808303816000875af1158015610bde573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c0291906112a6565b507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663fc2a88c36040518163ffffffff1660e01b8152600401602060405180830381865afa158015610c6e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c9291906112c8565b915094509492505050565b6040517f13c34b7f00000000000000000000000000000000000000000000000000000000815263ffffffff808616600483015283166024820152600090819073ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016906313c34b7f90604401602060405180830381865afa158015610d3a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d5e91906112c8565b90507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16639cfc058e82888888886040518663ffffffff1660e01b8152600401610dc09493929190611345565b60206040518083038185885af1158015610dde573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610c9291906112c8565b600082815260026020526040902054610e78576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f72657175657374206e6f7420666f756e640000000000000000000000000000006044820152606401610503565b6000828152600260208181526040909220600181810180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690911790558351610ecb9391909201919084019061100f565b50600082815260026020526040908190205490517f6c84e12b4c188e61f1b4727024a5cf05c025fa58467e5eedf763c0744c89da7b91610f0e91859185916113b7565b60405180910390a15050565b3373ffffffffffffffffffffffffffffffffffffffff821603610f99576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c660000000000000000006044820152606401610503565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b82805482825590600052602060002090810192821561104a579160200282015b8281111561104a57825182559160200191906001019061102f565b5061105692915061105a565b5090565b5b80821115611056576000815560010161105b565b803563ffffffff8116811461108357600080fd5b919050565b60008060006060848603121561109d57600080fd5b6110a68461106f565b9250602084013561ffff811681146110bd57600080fd5b91506110cb6040850161106f565b90509250925092565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000806040838503121561111657600080fd5b8235915060208084013567ffffffffffffffff8082111561113657600080fd5b818601915086601f83011261114a57600080fd5b81358181111561115c5761115c6110d4565b8060051b6040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0603f8301168101818110858211171561119f5761119f6110d4565b6040529182528482019250838101850191898311156111bd57600080fd5b938501935b828510156111db578435845293850193928501926111c2565b8096505050505050509250929050565b6000602082840312156111fd57600080fd5b5035919050565b600081518084526020808501945080840160005b8381101561123457815187529582019590820190600101611218565b509495945050505050565b83815282151560208201526060604082015260006112606060830184611204565b95945050505050565b60006020828403121561127b57600080fd5b813573ffffffffffffffffffffffffffffffffffffffff8116811461129f57600080fd5b9392505050565b6000602082840312156112b857600080fd5b8151801515811461129f57600080fd5b6000602082840312156112da57600080fd5b5051919050565b6000815180845260005b81811015611307576020818501810151868301820152016112eb565b5060006020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b600063ffffffff808716835261ffff861660208401528085166040840152506080606083015261137860808301846112e1565b9695505050505050565b73ffffffffffffffffffffffffffffffffffffffff8416815282602082015260606040820152600061126060608301846112e1565b8381526060602082015260006113d06060830185611204565b905082604083015294935050505056fea164736f6c6343000813000a", + ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_vrfV2Wrapper\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"have\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"want\",\"type\":\"address\"}],\"name\":\"OnlyVRFWrapperCanFulfill\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"Received\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"requestId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"randomWords\",\"type\":\"uint256[]\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"payment\",\"type\":\"uint256\"}],\"name\":\"WrappedRequestFulfilled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"requestId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"paid\",\"type\":\"uint256\"}],\"name\":\"WrapperRequestMade\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getLinkToken\",\"outputs\":[{\"internalType\":\"contractLinkTokenInterface\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_requestId\",\"type\":\"uint256\"}],\"name\":\"getRequestStatus\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"paid\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"fulfilled\",\"type\":\"bool\"},{\"internalType\":\"uint256[]\",\"name\":\"randomWords\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"i_vrfV2PlusWrapper\",\"outputs\":[{\"internalType\":\"contractIVRFV2PlusWrapper\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_callbackGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"_requestConfirmations\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"_numWords\",\"type\":\"uint32\"}],\"name\":\"makeRequest\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"requestId\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"_callbackGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"_requestConfirmations\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"_numWords\",\"type\":\"uint32\"}],\"name\":\"makeRequestNative\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"requestId\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_requestId\",\"type\":\"uint256\"},{\"internalType\":\"uint256[]\",\"name\":\"_randomWords\",\"type\":\"uint256[]\"}],\"name\":\"rawFulfillRandomWords\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"s_requests\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"paid\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"fulfilled\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"native\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"withdrawLink\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"withdrawNative\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}]", + Bin: "0x60c06040523480156200001157600080fd5b5060405162001751380380620017518339810160408190526200003491620001f5565b33806000836000819050806001600160a01b0316631c4695f46040518163ffffffff1660e01b8152600401602060405180830381865afa1580156200007d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000a39190620001f5565b6001600160a01b0390811660805290811660a052831690506200010d5760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620001405762000140816200014a565b5050505062000227565b336001600160a01b03821603620001a45760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640162000104565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b6000602082840312156200020857600080fd5b81516001600160a01b03811681146200022057600080fd5b9392505050565b60805160a0516114cc62000285600039600081816102550152818161055a01528181610b8f01528181610c3a01528181610ce401528181610dd20152610e41015260008181610314015281816107010152610bfe01526114cc6000f3fe6080604052600436106100d65760003560e01c806384276d811161007f578063a168fa8911610059578063a168fa8914610277578063d8a4676f146102d6578063e76d516814610305578063f2fde38b1461033857600080fd5b806384276d81146101d75780638da5cb5b146101f75780639ed0868d1461024357600080fd5b80631fe543e3116100b05780631fe543e31461018057806379ba5097146101a25780637a8042bd146101b757600080fd5b80630c09b8321461011a57806312065fe01461014d5780631e1a34991461016057600080fd5b3661011557604080513381523460208201527f88a5966d370b9919b20f3e2c13ff65706f196a4e32cc2c12bf57088f88525874910160405180910390a1005b600080fd5b34801561012657600080fd5b5061013a610135366004611167565b610358565b6040519081526020015b60405180910390f35b34801561015957600080fd5b504761013a565b34801561016c57600080fd5b5061013a61017b366004611167565b610493565b34801561018c57600080fd5b506101a061019b3660046111e2565b610558565b005b3480156101ae57600080fd5b506101a06105fa565b3480156101c357600080fd5b506101a06101d23660046112ca565b6106f7565b3480156101e357600080fd5b506101a06101f23660046112ca565b6107f4565b34801561020357600080fd5b5060005473ffffffffffffffffffffffffffffffffffffffff165b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610144565b34801561024f57600080fd5b5061021e7f000000000000000000000000000000000000000000000000000000000000000081565b34801561028357600080fd5b506102b96102923660046112ca565b600260205260009081526040902080546001820154600390920154909160ff908116911683565b604080519384529115156020840152151590820152606001610144565b3480156102e257600080fd5b506102f66102f13660046112ca565b6108c6565b6040516101449392919061131e565b34801561031157600080fd5b507f000000000000000000000000000000000000000000000000000000000000000061021e565b34801561034457600080fd5b506101a0610353366004611348565b6109e6565b60006103626109fa565b600061037e604051806020016040528060001515815250610a7d565b9050600061038e86868685610b39565b604080516080810182528281526000602080830182815284518381528083018652848601908152606085018490528784526002808452959093208451815590516001820180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016911515919091179055915180519699509496509194909361041b9385019201906110ee565b5060609190910151600390910180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001691151591909117905560405181815283907f5f56b4c20db9f5b294cbf6f681368de4a992a27e2de2ee702dcf2cbbfa791ec49060200160405180910390a250509392505050565b600061049d6109fa565b60006104b9604051806020016040528060011515815250610a7d565b905060006104c986868685610d7c565b60408051608081018252828152600060208083018281528451838152808301865284860190815260016060860181905288855260028085529690942085518155915193820180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001694151594909417909355915180519699509496509194909361041b9385019201906110ee565b7f00000000000000000000000000000000000000000000000000000000000000003373ffffffffffffffffffffffffffffffffffffffff8216146105eb576040517f8ba9316e00000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff821660248201526044015b60405180910390fd5b6105f58383610ee2565b505050565b60015473ffffffffffffffffffffffffffffffffffffffff16331461067b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e65720000000000000000000060448201526064016105e2565b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b6106ff6109fa565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb61075a60005473ffffffffffffffffffffffffffffffffffffffff1690565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b16815273ffffffffffffffffffffffffffffffffffffffff9091166004820152602481018490526044016020604051808303816000875af11580156107cc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107f09190611385565b5050565b6107fc6109fa565b6000805460405173ffffffffffffffffffffffffffffffffffffffff9091169083908381818185875af1925050503d8060008114610856576040519150601f19603f3d011682016040523d82523d6000602084013e61085b565b606091505b50509050806107f0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f77697468647261774e6174697665206661696c6564000000000000000000000060448201526064016105e2565b6000818152600260205260408120548190606090610940576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f72657175657374206e6f7420666f756e6400000000000000000000000000000060448201526064016105e2565b6000848152600260208181526040808420815160808101835281548152600182015460ff16151581850152938101805483518186028101860185528181529294938601938301828280156109b357602002820191906000526020600020905b81548152602001906001019080831161099f575b50505091835250506003919091015460ff1615156020918201528151908201516040909201519097919650945092505050565b6109ee6109fa565b6109f781610ff9565b50565b60005473ffffffffffffffffffffffffffffffffffffffff163314610a7b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e65720000000000000000000060448201526064016105e2565b565b60607f92fd13387c7fe7befbc38d303d6468778fb9731bc4583f17d92989c6fcfdeaaa82604051602401610ab691511515815260200190565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915292915050565b6040517f27e5c50a00000000000000000000000000000000000000000000000000000000815263ffffffff808616600483015283166024820152600090819073ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016906327e5c50a90604401602060405180830381865afa158015610bd6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bfa91906113a7565b90507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16634000aea07f00000000000000000000000000000000000000000000000000000000000000008389898989604051602001610c719493929190611424565b6040516020818303038152906040526040518463ffffffff1660e01b8152600401610c9e93929190611461565b6020604051808303816000875af1158015610cbd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ce19190611385565b507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663fc2a88c36040518163ffffffff1660e01b8152600401602060405180830381865afa158015610d4d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d7191906113a7565b915094509492505050565b6040517f13c34b7f00000000000000000000000000000000000000000000000000000000815263ffffffff808616600483015283166024820152600090819073ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016906313c34b7f90604401602060405180830381865afa158015610e19573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e3d91906113a7565b90507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16639cfc058e82888888886040518663ffffffff1660e01b8152600401610e9f9493929190611424565b60206040518083038185885af1158015610ebd573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610d7191906113a7565b600082815260026020526040902054610f57576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f72657175657374206e6f7420666f756e6400000000000000000000000000000060448201526064016105e2565b6000828152600260208181526040909220600181810180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690911790558351610faa939190920191908401906110ee565b50600082815260026020526040908190205490517f6c84e12b4c188e61f1b4727024a5cf05c025fa58467e5eedf763c0744c89da7b91610fed9185918591611496565b60405180910390a15050565b3373ffffffffffffffffffffffffffffffffffffffff821603611078576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c6600000000000000000060448201526064016105e2565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b828054828255906000526020600020908101928215611129579160200282015b8281111561112957825182559160200191906001019061110e565b50611135929150611139565b5090565b5b80821115611135576000815560010161113a565b803563ffffffff8116811461116257600080fd5b919050565b60008060006060848603121561117c57600080fd5b6111858461114e565b9250602084013561ffff8116811461119c57600080fd5b91506111aa6040850161114e565b90509250925092565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080604083850312156111f557600080fd5b8235915060208084013567ffffffffffffffff8082111561121557600080fd5b818601915086601f83011261122957600080fd5b81358181111561123b5761123b6111b3565b8060051b6040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0603f8301168101818110858211171561127e5761127e6111b3565b60405291825284820192508381018501918983111561129c57600080fd5b938501935b828510156112ba578435845293850193928501926112a1565b8096505050505050509250929050565b6000602082840312156112dc57600080fd5b5035919050565b600081518084526020808501945080840160005b83811015611313578151875295820195908201906001016112f7565b509495945050505050565b838152821515602082015260606040820152600061133f60608301846112e3565b95945050505050565b60006020828403121561135a57600080fd5b813573ffffffffffffffffffffffffffffffffffffffff8116811461137e57600080fd5b9392505050565b60006020828403121561139757600080fd5b8151801515811461137e57600080fd5b6000602082840312156113b957600080fd5b5051919050565b6000815180845260005b818110156113e6576020818501810151868301820152016113ca565b5060006020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b600063ffffffff808716835261ffff861660208401528085166040840152506080606083015261145760808301846113c0565b9695505050505050565b73ffffffffffffffffffffffffffffffffffffffff8416815282602082015260606040820152600061133f60608301846113c0565b8381526060602082015260006114af60608301856112e3565b905082604083015294935050505056fea164736f6c6343000813000a", } var VRFV2PlusWrapperConsumerExampleABI = VRFV2PlusWrapperConsumerExampleMetaData.ABI @@ -405,6 +405,18 @@ func (_VRFV2PlusWrapperConsumerExample *VRFV2PlusWrapperConsumerExampleTransacto return _VRFV2PlusWrapperConsumerExample.Contract.WithdrawNative(&_VRFV2PlusWrapperConsumerExample.TransactOpts, amount) } +func (_VRFV2PlusWrapperConsumerExample *VRFV2PlusWrapperConsumerExampleTransactor) Receive(opts *bind.TransactOpts) (*types.Transaction, error) { + return _VRFV2PlusWrapperConsumerExample.contract.RawTransact(opts, nil) +} + +func (_VRFV2PlusWrapperConsumerExample *VRFV2PlusWrapperConsumerExampleSession) Receive() (*types.Transaction, error) { + return _VRFV2PlusWrapperConsumerExample.Contract.Receive(&_VRFV2PlusWrapperConsumerExample.TransactOpts) +} + +func (_VRFV2PlusWrapperConsumerExample *VRFV2PlusWrapperConsumerExampleTransactorSession) Receive() (*types.Transaction, error) { + return _VRFV2PlusWrapperConsumerExample.Contract.Receive(&_VRFV2PlusWrapperConsumerExample.TransactOpts) +} + type VRFV2PlusWrapperConsumerExampleOwnershipTransferRequestedIterator struct { Event *VRFV2PlusWrapperConsumerExampleOwnershipTransferRequested @@ -677,6 +689,124 @@ func (_VRFV2PlusWrapperConsumerExample *VRFV2PlusWrapperConsumerExampleFilterer) return event, nil } +type VRFV2PlusWrapperConsumerExampleReceivedIterator struct { + Event *VRFV2PlusWrapperConsumerExampleReceived + + contract *bind.BoundContract + event string + + logs chan types.Log + sub ethereum.Subscription + done bool + fail error +} + +func (it *VRFV2PlusWrapperConsumerExampleReceivedIterator) Next() bool { + + if it.fail != nil { + return false + } + + if it.done { + select { + case log := <-it.logs: + it.Event = new(VRFV2PlusWrapperConsumerExampleReceived) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + + select { + case log := <-it.logs: + it.Event = new(VRFV2PlusWrapperConsumerExampleReceived) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +func (it *VRFV2PlusWrapperConsumerExampleReceivedIterator) Error() error { + return it.fail +} + +func (it *VRFV2PlusWrapperConsumerExampleReceivedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +type VRFV2PlusWrapperConsumerExampleReceived struct { + Arg0 common.Address + Arg1 *big.Int + Raw types.Log +} + +func (_VRFV2PlusWrapperConsumerExample *VRFV2PlusWrapperConsumerExampleFilterer) FilterReceived(opts *bind.FilterOpts) (*VRFV2PlusWrapperConsumerExampleReceivedIterator, error) { + + logs, sub, err := _VRFV2PlusWrapperConsumerExample.contract.FilterLogs(opts, "Received") + if err != nil { + return nil, err + } + return &VRFV2PlusWrapperConsumerExampleReceivedIterator{contract: _VRFV2PlusWrapperConsumerExample.contract, event: "Received", logs: logs, sub: sub}, nil +} + +func (_VRFV2PlusWrapperConsumerExample *VRFV2PlusWrapperConsumerExampleFilterer) WatchReceived(opts *bind.WatchOpts, sink chan<- *VRFV2PlusWrapperConsumerExampleReceived) (event.Subscription, error) { + + logs, sub, err := _VRFV2PlusWrapperConsumerExample.contract.WatchLogs(opts, "Received") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + + event := new(VRFV2PlusWrapperConsumerExampleReceived) + if err := _VRFV2PlusWrapperConsumerExample.contract.UnpackLog(event, "Received", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +func (_VRFV2PlusWrapperConsumerExample *VRFV2PlusWrapperConsumerExampleFilterer) ParseReceived(log types.Log) (*VRFV2PlusWrapperConsumerExampleReceived, error) { + event := new(VRFV2PlusWrapperConsumerExampleReceived) + if err := _VRFV2PlusWrapperConsumerExample.contract.UnpackLog(event, "Received", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + type VRFV2PlusWrapperConsumerExampleWrappedRequestFulfilledIterator struct { Event *VRFV2PlusWrapperConsumerExampleWrappedRequestFulfilled @@ -941,6 +1071,8 @@ func (_VRFV2PlusWrapperConsumerExample *VRFV2PlusWrapperConsumerExample) ParseLo return _VRFV2PlusWrapperConsumerExample.ParseOwnershipTransferRequested(log) case _VRFV2PlusWrapperConsumerExample.abi.Events["OwnershipTransferred"].ID: return _VRFV2PlusWrapperConsumerExample.ParseOwnershipTransferred(log) + case _VRFV2PlusWrapperConsumerExample.abi.Events["Received"].ID: + return _VRFV2PlusWrapperConsumerExample.ParseReceived(log) case _VRFV2PlusWrapperConsumerExample.abi.Events["WrappedRequestFulfilled"].ID: return _VRFV2PlusWrapperConsumerExample.ParseWrappedRequestFulfilled(log) case _VRFV2PlusWrapperConsumerExample.abi.Events["WrapperRequestMade"].ID: @@ -959,6 +1091,10 @@ func (VRFV2PlusWrapperConsumerExampleOwnershipTransferred) Topic() common.Hash { return common.HexToHash("0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0") } +func (VRFV2PlusWrapperConsumerExampleReceived) Topic() common.Hash { + return common.HexToHash("0x88a5966d370b9919b20f3e2c13ff65706f196a4e32cc2c12bf57088f88525874") +} + func (VRFV2PlusWrapperConsumerExampleWrappedRequestFulfilled) Topic() common.Hash { return common.HexToHash("0x6c84e12b4c188e61f1b4727024a5cf05c025fa58467e5eedf763c0744c89da7b") } @@ -1002,6 +1138,8 @@ type VRFV2PlusWrapperConsumerExampleInterface interface { WithdrawNative(opts *bind.TransactOpts, amount *big.Int) (*types.Transaction, error) + Receive(opts *bind.TransactOpts) (*types.Transaction, error) + FilterOwnershipTransferRequested(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*VRFV2PlusWrapperConsumerExampleOwnershipTransferRequestedIterator, error) WatchOwnershipTransferRequested(opts *bind.WatchOpts, sink chan<- *VRFV2PlusWrapperConsumerExampleOwnershipTransferRequested, from []common.Address, to []common.Address) (event.Subscription, error) @@ -1014,6 +1152,12 @@ type VRFV2PlusWrapperConsumerExampleInterface interface { ParseOwnershipTransferred(log types.Log) (*VRFV2PlusWrapperConsumerExampleOwnershipTransferred, error) + FilterReceived(opts *bind.FilterOpts) (*VRFV2PlusWrapperConsumerExampleReceivedIterator, error) + + WatchReceived(opts *bind.WatchOpts, sink chan<- *VRFV2PlusWrapperConsumerExampleReceived) (event.Subscription, error) + + ParseReceived(log types.Log) (*VRFV2PlusWrapperConsumerExampleReceived, error) + FilterWrappedRequestFulfilled(opts *bind.FilterOpts) (*VRFV2PlusWrapperConsumerExampleWrappedRequestFulfilledIterator, error) WatchWrappedRequestFulfilled(opts *bind.WatchOpts, sink chan<- *VRFV2PlusWrapperConsumerExampleWrappedRequestFulfilled) (event.Subscription, error) diff --git a/core/gethwrappers/generation/generated-wrapper-dependency-versions-do-not-edit.txt b/core/gethwrappers/generation/generated-wrapper-dependency-versions-do-not-edit.txt index 8299cd5ff15..6af70fd8f03 100644 --- a/core/gethwrappers/generation/generated-wrapper-dependency-versions-do-not-edit.txt +++ b/core/gethwrappers/generation/generated-wrapper-dependency-versions-do-not-edit.txt @@ -14,7 +14,7 @@ automation_registry_logic_a_wrapper_2_3: ../../contracts/solc/v0.8.19/Automation automation_registry_logic_b_wrapper_2_2: ../../contracts/solc/v0.8.19/AutomationRegistryLogicB2_2/AutomationRegistryLogicB2_2.abi ../../contracts/solc/v0.8.19/AutomationRegistryLogicB2_2/AutomationRegistryLogicB2_2.bin a6d33dfbbfb0ff253eb59a51f4f6d6d4c22ea5ec95aae52d25d49a312b37a22f automation_registry_logic_b_wrapper_2_3: ../../contracts/solc/v0.8.19/AutomationRegistryLogicB2_3/AutomationRegistryLogicB2_3.abi ../../contracts/solc/v0.8.19/AutomationRegistryLogicB2_3/AutomationRegistryLogicB2_3.bin 2d0f45d2087f6f3c8bfa0a16b26a1c8c1d5c64b89859478c609201535c96eeed automation_registry_wrapper_2_2: ../../contracts/solc/v0.8.19/AutomationRegistry2_2/AutomationRegistry2_2.abi ../../contracts/solc/v0.8.19/AutomationRegistry2_2/AutomationRegistry2_2.bin de60f69878e9b32a291a001c91fc8636544c2cfbd9b507c8c1a4873b602bfb62 -automation_registry_wrapper_2_3: ../../contracts/solc/v0.8.19/AutomationRegistry2_3/AutomationRegistry2_3.abi ../../contracts/solc/v0.8.19/AutomationRegistry2_3/AutomationRegistry2_3.bin 2f9db5da86183eaf4f78f726458e5a928d37f7c90c4024923847b25186b644c5 +automation_registry_wrapper_2_3: ../../contracts/solc/v0.8.19/AutomationRegistry2_3/AutomationRegistry2_3.abi ../../contracts/solc/v0.8.19/AutomationRegistry2_3/AutomationRegistry2_3.bin 68acf720890c89512a43c3468712f5da6c1c9613bc7c462b51599293f0cce9f4 automation_utils_2_1: ../../contracts/solc/v0.8.16/AutomationUtils2_1/AutomationUtils2_1.abi ../../contracts/solc/v0.8.16/AutomationUtils2_1/AutomationUtils2_1.bin 815b17b63f15d26a0274b962eefad98cdee4ec897ead58688bbb8e2470e585f5 automation_utils_2_2: ../../contracts/solc/v0.8.19/AutomationUtils2_2/AutomationUtils2_2.abi ../../contracts/solc/v0.8.19/AutomationUtils2_2/AutomationUtils2_2.bin 8743f6231aaefa3f2a0b2d484258070d506e2d0860690e66890dccc3949edb2e automation_utils_2_3: ../../contracts/solc/v0.8.19/AutomationUtils2_3/AutomationUtils2_3.abi ../../contracts/solc/v0.8.19/AutomationUtils2_3/AutomationUtils2_3.bin 11e2b481dc9a4d936e3443345d45d2cc571164459d214917b42a8054b295393b @@ -111,6 +111,6 @@ vrfv2plus_client: ../../contracts/solc/v0.8.19/VRFV2PlusClient/VRFV2PlusClient.a vrfv2plus_consumer_example: ../../contracts/solc/v0.8.19/VRFV2PlusConsumerExample/VRFV2PlusConsumerExample.abi ../../contracts/solc/v0.8.19/VRFV2PlusConsumerExample/VRFV2PlusConsumerExample.bin 5e0bdf21048dd6b405ccaa3d260d7fb6d24fd256094310a5cb149aed68e4f892 vrfv2plus_malicious_migrator: ../../contracts/solc/v0.8.19/VRFV2PlusMaliciousMigrator/VRFV2PlusMaliciousMigrator.abi ../../contracts/solc/v0.8.19/VRFV2PlusMaliciousMigrator/VRFV2PlusMaliciousMigrator.bin 5dff20621fe6ed3bed75fe4b65381b0d4b1f6286ee3571553dbeb57213b53416 vrfv2plus_reverting_example: ../../contracts/solc/v0.8.19/VRFV2PlusRevertingExample/VRFV2PlusRevertingExample.abi ../../contracts/solc/v0.8.19/VRFV2PlusRevertingExample/VRFV2PlusRevertingExample.bin 82860e6ed846eaa4a5127b96c8ce4e444138412e9ed0605cfdecb6995436b3af -vrfv2plus_wrapper: ../../contracts/solc/v0.8.19/VRFV2PlusWrapper/VRFV2PlusWrapper.abi ../../contracts/solc/v0.8.19/VRFV2PlusWrapper/VRFV2PlusWrapper.bin 9d601662c578e5da232f065bde0053a6a03545127e8cac6f8897a78bc0861b3f -vrfv2plus_wrapper_consumer_example: ../../contracts/solc/v0.8.19/VRFV2PlusWrapperConsumerExample/VRFV2PlusWrapperConsumerExample.abi ../../contracts/solc/v0.8.19/VRFV2PlusWrapperConsumerExample/VRFV2PlusWrapperConsumerExample.bin 7554bc93b2a60361cdd5611f7802de58deba6257a84d11545993f4aa37bdff02 +vrfv2plus_wrapper: ../../contracts/solc/v0.8.19/VRFV2PlusWrapper/VRFV2PlusWrapper.abi ../../contracts/solc/v0.8.19/VRFV2PlusWrapper/VRFV2PlusWrapper.bin 3c98547449e5ce5ba7a858efa48052407247771c4f6f59f883a9ba38018ef634 +vrfv2plus_wrapper_consumer_example: ../../contracts/solc/v0.8.19/VRFV2PlusWrapperConsumerExample/VRFV2PlusWrapperConsumerExample.abi ../../contracts/solc/v0.8.19/VRFV2PlusWrapperConsumerExample/VRFV2PlusWrapperConsumerExample.bin aeb0c681fa264f90971f65cba1e8d41064948070b217c8204a80ac95e1fa2294 vrfv2plus_wrapper_load_test_consumer: ../../contracts/solc/v0.8.19/VRFV2PlusWrapperLoadTestConsumer/VRFV2PlusWrapperLoadTestConsumer.abi ../../contracts/solc/v0.8.19/VRFV2PlusWrapperLoadTestConsumer/VRFV2PlusWrapperLoadTestConsumer.bin 824cf74f968382efdcbbbc866eef884c13d59295b1f07b6646727ed4c0686c86 diff --git a/core/internal/features/features_test.go b/core/internal/features/features_test.go index 516f0ae0907..75ff98d05be 100644 --- a/core/internal/features/features_test.go +++ b/core/internal/features/features_test.go @@ -869,7 +869,7 @@ func TestIntegration_OCR(t *testing.T) { err = appBootstrap.Start(testutils.Context(t)) require.NoError(t, err) - jb, err := ocr.ValidatedOracleSpecToml(appBootstrap.GetRelayers().LegacyEVMChains(), fmt.Sprintf(` + jb, err := ocr.ValidatedOracleSpecToml(appBootstrap.Config, appBootstrap.GetRelayers().LegacyEVMChains(), fmt.Sprintf(` type = "offchainreporting" schemaVersion = 1 name = "boot" @@ -938,7 +938,7 @@ isBootstrapPeer = true // Note we need: observationTimeout + observationGracePeriod + DeltaGrace (500ms) < DeltaRound (1s) // So 200ms + 200ms + 500ms < 1s - jb, err := ocr.ValidatedOracleSpecToml(apps[i].GetRelayers().LegacyEVMChains(), fmt.Sprintf(` + jb, err := ocr.ValidatedOracleSpecToml(apps[i].Config, apps[i].GetRelayers().LegacyEVMChains(), fmt.Sprintf(` type = "offchainreporting" schemaVersion = 1 name = "web oracle spec" @@ -1094,7 +1094,7 @@ func TestIntegration_OCR_ForwarderFlow(t *testing.T) { require.NoError(t, err) // set forwardingAllowed = true - jb, err := ocr.ValidatedOracleSpecToml(appBootstrap.GetRelayers().LegacyEVMChains(), fmt.Sprintf(` + jb, err := ocr.ValidatedOracleSpecToml(appBootstrap.Config, appBootstrap.GetRelayers().LegacyEVMChains(), fmt.Sprintf(` type = "offchainreporting" schemaVersion = 1 name = "boot" @@ -1165,7 +1165,7 @@ isBootstrapPeer = true // Note we need: observationTimeout + observationGracePeriod + DeltaGrace (500ms) < DeltaRound (1s) // So 200ms + 200ms + 500ms < 1s // forwardingAllowed = true - jb, err := ocr.ValidatedOracleSpecToml(apps[i].GetRelayers().LegacyEVMChains(), fmt.Sprintf(` + jb, err := ocr.ValidatedOracleSpecToml(apps[i].Config, apps[i].GetRelayers().LegacyEVMChains(), fmt.Sprintf(` type = "offchainreporting" schemaVersion = 1 name = "web oracle spec" diff --git a/core/internal/mocks/application.go b/core/internal/mocks/application.go index c18cb7f8426..2438eb302c0 100644 --- a/core/internal/mocks/application.go +++ b/core/internal/mocks/application.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. package mocks diff --git a/core/internal/mocks/flags.go b/core/internal/mocks/flags.go index 32d21326ba0..3f9e47095e6 100644 --- a/core/internal/mocks/flags.go +++ b/core/internal/mocks/flags.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. package mocks diff --git a/core/internal/mocks/flux_aggregator.go b/core/internal/mocks/flux_aggregator.go index ac72bd07db8..c1e35f41e2f 100644 --- a/core/internal/mocks/flux_aggregator.go +++ b/core/internal/mocks/flux_aggregator.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. package mocks diff --git a/core/internal/mocks/prometheus_backend.go b/core/internal/mocks/prometheus_backend.go index 6573dbaf03f..81ff22d9d52 100644 --- a/core/internal/mocks/prometheus_backend.go +++ b/core/internal/mocks/prometheus_backend.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. package mocks diff --git a/core/internal/testutils/evmtest/evmtest.go b/core/internal/testutils/evmtest/evmtest.go index 83c356bf1a3..eedc6275928 100644 --- a/core/internal/testutils/evmtest/evmtest.go +++ b/core/internal/testutils/evmtest/evmtest.go @@ -37,7 +37,6 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/logger" "github.com/smartcontractkit/chainlink/v2/core/services/keystore" - "github.com/smartcontractkit/chainlink/v2/core/services/relay" evmrelay "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm" ) @@ -53,7 +52,7 @@ func NewChainScopedConfig(t testing.TB, cfg legacyevm.AppConfig) evmconfig.Chain } } - return evmconfig.NewTOMLChainScopedConfig(cfg, evmCfg, logger.TestLogger(t)) + return evmconfig.NewTOMLChainScopedConfig(evmCfg, logger.TestLogger(t)) } @@ -175,10 +174,10 @@ chains: } } -func (mo *TestConfigs) Chains(ids ...relay.ChainID) (cs []types.ChainStatus, count int, err error) { +func (mo *TestConfigs) Chains(chainIDs ...string) (cs []types.ChainStatus, count int, err error) { mo.mu.RLock() defer mo.mu.RUnlock() - if len(ids) == 0 { + if len(chainIDs) == 0 { for _, c := range mo.EVMConfigs { c2 := types.ChainStatus{ ID: c.ChainID.String(), @@ -196,7 +195,7 @@ func (mo *TestConfigs) Chains(ids ...relay.ChainID) (cs []types.ChainStatus, cou for i := range mo.EVMConfigs { c := mo.EVMConfigs[i] chainID := c.ChainID.String() - if !slices.Contains(ids, chainID) { + if !slices.Contains(chainIDs, chainID) { continue } c2 := types.ChainStatus{ @@ -214,19 +213,19 @@ func (mo *TestConfigs) Chains(ids ...relay.ChainID) (cs []types.ChainStatus, cou } // Nodes implements evmtypes.Configs -func (mo *TestConfigs) Nodes(id relay.ChainID) (nodes []evmtypes.Node, err error) { +func (mo *TestConfigs) Nodes(chainID string) (nodes []evmtypes.Node, err error) { mo.mu.RLock() defer mo.mu.RUnlock() for i := range mo.EVMConfigs { c := mo.EVMConfigs[i] - if id == c.ChainID.String() { + if chainID == c.ChainID.String() { for _, n := range c.Nodes { nodes = append(nodes, legacyNode(n, c.ChainID)) } } } - err = fmt.Errorf("no nodes: chain %s: %w", id, chains.ErrNotFound) + err = fmt.Errorf("no nodes: chain %s: %w", chainID, chains.ErrNotFound) return } diff --git a/core/internal/testutils/evmtest/v2/evmtest.go b/core/internal/testutils/evmtest/v2/evmtest.go index 22b2bc5e0ca..5621d91e748 100644 --- a/core/internal/testutils/evmtest/v2/evmtest.go +++ b/core/internal/testutils/evmtest/v2/evmtest.go @@ -6,7 +6,6 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/chains/evm/config" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/config/toml" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/utils/big" - "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/configtest" "github.com/smartcontractkit/chainlink/v2/core/logger" ) @@ -18,5 +17,5 @@ func ChainArbitrumRinkeby(t *testing.T) config.ChainScopedConfig { return scoped func scopedConfig(t *testing.T, chainID int64) config.ChainScopedConfig { id := big.NewI(chainID) evmCfg := toml.EVMConfig{ChainID: id, Chain: toml.Defaults(id)} - return config.NewTOMLChainScopedConfig(configtest.NewTestGeneralConfig(t), &evmCfg, logger.TestLogger(t)) + return config.NewTOMLChainScopedConfig(&evmCfg, logger.TestLogger(t)) } diff --git a/core/logger/logger_mock_test.go b/core/logger/logger_mock_test.go index afddd031888..8d52734fe57 100644 --- a/core/logger/logger_mock_test.go +++ b/core/logger/logger_mock_test.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. package logger diff --git a/core/logger/mocks/logger.go b/core/logger/mocks/logger.go index 316f6216b90..7e56bf8d22b 100644 --- a/core/logger/mocks/logger.go +++ b/core/logger/mocks/logger.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. package mocks diff --git a/core/scripts/go.mod b/core/scripts/go.mod index 7e1ee1f10d7..5be5d137696 100644 --- a/core/scripts/go.mod +++ b/core/scripts/go.mod @@ -21,10 +21,10 @@ require ( github.com/prometheus/client_golang v1.17.0 github.com/shopspring/decimal v1.3.1 github.com/smartcontractkit/chainlink-automation v1.0.3 - github.com/smartcontractkit/chainlink-common v0.1.7-0.20240419105123-fc5d616c7d2e + github.com/smartcontractkit/chainlink-common v0.1.7-0.20240419205832-845fa69af8d9 github.com/smartcontractkit/chainlink-vrf v0.0.0-20240222010609-cd67d123c772 github.com/smartcontractkit/chainlink/v2 v2.0.0-00010101000000-000000000000 - github.com/smartcontractkit/libocr v0.0.0-20240326191951-2bbe9382d052 + github.com/smartcontractkit/libocr v0.0.0-20240419185742-fd3cab206b2c github.com/spf13/cobra v1.6.1 github.com/spf13/viper v1.15.0 github.com/stretchr/testify v1.9.0 @@ -58,7 +58,6 @@ require ( github.com/XSAM/otelsql v0.27.0 // indirect github.com/armon/go-metrics v0.4.1 // indirect github.com/avast/retry-go/v4 v4.5.1 // indirect - github.com/aybabtme/rgbterm v0.0.0-20170906152045-cc83f3b3ce59 // indirect github.com/bahlo/generic-list-go v0.2.0 // indirect github.com/benbjohnson/clock v1.3.0 // indirect github.com/beorn7/perks v1.0.1 // indirect @@ -110,15 +109,15 @@ require ( github.com/docker/go-units v0.5.0 // indirect github.com/dominikbraun/graph v0.23.0 // indirect github.com/dustin/go-humanize v1.0.1 // indirect - github.com/dvsekhvalnov/jose2go v1.5.0 // indirect + github.com/dvsekhvalnov/jose2go v1.7.0 // indirect github.com/esote/minmaxheap v1.0.0 // indirect github.com/ethereum/c-kzg-4844 v0.4.0 // indirect github.com/fatih/color v1.16.0 // indirect github.com/fsnotify/fsnotify v1.6.0 // indirect github.com/fxamacker/cbor/v2 v2.5.0 // indirect github.com/gabriel-vasile/mimetype v1.4.2 // indirect - github.com/gagliardetto/binary v0.7.1 // indirect - github.com/gagliardetto/solana-go v1.4.1-0.20220428092759-5250b4abbb27 // indirect + github.com/gagliardetto/binary v0.7.7 // indirect + github.com/gagliardetto/solana-go v1.8.4 // indirect github.com/gagliardetto/treeout v0.1.4 // indirect github.com/gballet/go-libpcsclite v0.0.0-20191108122812-4678299bea08 // indirect github.com/gballet/go-verkle v0.1.1-0.20231031103413-a67434b50f46 // indirect @@ -254,13 +253,13 @@ require ( github.com/scylladb/go-reflectx v1.0.1 // indirect github.com/sethvargo/go-retry v0.2.4 // indirect github.com/shirou/gopsutil v3.21.11+incompatible // indirect - github.com/shirou/gopsutil/v3 v3.23.11 // indirect + github.com/shirou/gopsutil/v3 v3.24.3 // indirect github.com/sirupsen/logrus v1.9.3 // indirect github.com/smartcontractkit/chain-selectors v1.0.10 // indirect github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240419131812-73d148593d92 // indirect github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240220203239-09be0ea34540 // indirect - github.com/smartcontractkit/chainlink-feeds v0.0.0-20240119021347-3c541a78cdb8 // indirect - github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240216142700-c5869534c19e // indirect + github.com/smartcontractkit/chainlink-feeds v0.0.0-20240422130241-13c17a91b2ab // indirect + github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240422172640-59d47c73ba58 // indirect github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240325075535-0f7eb05ee595 // indirect github.com/smartcontractkit/tdh2/go/ocr2/decryptionplugin v0.0.0-20230906073235-9e478e5e19f1 // indirect github.com/smartcontractkit/tdh2/go/tdh2 v0.0.0-20230906073235-9e478e5e19f1 // indirect @@ -270,6 +269,7 @@ require ( github.com/spf13/jwalterweatherman v1.1.0 // indirect github.com/spf13/pflag v1.0.5 // indirect github.com/status-im/keycard-go v0.2.0 // indirect + github.com/streamingfast/logging v0.0.0-20220405224725-2755dab2ce75 // indirect github.com/subosito/gotenv v1.4.2 // indirect github.com/supranational/blst v0.3.11 // indirect github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d // indirect @@ -292,11 +292,12 @@ require ( github.com/valyala/fastjson v1.4.1 // indirect github.com/wk8/go-ordered-map/v2 v2.1.8 // indirect github.com/x448/float16 v0.8.4 // indirect - github.com/yusufpapurcu/wmi v1.2.3 // indirect + github.com/yusufpapurcu/wmi v1.2.4 // indirect github.com/zondax/hid v0.9.1 // indirect github.com/zondax/ledger-go v0.14.1 // indirect go.dedis.ch/fixbuf v1.0.3 // indirect go.etcd.io/bbolt v1.3.7 // indirect + go.mongodb.org/mongo-driver v1.15.0 // indirect go.opencensus.io v0.24.0 // indirect go.opentelemetry.io/contrib/instrumentation/github.com/gin-gonic/gin/otelgin v0.49.0 // indirect go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.1 // indirect @@ -311,13 +312,13 @@ require ( go.uber.org/ratelimit v0.3.0 // indirect go.uber.org/zap v1.26.0 // indirect golang.org/x/arch v0.7.0 // indirect - golang.org/x/crypto v0.21.0 // indirect + golang.org/x/crypto v0.22.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/net v0.24.0 // indirect golang.org/x/sync v0.6.0 // indirect - golang.org/x/sys v0.18.0 // indirect - golang.org/x/term v0.18.0 // indirect + golang.org/x/sys v0.19.0 // indirect + golang.org/x/term v0.19.0 // indirect golang.org/x/text v0.14.0 // indirect golang.org/x/time v0.5.0 // indirect golang.org/x/tools v0.18.0 // indirect diff --git a/core/scripts/go.sum b/core/scripts/go.sum index d43d5df8eea..b26bad1299e 100644 --- a/core/scripts/go.sum +++ b/core/scripts/go.sum @@ -156,11 +156,10 @@ github.com/aws/aws-sdk-go v1.22.1/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN github.com/aws/aws-sdk-go v1.23.20/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.45.25 h1:c4fLlh5sLdK2DCRTY1z0hyuJZU4ygxX8m1FswL6/nF4= github.com/aws/aws-sdk-go v1.45.25/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= -github.com/aybabtme/rgbterm v0.0.0-20170906152045-cc83f3b3ce59 h1:WWB576BN5zNSZc/M9d/10pqEx5VHNhaQ/yOVAkmj5Yo= -github.com/aybabtme/rgbterm v0.0.0-20170906152045-cc83f3b3ce59/go.mod h1:q/89r3U2H7sSsE2t6Kca0lfwTK8JdoNGS/yzM/4iH5I= github.com/aymerick/raymond v2.0.3-0.20180322193309-b565731e1464+incompatible/go.mod h1:osfaiScAUVup+UC9Nfq76eWqDhXlp+4UYaA8uhTBO6g= github.com/bahlo/generic-list-go v0.2.0 h1:5sz/EEAK+ls5wF+NeqDpk5+iNdMDXrh3z3nPnH1Wvgk= github.com/bahlo/generic-list-go v0.2.0/go.mod h1:2KvAjgMlE5NNynlg/5iLrrCCZ2+5xWbdbCW3pNTGyYg= +github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/benbjohnson/clock v1.3.0 h1:ip6w0uFQkncKQ979AypyG0ER7mqUSBdKLOgAle/AT8A= github.com/benbjohnson/clock v1.3.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= @@ -374,8 +373,8 @@ github.com/dominikbraun/graph v0.23.0/go.mod h1:yOjYyogZLY1LSG9E33JWZJiq5k83Qy2C github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= -github.com/dvsekhvalnov/jose2go v1.5.0 h1:3j8ya4Z4kMCwT5nXIKFSV84YS+HdqSSO0VsTQxaLAeM= -github.com/dvsekhvalnov/jose2go v1.5.0/go.mod h1:QsHjhyTlD/lAVqn/NSbVZmSCGeDehTB/mPZadG+mhXU= +github.com/dvsekhvalnov/jose2go v1.7.0 h1:bnQc8+GMnidJZA8zc6lLEAb4xNrIqHwO+9TzqvtQZPo= +github.com/dvsekhvalnov/jose2go v1.7.0/go.mod h1:QsHjhyTlD/lAVqn/NSbVZmSCGeDehTB/mPZadG+mhXU= github.com/eknkc/amber v0.0.0-20171010120322-cdade1c07385/go.mod h1:0vRUJqYpeSZifjYj7uP3BG/gKcuzL9xWVV/Y+cK33KM= github.com/elastic/go-sysinfo v1.11.1 h1:g9mwl05njS4r69TisC+vwHWTSKywZFYYUu3so3T/Lao= github.com/elastic/go-sysinfo v1.11.1/go.mod h1:6KQb31j0QeWBDF88jIdWSxE8cwoOB9tO4Y4osN7Q70E= @@ -427,13 +426,12 @@ github.com/fxamacker/cbor/v2 v2.5.0 h1:oHsG0V/Q6E/wqTS2O1Cozzsy69nqCiguo5Q1a1ADi github.com/fxamacker/cbor/v2 v2.5.0/go.mod h1:TA1xS00nchWmaBnEIxPSE5oHLuJBAVvqrtAnWBwBCVo= github.com/gabriel-vasile/mimetype v1.4.2 h1:w5qFW6JKBz9Y393Y4q372O9A7cUSequkh1Q7OhCmWKU= github.com/gabriel-vasile/mimetype v1.4.2/go.mod h1:zApsH/mKG4w07erKIaJPFiX0Tsq9BFQgN3qGY5GnNgA= -github.com/gagliardetto/binary v0.6.1/go.mod h1:aOfYkc20U0deHaHn/LVZXiqlkDbFAX0FpTlDhsXa0S0= -github.com/gagliardetto/binary v0.7.1 h1:6ggDQ26vR+4xEvl/S13NcdLK3MUCi4oSy73pS9aI1cI= -github.com/gagliardetto/binary v0.7.1/go.mod h1:aOfYkc20U0deHaHn/LVZXiqlkDbFAX0FpTlDhsXa0S0= +github.com/gagliardetto/binary v0.7.7 h1:QZpT38+sgoPg+TIQjH94sLbl/vX+nlIRA37pEyOsjfY= +github.com/gagliardetto/binary v0.7.7/go.mod h1:mUuay5LL8wFVnIlecHakSZMvcdqfs+CsotR5n77kyjM= github.com/gagliardetto/gofuzz v1.2.2 h1:XL/8qDMzcgvR4+CyRQW9UGdwPRPMHVJfqQ/uMvSUuQw= github.com/gagliardetto/gofuzz v1.2.2/go.mod h1:bkH/3hYLZrMLbfYWA0pWzXmi5TTRZnu4pMGZBkqMKvY= -github.com/gagliardetto/solana-go v1.4.1-0.20220428092759-5250b4abbb27 h1:q2IztKyRQUxJ6abXRsawaBtvDFvM+szj4jDqV4od1gs= -github.com/gagliardetto/solana-go v1.4.1-0.20220428092759-5250b4abbb27/go.mod h1:NFuoDwHPvw858ZMHUJr6bkhN8qHt4x6e+U3EYHxAwNY= +github.com/gagliardetto/solana-go v1.8.4 h1:vmD/JmTlonyXGy39bAo0inMhmbdAwV7rXZtLDMZeodE= +github.com/gagliardetto/solana-go v1.8.4/go.mod h1:i+7aAyNDTHG0jK8GZIBSI4OVvDqkt2Qx+LklYclRNG8= github.com/gagliardetto/treeout v0.1.4 h1:ozeYerrLCmCubo1TcIjFiOWTTGteOOHND1twdFpgwaw= github.com/gagliardetto/treeout v0.1.4/go.mod h1:loUefvXTrlRG5rYmJmExNryyBRh8f89VZhmMOyCyqok= github.com/gavv/httpexpect v2.0.0+incompatible/go.mod h1:x+9tiU1YnrOvnB725RkpoLv1M62hOWzwo5OXotisrKc= @@ -581,6 +579,7 @@ github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= +github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb h1:PBC98N2aIaM3XXiurYmW7fx4GZkL8feAMVq7nEjURHk= @@ -995,6 +994,7 @@ github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lN github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= +github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc= github.com/montanaflynn/stats v0.7.1 h1:etflOAAHORrCC44V+aR6Ftzort912ZU+YLiSTuV8eaE= github.com/montanaflynn/stats v0.7.1/go.mod h1:etXPPgVO6n31NxCd9KQUMvCM+ve0ruNzt6R8Bnaayow= github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= @@ -1167,8 +1167,8 @@ github.com/sethvargo/go-retry v0.2.4 h1:T+jHEQy/zKJf5s95UkguisicE0zuF9y7+/vgz08O github.com/sethvargo/go-retry v0.2.4/go.mod h1:1afjQuvh7s4gflMObvjLPaWgluLLyhA1wmVZ6KLpICw= github.com/shirou/gopsutil v3.21.11+incompatible h1:+1+c1VGhc88SSonWP6foOcLhvnKlUeu/erjjvaPEYiI= github.com/shirou/gopsutil v3.21.11+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= -github.com/shirou/gopsutil/v3 v3.23.11 h1:i3jP9NjCPUz7FiZKxlMnODZkdSIp2gnzfrvsu9CuWEQ= -github.com/shirou/gopsutil/v3 v3.23.11/go.mod h1:1FrWgea594Jp7qmjHUUPlJDTPgcsb9mGnXDxavtikzM= +github.com/shirou/gopsutil/v3 v3.24.3 h1:eoUGJSmdfLzJ3mxIhmOAhgKEKgQkeOwKpz1NbhVnuPE= +github.com/shirou/gopsutil/v3 v3.24.3/go.mod h1:JpND7O217xa72ewWz9zN2eIIkPWsDN/3pl0H8Qt0uwg= github.com/shoenig/go-m1cpu v0.1.6/go.mod h1:1JJMcUBvfNwpq05QDQVAnx3gUHr9IYF7GNg9SUEw2VQ= github.com/shoenig/test v0.6.4/go.mod h1:byHiCGXqrVaflBLAMq/srcZIHynQPQgeyvkvXnjqq0k= github.com/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24/go.mod h1:M+9NzErvs504Cn4c5DxATwIqPbtswREoFCre64PpcG4= @@ -1185,16 +1185,16 @@ github.com/smartcontractkit/chain-selectors v1.0.10 h1:t9kJeE6B6G+hKD0GYR4kGJSCq github.com/smartcontractkit/chain-selectors v1.0.10/go.mod h1:d4Hi+E1zqjy9HqMkjBE5q1vcG9VGgxf5VxiRHfzi2kE= github.com/smartcontractkit/chainlink-automation v1.0.3 h1:h/ijT0NiyV06VxYVgcNfsE3+8OEzT3Q0Z9au0z1BPWs= github.com/smartcontractkit/chainlink-automation v1.0.3/go.mod h1:RjboV0Qd7YP+To+OrzHGXaxUxoSONveCoAK2TQ1INLU= -github.com/smartcontractkit/chainlink-common v0.1.7-0.20240419105123-fc5d616c7d2e h1:nHs5mFOR7FPII20GrCGIPywDW43MhEUlD7DqHnTgu6Q= -github.com/smartcontractkit/chainlink-common v0.1.7-0.20240419105123-fc5d616c7d2e/go.mod h1:GTDBbovHUSAUk+fuGIySF2A/whhdtHGaWmU61BoERks= +github.com/smartcontractkit/chainlink-common v0.1.7-0.20240419205832-845fa69af8d9 h1:elDIBChe7ByPNvCyrSjMLTPKrgY+sKgzzlWe2p3wokY= +github.com/smartcontractkit/chainlink-common v0.1.7-0.20240419205832-845fa69af8d9/go.mod h1:GTDBbovHUSAUk+fuGIySF2A/whhdtHGaWmU61BoERks= github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240419131812-73d148593d92 h1:MvaNzuaQh1vX4CAYLM8qFd99cf0ZF1JNwtDZtLU7WvU= github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240419131812-73d148593d92/go.mod h1:uATrrJ8IsuBkOBJ46USuf73gz9gZy5k5bzGE5/ji/rc= github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240220203239-09be0ea34540 h1:xFSv8561jsLtF6gYZr/zW2z5qUUAkcFkApin2mnbYTo= github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240220203239-09be0ea34540/go.mod h1:sjAmX8K2kbQhvDarZE1ZZgDgmHJ50s0BBc/66vKY2ek= -github.com/smartcontractkit/chainlink-feeds v0.0.0-20240119021347-3c541a78cdb8 h1:1BcjXuviSAKttOX7BZoVHRZZGfxqoA2+AL8tykmkdoc= -github.com/smartcontractkit/chainlink-feeds v0.0.0-20240119021347-3c541a78cdb8/go.mod h1:vy1L7NybTy2F/Yv7BOh+oZBa1MACD6gzd1+DkcSkfp8= -github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240216142700-c5869534c19e h1:k8HS3GsAFZnxXIW3141VsQP2+EL1XrTtOi/HDt7sdBE= -github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240216142700-c5869534c19e/go.mod h1:JiykN+8W5TA4UD2ClrzQCVvcH3NcyLEVv7RwY0busrw= +github.com/smartcontractkit/chainlink-feeds v0.0.0-20240422130241-13c17a91b2ab h1:Ct1oUlyn03HDUVdFHJqtRGRUujMqdoMzvf/Cjhe30Ag= +github.com/smartcontractkit/chainlink-feeds v0.0.0-20240422130241-13c17a91b2ab/go.mod h1:RPUY7r8GxgzXxS1ijtU1P/fpJomOXztXgUbEziNmbCA= +github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240422172640-59d47c73ba58 h1:jc4ab5QrKZfkICyxJysCt7mSExuSPbePjgZsnJR3nRQ= +github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240422172640-59d47c73ba58/go.mod h1:oV5gIuSKrPEcjQ6uB6smBsm5kXHxyydVLNyAs4V9CoQ= github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240325075535-0f7eb05ee595 h1:y6ks0HsSOhPUueOmTcoxDQ50RCS1XINlRDTemZyHjFw= github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240325075535-0f7eb05ee595/go.mod h1:vV6WfnVIbK5Q1JsIru4YcTG0T1uRpLJm6t2BgCnCSsg= github.com/smartcontractkit/chainlink-vrf v0.0.0-20240222010609-cd67d123c772 h1:LQmRsrzzaYYN3wEU1l5tWiccznhvbyGnu2N+wHSXZAo= @@ -1203,8 +1203,8 @@ github.com/smartcontractkit/go-plugin v0.0.0-20240208201424-b3b91517de16 h1:TFe+ github.com/smartcontractkit/go-plugin v0.0.0-20240208201424-b3b91517de16/go.mod h1:lBS5MtSSBZk0SHc66KACcjjlU6WzEVP/8pwz68aMkCI= github.com/smartcontractkit/grpc-proxy v0.0.0-20230731113816-f1be6620749f h1:hgJif132UCdjo8u43i7iPN1/MFnu49hv7lFGFftCHKU= github.com/smartcontractkit/grpc-proxy v0.0.0-20230731113816-f1be6620749f/go.mod h1:MvMXoufZAtqExNexqi4cjrNYE9MefKddKylxjS+//n0= -github.com/smartcontractkit/libocr v0.0.0-20240326191951-2bbe9382d052 h1:1WFjrrVrWoQ9UpVMh7Mx4jDpzhmo1h8hFUKd9awIhIU= -github.com/smartcontractkit/libocr v0.0.0-20240326191951-2bbe9382d052/go.mod h1:SJEZCHgMCAzzBvo9vMV2DQ9onfEcIJCYSViyP4JI6c4= +github.com/smartcontractkit/libocr v0.0.0-20240419185742-fd3cab206b2c h1:lIyMbTaF2H0Q71vkwZHX/Ew4KF2BxiKhqEXwF8rn+KI= +github.com/smartcontractkit/libocr v0.0.0-20240419185742-fd3cab206b2c/go.mod h1:fb1ZDVXACvu4frX3APHZaEBp0xi1DIm34DcA0CwTsZM= github.com/smartcontractkit/tdh2/go/ocr2/decryptionplugin v0.0.0-20230906073235-9e478e5e19f1 h1:yiKnypAqP8l0OX0P3klzZ7SCcBUxy5KqTAKZmQOvSQE= github.com/smartcontractkit/tdh2/go/ocr2/decryptionplugin v0.0.0-20230906073235-9e478e5e19f1/go.mod h1:q6f4fe39oZPdsh1i57WznEZgxd8siidMaSFq3wdPmVg= github.com/smartcontractkit/tdh2/go/tdh2 v0.0.0-20230906073235-9e478e5e19f1 h1:Dai1bn+Q5cpeGMQwRdjOdVjG8mmFFROVkSKuUgBErRQ= @@ -1240,6 +1240,8 @@ github.com/spf13/viper v1.15.0 h1:js3yy885G8xwJa6iOISGFwd+qlUo5AvyXb7CiihdtiU= github.com/spf13/viper v1.15.0/go.mod h1:fFcTBJxvhhzSJiZy8n+PeW6t8l+KeT/uTARa0jHOQLA= github.com/status-im/keycard-go v0.2.0 h1:QDLFswOQu1r5jsycloeQh3bVU8n/NatHHaZobtDnDzA= github.com/status-im/keycard-go v0.2.0/go.mod h1:wlp8ZLbsmrF6g6WjugPAx+IzoLrkdf9+mHxBEeo3Hbg= +github.com/streamingfast/logging v0.0.0-20220405224725-2755dab2ce75 h1:ZqpS7rAhhKD7S7DnrpEdrnW1/gZcv82ytpMviovkli4= +github.com/streamingfast/logging v0.0.0-20220405224725-2755dab2ce75/go.mod h1:VlduQ80JcGJSargkRU4Sg9Xo63wZD/l8A5NC/Uo1/uU= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= @@ -1287,6 +1289,7 @@ github.com/tidwall/gjson v1.17.0 h1:/Jocvlh98kcTfpN2+JzGQWQcqrPQwDrVEMApx/M5ZwM= github.com/tidwall/gjson v1.17.0/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= github.com/tidwall/match v1.1.1 h1:+Ho715JplO36QYgwN9PGYNhgZvoUSc9X2c80KVTi+GA= github.com/tidwall/match v1.1.1/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= +github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tidwall/pretty v1.2.0 h1:RWIZEg2iJ8/g6fDDYzMpobmaoGh5OLl4AXtGUGPcqCs= github.com/tidwall/pretty v1.2.0/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= @@ -1335,6 +1338,9 @@ github.com/wk8/go-ordered-map/v2 v2.1.8 h1:5h/BUHu93oj4gIdvHHHGsScSTMijfx5PeYkE/ github.com/wk8/go-ordered-map/v2 v2.1.8/go.mod h1:5nJHM5DyteebpVlHnWMV0rPz6Zp7+xBAnxjb1X5vnTw= github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM= github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg= +github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI= +github.com/xdg-go/scram v1.1.1/go.mod h1:RaEWvsqvNKKvBPvcKeFjrG2cJqOkHTiyTpzz23ni57g= +github.com/xdg-go/stringprep v1.0.3/go.mod h1:W3f5j4i+9rC0kuIEJL0ky1VpHXQU3ocBgklLGvcBnW8= github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb h1:zGWFAtiMcyryUHoUjUJX0/lt1H2+i2Ka2n+D3DImSNo= github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= @@ -1351,6 +1357,7 @@ github.com/ydb-platform/ydb-go-genproto v0.0.0-20231012155159-f85a672542fd h1:dz github.com/ydb-platform/ydb-go-genproto v0.0.0-20231012155159-f85a672542fd/go.mod h1:Er+FePu1dNUieD+XTMDduGpQuCPssK5Q4BjF+IIXJ3I= github.com/ydb-platform/ydb-go-sdk/v3 v3.54.2 h1:E0yUuuX7UmPxXm92+yQCjMveLFO3zfvYFIJVuAqsVRA= github.com/ydb-platform/ydb-go-sdk/v3 v3.54.2/go.mod h1:fjBLQ2TdQNl4bMjuWl9adoTGBypwUTPoGC+EqYqiIcU= +github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d/go.mod h1:rHwXgn7JulP+udvsHwJoVG1YGAP6VLg4y9I5dyZdqmA= github.com/yudai/gojsondiff v1.0.0/go.mod h1:AY32+k2cwILAkW1fbgxQ5mUmMiZFgLIV+FBNExI05xg= github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82/go.mod h1:lgjkn3NuSvDfVJdfcVVdX+jpBxNmX4rDAzaS45IcYoM= github.com/yudai/pp v2.0.1+incompatible/go.mod h1:PuxR/8QJ7cyCkFp/aUDS+JY727OFEZkTdatxwunjIkc= @@ -1360,8 +1367,8 @@ github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= -github.com/yusufpapurcu/wmi v1.2.3 h1:E1ctvB7uKFMOJw3fdOW32DwGE9I7t++CRUEMKvFoFiw= -github.com/yusufpapurcu/wmi v1.2.3/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= +github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0= +github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= github.com/zenazn/goji v0.9.0/go.mod h1:7S9M489iMyHBNxwZnk9/EHS098H4/F6TATF2mIxtB1Q= github.com/zondax/hid v0.9.1 h1:gQe66rtmyZ8VeGFcOpbuH3r7erYtNEAezCAYu8LdkJo= github.com/zondax/hid v0.9.1/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= @@ -1380,6 +1387,9 @@ go.dedis.ch/protobuf v1.0.11/go.mod h1:97QR256dnkimeNdfmURz0wAMNVbd1VmLXhG1CrTYr go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.7 h1:j+zJOnnEjF/kyHlDDgGnVL/AIqIJPq8UoB2GSNfkUfQ= go.etcd.io/bbolt v1.3.7/go.mod h1:N9Mkw9X8x5fupy0IKsmuqVtoGDyxsaDlbk4Rd05IAQw= +go.mongodb.org/mongo-driver v1.11.0/go.mod h1:s7p5vEtfbeR1gYi6pnj3c3/urpbLv2T5Sfd6Rp2HBB8= +go.mongodb.org/mongo-driver v1.15.0 h1:rJCKC8eEliewXjZGf0ddURtl7tTVy1TK3bfl0gkUSLc= +go.mongodb.org/mongo-driver v1.15.0/go.mod h1:Vzb0Mk/pa7e6cWw85R4F/endUC3u0U9jGcNU603k65c= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.1/go.mod h1:Ap50jQcDJrx6rB6VgeeFPtuPIf3wMRvRfrfYDO6+BmA= @@ -1418,6 +1428,7 @@ go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE= go.uber.org/atomic v1.11.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= +go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= @@ -1435,6 +1446,7 @@ go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= go.uber.org/zap v1.14.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= go.uber.org/zap v1.16.0/go.mod h1:MA8QOfq0BHJwdXa996Y4dYkAqRKB8/1K1QMMZVaNZjQ= +go.uber.org/zap v1.21.0/go.mod h1:wjWOCqI0f2ZZrJF/UufIOkiC8ii6tm1iqIsLo76RfJw= go.uber.org/zap v1.26.0 h1:sI7k6L95XOKS281NhVKOFCUNIvv9e0w4BF8N3u+tCRo= go.uber.org/zap v1.26.0/go.mod h1:dtElttAiwGvoJ/vj4IwHBS/gXsEu/pZ50mUIRWuG0so= golang.org/x/arch v0.0.0-20210923205945-b76863e36670/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= @@ -1460,14 +1472,15 @@ golang.org/x/crypto v0.0.0-20201203163018-be400aefbc4c/go.mod h1:jdWPYTVW3xRLrWP golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= -golang.org/x/crypto v0.0.0-20210513164829-c07d793c2f9a/go.mod h1:P+XmwS30IXTQdn5tA2iutPOUgjI07+tq3H3K9MVA1s8= golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20220214200702-86341886e292/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc= -golang.org/x/crypto v0.21.0 h1:X31++rzVUdKhX5sWmSOFZxx8UW/ldWx55cbf08iNAMA= -golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs= +golang.org/x/crypto v0.22.0 h1:g1v0xeRhjcugydODzvb3mEM9SQ0HGp9s/nh3COQ/C30= +golang.org/x/crypto v0.22.0/go.mod h1:vr6Su+7cTlO45qkww3VDJlzDn0ctJvRgYbC2NvXHt+M= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -1559,15 +1572,15 @@ golang.org/x/net v0.0.0-20210331212208-0fccb6fa2b5c/go.mod h1:p54w0d4576C0XHj96b golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20210423184538-5f58ad60dda6/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= -golang.org/x/net v0.0.0-20210510120150-4163338589ed/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211008194852-3b03d305991f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= -golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4= -golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= +golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= +golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -1659,7 +1672,6 @@ golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -1681,9 +1693,9 @@ golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= +golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20201210144234-2321bbc49cbf/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= @@ -1691,8 +1703,8 @@ golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuX golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= golang.org/x/term v0.12.0/go.mod h1:owVbMEjm3cBLCHdkQu9b1opXd4ETQWc3BhuQGKgXgvU= -golang.org/x/term v0.18.0 h1:FcHjZXDMxI8mM3nwhX9HlKop4C0YQvCVCdwYl2wOtE8= -golang.org/x/term v0.18.0/go.mod h1:ILwASektA3OnRv7amZ1xhE/KTR+u50pbXfZ03+6Nx58= +golang.org/x/term v0.19.0 h1:+ThwsDv+tYfnJFhF4L8jITxu1tdTWRTZpdsWgEgjL6Q= +golang.org/x/term v0.19.0/go.mod h1:2CuTdWZ7KHSQwUzKva0cbMg6q2DMI3Mmxp+gKJbskEk= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -1760,7 +1772,6 @@ golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWc golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200601175630-2caf76543d99/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= @@ -1776,6 +1787,7 @@ golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4f golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= golang.org/x/tools v0.18.0 h1:k8NLag8AGHnn+PHbl7g43CtqZAwG60vZkLqgyZgIHgQ= diff --git a/core/scripts/setup_testdb.sh b/core/scripts/setup_testdb.sh new file mode 100755 index 00000000000..8f30e159d1c --- /dev/null +++ b/core/scripts/setup_testdb.sh @@ -0,0 +1,66 @@ +#/bin/sh + +# Create a new user and database for development +# This script is intended to be run on a local development machine +tdir=$(mktemp -d -t db-dev-user) + +username="chainlink_dev" +password="insecurepassword" +database="chainlink_development_test" +# here document for the SQL commands +cat << EOF > $tdir/db-dev-user.sql +-- create a new user and database for development if they don't exist +DO \$\$ +BEGIN + IF NOT EXISTS (SELECT FROM pg_roles WHERE rolname = '$username') THEN + CREATE ROLE $username WITH LOGIN PASSWORD '$password'; + END IF; +END \$\$; +SELECT 'CREATE DATABASE $database WITH OWNER $username;' +WHERE NOT EXISTS (SELECT FROM pg_database WHERE datname = '$database')\gexec + +-- Grant all privileges on the database to the user +ALTER DATABASE $database OWNER TO $username; +GRANT ALL PRIVILEGES ON DATABASE "$database" TO "$username"; + +-- Create a pristine database for testing +SELECT 'CREATE DATABASE chainlink_test_pristine WITH OWNER $username;' +WHERE NOT EXISTS (SELECT FROM pg_database WHERE datname = 'chainlink_test_pristine')\gexec +EOF + +# Print the SQL commands +echo "SQL commands to be run: $tdir/db-dev-user.sql" +echo "##########################################################################################################" +echo "##########################################################################################################" + +cat $tdir/db-dev-user.sql +echo "##########################################################################################################" +echo "##########################################################################################################" +echo "" +# Run the SQL commands +psql -U postgres -h localhost -f $tdir/db-dev-user.sql + + +#test the connection +PGPASSWORD=$password psql -U $username -h localhost -d $database -c "SELECT 1" && echo "Connection successful" || echo "Connection failed" + +db_url=$(echo "CL_DATABASE_URL=postgresql://chainlink_dev:insecurepassword@localhost:5432/chainlink_development_test") +echo $db_url +repo=$(git rev-parse --show-toplevel) +pushd $repo +export $db_url +make testdb || echo "Failed to create test database" +popd + +# Set the database URL in the .dbenv file +dbenv=$repo/.dbenv +echo "\n!Success!\n" +echo "Datbase URL: $db_url" + +echo "export $db_url" >> $dbenv +echo "Has been set in the $dbenv file" + +echo "Either" +echo " source $dbenv" +echo "Or explicitly set environment variable in your shell" +echo " export $db_url" \ No newline at end of file diff --git a/core/scripts/vrfv2/testnet/v2scripts/super_scripts.go b/core/scripts/vrfv2/testnet/v2scripts/super_scripts.go index b4d29af3aee..f392a35f246 100644 --- a/core/scripts/vrfv2/testnet/v2scripts/super_scripts.go +++ b/core/scripts/vrfv2/testnet/v2scripts/super_scripts.go @@ -63,7 +63,7 @@ func DeployUniverseViaCLI(e helpers.Environment) { bhsJobRunTimeout := flag.String("bhs-job-run-timeout", "1m", "") deployVRFOwner := deployCmd.Bool("deploy-vrf-owner", true, "whether to deploy VRF owner contracts") - useTestCoordinator := deployCmd.Bool("use-test-coordinator", true, "whether to use test coordinator") + useTestCoordinator := deployCmd.Bool("use-test-coordinator", false, "whether to use test coordinator") simulationBlock := deployCmd.String("simulation-block", "pending", "simulation block can be 'pending' or 'latest'") // optional flags diff --git a/core/scripts/vrfv2plus/testnet/main.go b/core/scripts/vrfv2plus/testnet/main.go index 9c7d212fc82..c2e6a710858 100644 --- a/core/scripts/vrfv2plus/testnet/main.go +++ b/core/scripts/vrfv2plus/testnet/main.go @@ -1207,7 +1207,8 @@ func main() { cmd := flag.NewFlagSet("wrapper-configure", flag.ExitOnError) wrapperAddress := cmd.String("wrapper-address", "", "address of the VRFV2Wrapper contract") wrapperGasOverhead := cmd.Uint("wrapper-gas-overhead", 50_000, "amount of gas overhead in wrapper fulfillment") - coordinatorGasOverhead := cmd.Uint("coordinator-gas-overhead", 52_000, "amount of gas overhead in coordinator fulfillment") + coordinatorGasOverheadNative := cmd.Uint("coordinator-gas-overhead-native", 52_000, "amount of gas overhead in coordinator fulfillment for native payment") + coordinatorGasOverheadLink := cmd.Uint("coordinator-gas-overhead-link", 52_000, "amount of gas overhead in coordinator fulfillment for link payment") coordinatorGasOverheadPerWord := cmd.Uint("coordinator-gas-overhead-per-word", 0, "amount of gas overhead in coordinator fulfillment") wrapperNativePremiumPercentage := cmd.Uint("wrapper-native-premium-percentage", 25, "gas premium charged by wrapper for native payment") wrapperLinkPremiumPercentage := cmd.Uint("wrapper-link-premium-percentage", 25, "gas premium charged by wrapper for link payment") @@ -1222,7 +1223,8 @@ func main() { v2plusscripts.WrapperConfigure(e, common.HexToAddress(*wrapperAddress), *wrapperGasOverhead, - *coordinatorGasOverhead, + *coordinatorGasOverheadNative, + *coordinatorGasOverheadLink, *coordinatorGasOverheadPerWord, *wrapperNativePremiumPercentage, *wrapperLinkPremiumPercentage, @@ -1267,13 +1269,19 @@ func main() { cbGasLimit := cmd.Uint("cb-gas-limit", 100_000, "request callback gas limit") confirmations := cmd.Uint("request-confirmations", 3, "request confirmations") numWords := cmd.Uint("num-words", 1, "num words to request") + nativePayment := cmd.Bool("native-payment", false, "whether to use native payment or not") helpers.ParseArgs(cmd, os.Args[2:], "consumer-address") consumer, err := vrfv2plus_wrapper_consumer_example.NewVRFV2PlusWrapperConsumerExample( common.HexToAddress(*consumerAddress), e.Ec) helpers.PanicErr(err) - tx, err := consumer.MakeRequest(e.Owner, uint32(*cbGasLimit), uint16(*confirmations), uint32(*numWords)) + var tx *types.Transaction + if *nativePayment { + tx, err = consumer.MakeRequestNative(e.Owner, uint32(*cbGasLimit), uint16(*confirmations), uint32(*numWords)) + } else { + tx, err = consumer.MakeRequest(e.Owner, uint32(*cbGasLimit), uint16(*confirmations), uint32(*numWords)) + } helpers.PanicErr(err) helpers.ConfirmTXMined(context.Background(), e.Ec, tx, e.ChainID) case "wrapper-consumer-request-status": diff --git a/core/scripts/vrfv2plus/testnet/v2plusscripts/super_scripts.go b/core/scripts/vrfv2plus/testnet/v2plusscripts/super_scripts.go index 831b258fb6e..f749a8a2ef7 100644 --- a/core/scripts/vrfv2plus/testnet/v2plusscripts/super_scripts.go +++ b/core/scripts/vrfv2plus/testnet/v2plusscripts/super_scripts.go @@ -869,7 +869,8 @@ func DeployWrapperUniverse(e helpers.Environment) { coordinatorAddress := cmd.String("coordinator-address", "", "address of the vrf coordinator v2 contract") subscriptionID := cmd.String("subscription-id", "", "subscription ID for the wrapper") wrapperGasOverhead := cmd.Uint("wrapper-gas-overhead", 50_000, "amount of gas overhead in wrapper fulfillment") - coordinatorGasOverhead := cmd.Uint("coordinator-gas-overhead", 52_000, "amount of gas overhead in coordinator fulfillment") + coordinatorGasOverheadNative := cmd.Uint("coordinator-gas-overhead-native", 52_000, "amount of gas overhead in coordinator fulfillment for native payment") + coordinatorGasOverheadLink := cmd.Uint("coordinator-gas-overhead-link", 74_000, "amount of gas overhead in coordinator fulfillment for link payment") coordinatorGasOverheadPerWord := cmd.Uint("coordinator-gas-overhead-per-word", 0, "amount of gas overhead per word in coordinator fulfillment") wrapperNativePremiumPercentage := cmd.Uint("wrapper-native-premium-percentage", 25, "gas premium charged by wrapper for native payment") wrapperLinkPremiumPercentage := cmd.Uint("wrapper-link-premium-percentage", 25, "gas premium charged by wrapper for link payment") @@ -899,7 +900,8 @@ func DeployWrapperUniverse(e helpers.Environment) { WrapperConfigure(e, wrapper, *wrapperGasOverhead, - *coordinatorGasOverhead, + *coordinatorGasOverheadNative, + *coordinatorGasOverheadLink, *coordinatorGasOverheadPerWord, *wrapperNativePremiumPercentage, *wrapperLinkPremiumPercentage, diff --git a/core/scripts/vrfv2plus/testnet/v2plusscripts/util.go b/core/scripts/vrfv2plus/testnet/v2plusscripts/util.go index ae57c4caae5..6fbdc88b869 100644 --- a/core/scripts/vrfv2plus/testnet/v2plusscripts/util.go +++ b/core/scripts/vrfv2plus/testnet/v2plusscripts/util.go @@ -254,7 +254,8 @@ func WrapperConfigure( e helpers.Environment, wrapperAddress common.Address, wrapperGasOverhead uint, - coordinatorGasOverhead, coordinatorGasOverheadPerWord uint, + coordinatorGasOverheadNative, coordinatorGasOverheadLink uint, + coordinatorGasOverheadPerWord uint, nativePremiumPercentage, linkPremiumPercentage uint, keyHash string, maxNumWords uint, @@ -269,7 +270,8 @@ func WrapperConfigure( tx, err := wrapper.SetConfig( e.Owner, uint32(wrapperGasOverhead), - uint32(coordinatorGasOverhead), + uint32(coordinatorGasOverheadNative), + uint32(coordinatorGasOverheadLink), uint16(coordinatorGasOverheadPerWord), uint8(nativePremiumPercentage), uint8(linkPremiumPercentage), diff --git a/core/services/blockhashstore/bhs_test.go b/core/services/blockhashstore/bhs_test.go index 94e9f22ee7c..b2e978293df 100644 --- a/core/services/blockhashstore/bhs_test.go +++ b/core/services/blockhashstore/bhs_test.go @@ -49,7 +49,7 @@ func TestStoreRotatesFromAddresses(t *testing.T) { require.NoError(t, err) bhs, err := blockhashstore.NewBulletproofBHS( chain.Config().EVM().GasEstimator(), - chain.Config().Database(), + cfg.Database(), fromAddresses, txm, store, diff --git a/core/services/blockhashstore/delegate.go b/core/services/blockhashstore/delegate.go index 243259a2b1a..3c5109f82c1 100644 --- a/core/services/blockhashstore/delegate.go +++ b/core/services/blockhashstore/delegate.go @@ -12,6 +12,7 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/services" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/types" "github.com/smartcontractkit/chainlink/v2/core/chains/legacyevm" + "github.com/smartcontractkit/chainlink/v2/core/config" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/blockhash_store" v1 "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/solidity_vrf_coordinator_interface" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/trusted_blockhash_store" @@ -25,8 +26,14 @@ import ( var _ job.ServiceCtx = &service{} +type Config interface { + Feature() config.Feature + Database() config.Database +} + // Delegate creates BlockhashStore feeder jobs. type Delegate struct { + cfg Config logger logger.Logger legacyChains legacyevm.LegacyChainContainer ks keystore.Eth @@ -34,11 +41,13 @@ type Delegate struct { // NewDelegate creates a new Delegate. func NewDelegate( + cfg Config, logger logger.Logger, legacyChains legacyevm.LegacyChainContainer, ks keystore.Eth, ) *Delegate { return &Delegate{ + cfg: cfg, logger: logger, legacyChains: legacyChains, ks: ks, @@ -68,7 +77,7 @@ func (d *Delegate) ServicesForSpec(ctx context.Context, jb job.Job) ([]job.Servi "getting chain ID %d: %w", jb.BlockhashStoreSpec.EVMChainID.ToInt(), err) } - if !chain.Config().Feature().LogPoller() { + if !d.cfg.Feature().LogPoller() { return nil, errors.New("log poller must be enabled to run blockhashstore") } @@ -151,7 +160,7 @@ func (d *Delegate) ServicesForSpec(ctx context.Context, jb job.Job) ([]job.Servi bpBHS, err := NewBulletproofBHS( chain.Config().EVM().GasEstimator(), - chain.Config().Database(), + d.cfg.Database(), fromAddresses, chain.TxManager(), bhs, diff --git a/core/services/blockhashstore/delegate_test.go b/core/services/blockhashstore/delegate_test.go index 6aaeb59152a..6bc93546605 100644 --- a/core/services/blockhashstore/delegate_test.go +++ b/core/services/blockhashstore/delegate_test.go @@ -33,7 +33,7 @@ func TestDelegate_JobType(t *testing.T) { t.Parallel() lggr := logger.TestLogger(t) - delegate := blockhashstore.NewDelegate(lggr, nil, nil) + delegate := blockhashstore.NewDelegate(nil, lggr, nil, nil) assert.Equal(t, job.BlockhashStore, delegate.JobType()) } @@ -72,7 +72,7 @@ func createTestDelegate(t *testing.T) (*blockhashstore.Delegate, *testData) { }, ) legacyChains := evmrelay.NewLegacyChainsFromRelayerExtenders(relayExtenders) - return blockhashstore.NewDelegate(lggr, legacyChains, kst), &testData{ + return blockhashstore.NewDelegate(cfg, lggr, legacyChains, kst), &testData{ ethClient: ethClient, ethKeyStore: kst, legacyChains: legacyChains, diff --git a/core/services/blockhashstore/mocks/bhs.go b/core/services/blockhashstore/mocks/bhs.go index a69016c8026..43b4769c029 100644 --- a/core/services/blockhashstore/mocks/bhs.go +++ b/core/services/blockhashstore/mocks/bhs.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. package mocks diff --git a/core/services/blockhashstore/mocks/timer.go b/core/services/blockhashstore/mocks/timer.go index 4236bdf8d92..46212b4c021 100644 --- a/core/services/blockhashstore/mocks/timer.go +++ b/core/services/blockhashstore/mocks/timer.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. package mocks diff --git a/core/services/blockheaderfeeder/delegate.go b/core/services/blockheaderfeeder/delegate.go index b750b735de8..d848ba7c61e 100644 --- a/core/services/blockheaderfeeder/delegate.go +++ b/core/services/blockheaderfeeder/delegate.go @@ -11,6 +11,7 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/services" "github.com/smartcontractkit/chainlink/v2/core/chains/legacyevm" + "github.com/smartcontractkit/chainlink/v2/core/config" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/batch_blockhash_store" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/blockhash_store" v1 "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/solidity_vrf_coordinator_interface" @@ -25,18 +26,26 @@ import ( var _ job.ServiceCtx = &service{} +type Config interface { + Feature() config.Feature + Database() config.Database +} + type Delegate struct { + cfg Config logger logger.Logger legacyChains legacyevm.LegacyChainContainer ks keystore.Eth } func NewDelegate( + cfg Config, logger logger.Logger, legacyChains legacyevm.LegacyChainContainer, ks keystore.Eth, ) *Delegate { return &Delegate{ + cfg: cfg, logger: logger, legacyChains: legacyChains, ks: ks, @@ -65,7 +74,7 @@ func (d *Delegate) ServicesForSpec(ctx context.Context, jb job.Job) ([]job.Servi "getting chain ID %d: %w", jb.BlockHeaderFeederSpec.EVMChainID.ToInt(), err) } - if !chain.Config().Feature().LogPoller() { + if !d.cfg.Feature().LogPoller() { return nil, errors.New("log poller must be enabled to run blockheaderfeeder") } @@ -144,7 +153,7 @@ func (d *Delegate) ServicesForSpec(ctx context.Context, jb job.Job) ([]job.Servi coordinators = append(coordinators, coord) } - bpBHS, err := blockhashstore.NewBulletproofBHS(chain.Config().EVM().GasEstimator(), chain.Config().Database(), fromAddresses, chain.TxManager(), bhs, nil, chain.ID(), d.ks) + bpBHS, err := blockhashstore.NewBulletproofBHS(chain.Config().EVM().GasEstimator(), d.cfg.Database(), fromAddresses, chain.TxManager(), bhs, nil, chain.ID(), d.ks) if err != nil { return nil, errors.Wrap(err, "building bulletproof bhs") } diff --git a/core/services/chainlink/application.go b/core/services/chainlink/application.go index 8542074c27c..88a6fadf345 100644 --- a/core/services/chainlink/application.go +++ b/core/services/chainlink/application.go @@ -333,6 +333,7 @@ func NewApplication(opts ApplicationOpts) (Application, error) { legacyEVMChains, mailMon), job.Keeper: keeper.NewDelegate( + cfg, sqlxDB, jobORM, pipelineRunner, @@ -355,10 +356,12 @@ func NewApplication(opts ApplicationOpts) (Application, error) { pipelineRunner, globalLogger), job.BlockhashStore: blockhashstore.NewDelegate( + cfg, globalLogger, legacyEVMChains, keyStore.Eth()), job.BlockHeaderFeeder: blockheaderfeeder.NewDelegate( + cfg, globalLogger, legacyEVMChains, keyStore.Eth()), @@ -387,6 +390,7 @@ func NewApplication(opts ApplicationOpts) (Application, error) { delegates[job.FluxMonitor] = &job.NullDelegate{Type: job.FluxMonitor} } else { delegates[job.FluxMonitor] = fluxmonitorv2.NewDelegate( + cfg, keyStore.Eth(), jobORM, pipelineORM, @@ -420,7 +424,7 @@ func NewApplication(opts ApplicationOpts) (Application, error) { telemetryManager, legacyEVMChains, globalLogger, - cfg.Database(), + cfg, mailMon, ) } else { @@ -494,6 +498,7 @@ func NewApplication(opts ApplicationOpts) (Application, error) { sqlxDB, jobSpawner, keyStore, + cfg, cfg.Insecure(), cfg.JobPipeline(), cfg.OCR(), diff --git a/core/services/chainlink/config_test.go b/core/services/chainlink/config_test.go index 27e5c9317fa..d02948fd07b 100644 --- a/core/services/chainlink/config_test.go +++ b/core/services/chainlink/config_test.go @@ -583,6 +583,22 @@ func TestConfig_Marshal(t *testing.T) { LeaseDuration: &zeroSeconds, NodeIsSyncingEnabled: ptr(true), FinalizedBlockPollInterval: &second, + Errors: evmcfg.ClientErrors{ + NonceTooLow: ptr[string]("(: |^)nonce too low"), + NonceTooHigh: ptr[string]("(: |^)nonce too high"), + ReplacementTransactionUnderpriced: ptr[string]("(: |^)replacement transaction underpriced"), + LimitReached: ptr[string]("(: |^)limit reached"), + TransactionAlreadyInMempool: ptr[string]("(: |^)transaction already in mempool"), + TerminallyUnderpriced: ptr[string]("(: |^)terminally underpriced"), + InsufficientEth: ptr[string]("(: |^)insufficient eth"), + TxFeeExceedsCap: ptr[string]("(: |^)tx fee exceeds cap"), + L2FeeTooLow: ptr[string]("(: |^)l2 fee too low"), + L2FeeTooHigh: ptr[string]("(: |^)l2 fee too high"), + L2Full: ptr[string]("(: |^)l2 full"), + TransactionAlreadyMined: ptr[string]("(: |^)transaction already mined"), + Fatal: ptr[string]("(: |^)fatal"), + ServiceUnavailable: ptr[string]("(: |^)service unavailable"), + }, }, OCR: evmcfg.OCR{ ContractConfirmations: ptr[uint16](11), @@ -1025,6 +1041,22 @@ LeaseDuration = '0s' NodeIsSyncingEnabled = true FinalizedBlockPollInterval = '1s' +[EVM.NodePool.Errors] +NonceTooLow = '(: |^)nonce too low' +NonceTooHigh = '(: |^)nonce too high' +ReplacementTransactionUnderpriced = '(: |^)replacement transaction underpriced' +LimitReached = '(: |^)limit reached' +TransactionAlreadyInMempool = '(: |^)transaction already in mempool' +TerminallyUnderpriced = '(: |^)terminally underpriced' +InsufficientEth = '(: |^)insufficient eth' +TxFeeExceedsCap = '(: |^)tx fee exceeds cap' +L2FeeTooLow = '(: |^)l2 fee too low' +L2FeeTooHigh = '(: |^)l2 fee too high' +L2Full = '(: |^)l2 full' +TransactionAlreadyMined = '(: |^)transaction already mined' +Fatal = '(: |^)fatal' +ServiceUnavailable = '(: |^)service unavailable' + [EVM.OCR] ContractConfirmations = 11 ContractTransmitterTransmitTimeout = '1m0s' diff --git a/core/services/chainlink/mocks/general_config.go b/core/services/chainlink/mocks/general_config.go index a520a878d3c..a86753a59e3 100644 --- a/core/services/chainlink/mocks/general_config.go +++ b/core/services/chainlink/mocks/general_config.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. package mocks diff --git a/core/services/chainlink/mocks/relayer_chain_interoperators.go b/core/services/chainlink/mocks/relayer_chain_interoperators.go index 4c552551008..6e47f6a1f9b 100644 --- a/core/services/chainlink/mocks/relayer_chain_interoperators.go +++ b/core/services/chainlink/mocks/relayer_chain_interoperators.go @@ -11,8 +11,6 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/loop" - "github.com/smartcontractkit/chainlink/v2/core/services/relay" - "github.com/smartcontractkit/chainlink-common/pkg/types" ) @@ -29,7 +27,7 @@ func (f *FakeRelayerChainInteroperators) LegacyEVMChains() legacyevm.LegacyChain return f.EVMChains } -func (f *FakeRelayerChainInteroperators) NodeStatuses(ctx context.Context, offset, limit int, relayIDs ...relay.ID) (nodes []types.NodeStatus, count int, err error) { +func (f *FakeRelayerChainInteroperators) NodeStatuses(ctx context.Context, offset, limit int, relayIDs ...types.RelayID) (nodes []types.NodeStatus, count int, err error) { return slices.Clone(f.Nodes), len(f.Nodes), f.NodesErr } @@ -41,7 +39,7 @@ func (f *FakeRelayerChainInteroperators) List(filter chainlink.FilterFn) chainli panic("unimplemented") } -func (f *FakeRelayerChainInteroperators) Get(id relay.ID) (loop.Relayer, error) { +func (f *FakeRelayerChainInteroperators) Get(id types.RelayID) (loop.Relayer, error) { panic("unimplemented") } @@ -53,7 +51,7 @@ func (f *FakeRelayerChainInteroperators) LegacyCosmosChains() chainlink.LegacyCo panic("unimplemented") } -func (f *FakeRelayerChainInteroperators) ChainStatus(ctx context.Context, id relay.ID) (types.ChainStatus, error) { +func (f *FakeRelayerChainInteroperators) ChainStatus(ctx context.Context, id types.RelayID) (types.ChainStatus, error) { panic("unimplemented") } diff --git a/core/services/chainlink/relayer_chain_interoperators.go b/core/services/chainlink/relayer_chain_interoperators.go index 673f71e3c65..e17d4d516e9 100644 --- a/core/services/chainlink/relayer_chain_interoperators.go +++ b/core/services/chainlink/relayer_chain_interoperators.go @@ -51,14 +51,14 @@ type LegacyChainer interface { } type ChainStatuser interface { - ChainStatus(ctx context.Context, id relay.ID) (types.ChainStatus, error) + ChainStatus(ctx context.Context, id types.RelayID) (types.ChainStatus, error) ChainStatuses(ctx context.Context, offset, limit int) ([]types.ChainStatus, int, error) } // NodesStatuser is an interface for node configuration and state. // TODO BCF-2440, BCF-2511 may need Node(ctx,name) to get a node status by name type NodesStatuser interface { - NodeStatuses(ctx context.Context, offset, limit int, relayIDs ...relay.ID) (nodes []types.NodeStatus, count int, err error) + NodeStatuses(ctx context.Context, offset, limit int, relayIDs ...types.RelayID) (nodes []types.NodeStatus, count int, err error) } // ChainsNodesStatuser report statuses about chains and nodes @@ -73,7 +73,7 @@ var _ RelayerChainInteroperators = &CoreRelayerChainInteroperators{} // as needed for the core [chainlink.Application] type CoreRelayerChainInteroperators struct { mu sync.Mutex - loopRelayers map[relay.ID]loop.Relayer + loopRelayers map[types.RelayID]loop.Relayer legacyChains legacyChains // we keep an explicit list of services because the legacy implementations have more than @@ -83,7 +83,7 @@ type CoreRelayerChainInteroperators struct { func NewCoreRelayerChainInteroperators(initFuncs ...CoreRelayerChainInitFunc) (*CoreRelayerChainInteroperators, error) { cr := &CoreRelayerChainInteroperators{ - loopRelayers: make(map[relay.ID]loop.Relayer), + loopRelayers: make(map[types.RelayID]loop.Relayer), srvs: make([]services.ServiceCtx, 0), } for _, initFn := range initFuncs { @@ -173,7 +173,7 @@ func InitStarknet(ctx context.Context, factory RelayerFactory, config StarkNetFa } // Get a [loop.Relayer] by id -func (rs *CoreRelayerChainInteroperators) Get(id relay.ID) (loop.Relayer, error) { +func (rs *CoreRelayerChainInteroperators) Get(id types.RelayID) (loop.Relayer, error) { rs.mu.Lock() defer rs.mu.Unlock() lr, exist := rs.loopRelayers[id] @@ -200,7 +200,7 @@ func (rs *CoreRelayerChainInteroperators) LegacyCosmosChains() LegacyCosmosConta } // ChainStatus gets [types.ChainStatus] -func (rs *CoreRelayerChainInteroperators) ChainStatus(ctx context.Context, id relay.ID) (types.ChainStatus, error) { +func (rs *CoreRelayerChainInteroperators) ChainStatus(ctx context.Context, id types.RelayID) (types.ChainStatus, error) { lr, err := rs.Get(id) if err != nil { @@ -219,7 +219,7 @@ func (rs *CoreRelayerChainInteroperators) ChainStatuses(ctx context.Context, off rs.mu.Lock() defer rs.mu.Unlock() - relayerIds := make([]relay.ID, 0) + relayerIds := make([]types.RelayID, 0) for rid := range rs.loopRelayers { relayerIds = append(relayerIds, rid) } @@ -263,7 +263,7 @@ func (rs *CoreRelayerChainInteroperators) Node(ctx context.Context, name string) // ids must be a string representation of relay.Identifier // ids are a filter; if none are specified, all are returned. -func (rs *CoreRelayerChainInteroperators) NodeStatuses(ctx context.Context, offset, limit int, relayerIDs ...relay.ID) (nodes []types.NodeStatus, count int, err error) { +func (rs *CoreRelayerChainInteroperators) NodeStatuses(ctx context.Context, offset, limit int, relayerIDs ...types.RelayID) (nodes []types.NodeStatus, count int, err error) { var ( totalErr error result []types.NodeStatus @@ -304,15 +304,15 @@ func (rs *CoreRelayerChainInteroperators) NodeStatuses(ctx context.Context, offs return result[offset:], count, nil } -type FilterFn func(id relay.ID) bool +type FilterFn func(id types.RelayID) bool -var AllRelayers = func(id relay.ID) bool { +var AllRelayers = func(id types.RelayID) bool { return true } // Returns true if the given network matches id.Network -func FilterRelayersByType(network relay.Network) func(id relay.ID) bool { - return func(id relay.ID) bool { +func FilterRelayersByType(network string) func(id types.RelayID) bool { + return func(id types.RelayID) bool { return id.Network == network } } @@ -322,7 +322,7 @@ func FilterRelayersByType(network relay.Network) func(id relay.ID) bool { // for a given chain func (rs *CoreRelayerChainInteroperators) List(filter FilterFn) RelayerChainInteroperators { - matches := make(map[relay.ID]loop.Relayer) + matches := make(map[types.RelayID]loop.Relayer) rs.mu.Lock() for id, relayer := range rs.loopRelayers { if filter(id) { diff --git a/core/services/chainlink/relayer_chain_interoperators_test.go b/core/services/chainlink/relayer_chain_interoperators_test.go index 38aae37c134..7126c73927c 100644 --- a/core/services/chainlink/relayer_chain_interoperators_test.go +++ b/core/services/chainlink/relayer_chain_interoperators_test.go @@ -11,6 +11,7 @@ import ( commonconfig "github.com/smartcontractkit/chainlink-common/pkg/config" "github.com/smartcontractkit/chainlink-common/pkg/loop" + "github.com/smartcontractkit/chainlink-common/pkg/types" "github.com/smartcontractkit/chainlink-common/pkg/utils/mailbox" coscfg "github.com/smartcontractkit/chainlink-cosmos/pkg/cosmos/config" @@ -25,7 +26,6 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/pgtest" "github.com/smartcontractkit/chainlink/v2/core/logger" "github.com/smartcontractkit/chainlink/v2/core/services/chainlink" - "github.com/smartcontractkit/chainlink/v2/core/services/relay" "github.com/smartcontractkit/chainlink/v2/plugins" evmcfg "github.com/smartcontractkit/chainlink/v2/core/chains/evm/config/toml" @@ -187,23 +187,23 @@ func TestCoreRelayerChainInteroperators(t *testing.T) { tests := []struct { name string initFuncs []chainlink.CoreRelayerChainInitFunc - expectedRelayerNetworks map[relay.Network]struct{} + expectedRelayerNetworks map[string]struct{} expectedEVMChainCnt int expectedEVMNodeCnt int - expectedEVMRelayerIds []relay.ID + expectedEVMRelayerIds []types.RelayID expectedSolanaChainCnt int expectedSolanaNodeCnt int - expectedSolanaRelayerIds []relay.ID + expectedSolanaRelayerIds []types.RelayID expectedStarknetChainCnt int expectedStarknetNodeCnt int - expectedStarknetRelayerIds []relay.ID + expectedStarknetRelayerIds []types.RelayID expectedCosmosChainCnt int expectedCosmosNodeCnt int - expectedCosmosRelayerIds []relay.ID + expectedCosmosRelayerIds []types.RelayID }{ {name: "2 evm chains with 3 nodes", @@ -220,11 +220,11 @@ func TestCoreRelayerChainInteroperators(t *testing.T) { }, expectedEVMChainCnt: 2, expectedEVMNodeCnt: 3, - expectedEVMRelayerIds: []relay.ID{ - {Network: relay.EVM, ChainID: evmChainID1.String()}, - {Network: relay.EVM, ChainID: evmChainID2.String()}, + expectedEVMRelayerIds: []types.RelayID{ + {Network: types.NetworkEVM, ChainID: evmChainID1.String()}, + {Network: types.NetworkEVM, ChainID: evmChainID2.String()}, }, - expectedRelayerNetworks: map[relay.Network]struct{}{relay.EVM: {}}, + expectedRelayerNetworks: map[string]struct{}{types.NetworkEVM: {}}, }, {name: "2 solana chain with 2 node", @@ -236,11 +236,11 @@ func TestCoreRelayerChainInteroperators(t *testing.T) { }, expectedSolanaChainCnt: 2, expectedSolanaNodeCnt: 2, - expectedSolanaRelayerIds: []relay.ID{ - {Network: relay.Solana, ChainID: solanaChainID1}, - {Network: relay.Solana, ChainID: solanaChainID2}, + expectedSolanaRelayerIds: []types.RelayID{ + {Network: types.NetworkSolana, ChainID: solanaChainID1}, + {Network: types.NetworkSolana, ChainID: solanaChainID2}, }, - expectedRelayerNetworks: map[relay.Network]struct{}{relay.Solana: {}}, + expectedRelayerNetworks: map[string]struct{}{types.NetworkSolana: {}}, }, {name: "2 starknet chain with 4 nodes", @@ -252,11 +252,11 @@ func TestCoreRelayerChainInteroperators(t *testing.T) { }, expectedStarknetChainCnt: 2, expectedStarknetNodeCnt: 4, - expectedStarknetRelayerIds: []relay.ID{ - {Network: relay.StarkNet, ChainID: starknetChainID1}, - {Network: relay.StarkNet, ChainID: starknetChainID2}, + expectedStarknetRelayerIds: []types.RelayID{ + {Network: types.NetworkStarkNet, ChainID: starknetChainID1}, + {Network: types.NetworkStarkNet, ChainID: starknetChainID2}, }, - expectedRelayerNetworks: map[relay.Network]struct{}{relay.StarkNet: {}}, + expectedRelayerNetworks: map[string]struct{}{types.NetworkStarkNet: {}}, }, { @@ -270,11 +270,11 @@ func TestCoreRelayerChainInteroperators(t *testing.T) { }, expectedCosmosChainCnt: 2, expectedCosmosNodeCnt: 2, - expectedCosmosRelayerIds: []relay.ID{ - {Network: relay.Cosmos, ChainID: cosmosChainID1}, - {Network: relay.Cosmos, ChainID: cosmosChainID2}, + expectedCosmosRelayerIds: []types.RelayID{ + {Network: types.NetworkCosmos, ChainID: cosmosChainID1}, + {Network: types.NetworkCosmos, ChainID: cosmosChainID2}, }, - expectedRelayerNetworks: map[relay.Network]struct{}{relay.Cosmos: {}}, + expectedRelayerNetworks: map[string]struct{}{types.NetworkCosmos: {}}, }, {name: "all chains", @@ -304,33 +304,33 @@ func TestCoreRelayerChainInteroperators(t *testing.T) { }, expectedEVMChainCnt: 2, expectedEVMNodeCnt: 3, - expectedEVMRelayerIds: []relay.ID{ - {Network: relay.EVM, ChainID: evmChainID1.String()}, - {Network: relay.EVM, ChainID: evmChainID2.String()}, + expectedEVMRelayerIds: []types.RelayID{ + {Network: types.NetworkEVM, ChainID: evmChainID1.String()}, + {Network: types.NetworkEVM, ChainID: evmChainID2.String()}, }, expectedSolanaChainCnt: 2, expectedSolanaNodeCnt: 2, - expectedSolanaRelayerIds: []relay.ID{ - {Network: relay.Solana, ChainID: solanaChainID1}, - {Network: relay.Solana, ChainID: solanaChainID2}, + expectedSolanaRelayerIds: []types.RelayID{ + {Network: types.NetworkSolana, ChainID: solanaChainID1}, + {Network: types.NetworkSolana, ChainID: solanaChainID2}, }, expectedStarknetChainCnt: 2, expectedStarknetNodeCnt: 4, - expectedStarknetRelayerIds: []relay.ID{ - {Network: relay.StarkNet, ChainID: starknetChainID1}, - {Network: relay.StarkNet, ChainID: starknetChainID2}, + expectedStarknetRelayerIds: []types.RelayID{ + {Network: types.NetworkStarkNet, ChainID: starknetChainID1}, + {Network: types.NetworkStarkNet, ChainID: starknetChainID2}, }, expectedCosmosChainCnt: 2, expectedCosmosNodeCnt: 2, - expectedCosmosRelayerIds: []relay.ID{ - {Network: relay.Cosmos, ChainID: cosmosChainID1}, - {Network: relay.Cosmos, ChainID: cosmosChainID2}, + expectedCosmosRelayerIds: []types.RelayID{ + {Network: types.NetworkCosmos, ChainID: cosmosChainID1}, + {Network: types.NetworkCosmos, ChainID: cosmosChainID2}, }, - expectedRelayerNetworks: map[relay.Network]struct{}{relay.EVM: {}, relay.Cosmos: {}, relay.Solana: {}, relay.StarkNet: {}}, + expectedRelayerNetworks: map[string]struct{}{types.NetworkEVM: {}, types.NetworkCosmos: {}, types.NetworkSolana: {}, types.NetworkStarkNet: {}}, }, } for _, tt := range tests { @@ -362,17 +362,17 @@ func TestCoreRelayerChainInteroperators(t *testing.T) { assert.Equal(t, cnt, len(allNodeStats)) } - gotRelayerNetworks := make(map[relay.Network]struct{}) - for relayNetwork := range relay.SupportedRelays { + gotRelayerNetworks := make(map[string]struct{}) + for relayNetwork := range types.SupportedRelays { var expectedChainCnt, expectedNodeCnt int switch relayNetwork { - case relay.EVM: + case types.NetworkEVM: expectedChainCnt, expectedNodeCnt = tt.expectedEVMChainCnt, tt.expectedEVMNodeCnt - case relay.Cosmos: + case types.NetworkCosmos: expectedChainCnt, expectedNodeCnt = tt.expectedCosmosChainCnt, tt.expectedCosmosNodeCnt - case relay.Solana: + case types.NetworkSolana: expectedChainCnt, expectedNodeCnt = tt.expectedSolanaChainCnt, tt.expectedSolanaNodeCnt - case relay.StarkNet: + case types.NetworkStarkNet: expectedChainCnt, expectedNodeCnt = tt.expectedStarknetChainCnt, tt.expectedStarknetNodeCnt default: require.Fail(t, "untested relay network", relayNetwork) @@ -385,16 +385,16 @@ func TestCoreRelayerChainInteroperators(t *testing.T) { } // check legacy chains for those that haven't migrated fully to the loop relayer interface - if relayNetwork == relay.EVM { - _, wantEVM := tt.expectedRelayerNetworks[relay.EVM] + if relayNetwork == types.NetworkEVM { + _, wantEVM := tt.expectedRelayerNetworks[types.NetworkEVM] if wantEVM { assert.Len(t, cr.LegacyEVMChains().Slice(), expectedChainCnt) } else { assert.Nil(t, cr.LegacyEVMChains()) } } - if relayNetwork == relay.Cosmos { - _, wantCosmos := tt.expectedRelayerNetworks[relay.Cosmos] + if relayNetwork == types.NetworkCosmos { + _, wantCosmos := tt.expectedRelayerNetworks[types.NetworkCosmos] if wantCosmos { assert.Len(t, cr.LegacyCosmosChains().Slice(), expectedChainCnt) } else { @@ -410,7 +410,7 @@ func TestCoreRelayerChainInteroperators(t *testing.T) { } assert.EqualValues(t, gotRelayerNetworks, tt.expectedRelayerNetworks) - allRelayerIds := [][]relay.ID{ + allRelayerIds := [][]types.RelayID{ tt.expectedEVMRelayerIds, tt.expectedCosmosRelayerIds, tt.expectedSolanaRelayerIds, @@ -426,13 +426,13 @@ func TestCoreRelayerChainInteroperators(t *testing.T) { assert.NoError(t, err) assert.Equal(t, wantId.ChainID, stat.ID) // check legacy chains for evm and cosmos - if wantId.Network == relay.EVM { + if wantId.Network == types.NetworkEVM { c, err := cr.LegacyEVMChains().Get(wantId.ChainID) assert.NoError(t, err) assert.NotNil(t, c) assert.Equal(t, wantId.ChainID, c.ID().String()) } - if wantId.Network == relay.Cosmos { + if wantId.Network == types.NetworkCosmos { c, err := cr.LegacyCosmosChains().Get(wantId.ChainID) assert.NoError(t, err) assert.NotNil(t, c) @@ -441,7 +441,7 @@ func TestCoreRelayerChainInteroperators(t *testing.T) { } } - expectedMissing := relay.ID{Network: relay.Cosmos, ChainID: "not a chain id"} + expectedMissing := types.RelayID{Network: types.NetworkCosmos, ChainID: "not a chain id"} unwanted, err := cr.Get(expectedMissing) assert.Nil(t, unwanted) assert.ErrorIs(t, err, chainlink.ErrNoSuchRelayer) diff --git a/core/services/chainlink/relayer_factory.go b/core/services/chainlink/relayer_factory.go index 2dd5e1eb68a..5902555f79c 100644 --- a/core/services/chainlink/relayer_factory.go +++ b/core/services/chainlink/relayer_factory.go @@ -9,6 +9,7 @@ import ( "github.com/pelletier/go-toml/v2" "github.com/smartcontractkit/chainlink-common/pkg/loop" + "github.com/smartcontractkit/chainlink-common/pkg/types" "github.com/smartcontractkit/chainlink-cosmos/pkg/cosmos" coscfg "github.com/smartcontractkit/chainlink-cosmos/pkg/cosmos/config" "github.com/smartcontractkit/chainlink-solana/pkg/solana" @@ -40,10 +41,10 @@ type EVMFactoryConfig struct { evmrelay.CSAETHKeystore } -func (r *RelayerFactory) NewEVM(ctx context.Context, config EVMFactoryConfig) (map[relay.ID]evmrelay.LoopRelayAdapter, error) { +func (r *RelayerFactory) NewEVM(ctx context.Context, config EVMFactoryConfig) (map[types.RelayID]evmrelay.LoopRelayAdapter, error) { // TODO impl EVM loop. For now always 'fallback' to an adapter and embedded chain - relayers := make(map[relay.ID]evmrelay.LoopRelayAdapter) + relayers := make(map[types.RelayID]evmrelay.LoopRelayAdapter) lggr := r.Logger.Named("EVM") @@ -60,7 +61,7 @@ func (r *RelayerFactory) NewEVM(ctx context.Context, config EVMFactoryConfig) (m } legacyChains := evmrelay.NewLegacyChainsFromRelayerExtenders(evmRelayExtenders) for _, ext := range evmRelayExtenders.Slice() { - relayID := relay.ID{Network: relay.EVM, ChainID: ext.Chain().ID().String()} + relayID := types.RelayID{Network: types.NetworkEVM, ChainID: ext.Chain().ID().String()} chain, err2 := legacyChains.Get(relayID.ChainID) if err2 != nil { return nil, err2 @@ -91,8 +92,8 @@ type SolanaFactoryConfig struct { solana.TOMLConfigs } -func (r *RelayerFactory) NewSolana(ks keystore.Solana, chainCfgs solana.TOMLConfigs) (map[relay.ID]loop.Relayer, error) { - solanaRelayers := make(map[relay.ID]loop.Relayer) +func (r *RelayerFactory) NewSolana(ks keystore.Solana, chainCfgs solana.TOMLConfigs) (map[types.RelayID]loop.Relayer, error) { + solanaRelayers := make(map[types.RelayID]loop.Relayer) var ( solLggr = r.Logger.Named("Solana") signer = &keystore.SolanaSigner{Solana: ks} @@ -102,7 +103,7 @@ func (r *RelayerFactory) NewSolana(ks keystore.Solana, chainCfgs solana.TOMLConf // create one relayer per chain id for _, chainCfg := range chainCfgs { - relayID := relay.ID{Network: relay.Solana, ChainID: *chainCfg.ChainID} + relayID := types.RelayID{Network: types.NetworkSolana, ChainID: *chainCfg.ChainID} _, alreadyExists := unique[relayID.Name()] if alreadyExists { return nil, fmt.Errorf("duplicate chain definitions for %s", relayID.Name()) @@ -166,8 +167,8 @@ type StarkNetFactoryConfig struct { // TODO BCF-2606 consider consolidating the driving logic with that of NewSolana above via generics // perhaps when we implement a Cosmos LOOP -func (r *RelayerFactory) NewStarkNet(ks keystore.StarkNet, chainCfgs config.TOMLConfigs) (map[relay.ID]loop.Relayer, error) { - starknetRelayers := make(map[relay.ID]loop.Relayer) +func (r *RelayerFactory) NewStarkNet(ks keystore.StarkNet, chainCfgs config.TOMLConfigs) (map[types.RelayID]loop.Relayer, error) { + starknetRelayers := make(map[types.RelayID]loop.Relayer) var ( starkLggr = r.Logger.Named("StarkNet") @@ -177,7 +178,7 @@ func (r *RelayerFactory) NewStarkNet(ks keystore.StarkNet, chainCfgs config.TOML unique := make(map[string]struct{}) // create one relayer per chain id for _, chainCfg := range chainCfgs { - relayID := relay.ID{Network: relay.StarkNet, ChainID: *chainCfg.ChainID} + relayID := types.RelayID{Network: types.NetworkStarkNet, ChainID: *chainCfg.ChainID} _, alreadyExists := unique[relayID.Name()] if alreadyExists { return nil, fmt.Errorf("duplicate chain definitions for %s", relayID.Name()) @@ -263,12 +264,12 @@ func (c CosmosFactoryConfig) Validate() error { return err } -func (r *RelayerFactory) NewCosmos(config CosmosFactoryConfig) (map[relay.ID]CosmosLoopRelayerChainer, error) { +func (r *RelayerFactory) NewCosmos(config CosmosFactoryConfig) (map[types.RelayID]CosmosLoopRelayerChainer, error) { err := config.Validate() if err != nil { return nil, fmt.Errorf("cannot create Cosmos relayer: %w", err) } - relayers := make(map[relay.ID]CosmosLoopRelayerChainer) + relayers := make(map[types.RelayID]CosmosLoopRelayerChainer) var ( cosmosLggr = r.Logger.Named("Cosmos") @@ -277,7 +278,7 @@ func (r *RelayerFactory) NewCosmos(config CosmosFactoryConfig) (map[relay.ID]Cos // create one relayer per chain id for _, chainCfg := range config.TOMLConfigs { - relayID := relay.ID{Network: relay.Cosmos, ChainID: *chainCfg.ChainID} + relayID := types.RelayID{Network: types.NetworkCosmos, ChainID: *chainCfg.ChainID} lggr := cosmosLggr.Named(relayID.ChainID) diff --git a/core/services/chainlink/testdata/config-full.toml b/core/services/chainlink/testdata/config-full.toml index 76c4aa0cade..8a016149e59 100644 --- a/core/services/chainlink/testdata/config-full.toml +++ b/core/services/chainlink/testdata/config-full.toml @@ -344,6 +344,22 @@ LeaseDuration = '0s' NodeIsSyncingEnabled = true FinalizedBlockPollInterval = '1s' +[EVM.NodePool.Errors] +NonceTooLow = '(: |^)nonce too low' +NonceTooHigh = '(: |^)nonce too high' +ReplacementTransactionUnderpriced = '(: |^)replacement transaction underpriced' +LimitReached = '(: |^)limit reached' +TransactionAlreadyInMempool = '(: |^)transaction already in mempool' +TerminallyUnderpriced = '(: |^)terminally underpriced' +InsufficientEth = '(: |^)insufficient eth' +TxFeeExceedsCap = '(: |^)tx fee exceeds cap' +L2FeeTooLow = '(: |^)l2 fee too low' +L2FeeTooHigh = '(: |^)l2 fee too high' +L2Full = '(: |^)l2 full' +TransactionAlreadyMined = '(: |^)transaction already mined' +Fatal = '(: |^)fatal' +ServiceUnavailable = '(: |^)service unavailable' + [EVM.OCR] ContractConfirmations = 11 ContractTransmitterTransmitTimeout = '1m0s' diff --git a/core/services/feeds/config.go b/core/services/feeds/config.go index 141e4910960..e2ec889b23b 100644 --- a/core/services/feeds/config.go +++ b/core/services/feeds/config.go @@ -4,8 +4,14 @@ import ( "time" commonconfig "github.com/smartcontractkit/chainlink-common/pkg/config" + coreconfig "github.com/smartcontractkit/chainlink/v2/core/config" ) +type GeneralConfig interface { + OCR() coreconfig.OCR + Insecure() coreconfig.Insecure +} + type JobConfig interface { DefaultHTTPTimeout() commonconfig.Duration } @@ -25,5 +31,7 @@ type OCR2Config interface { ContractPollInterval() time.Duration ContractTransmitterTransmitTimeout() time.Duration DatabaseTimeout() time.Duration + DefaultTransactionQueueDepth() uint32 + SimulateTransactions() bool TraceLogging() bool } diff --git a/core/services/feeds/mocks/connections_manager.go b/core/services/feeds/mocks/connections_manager.go index 5bdc5087108..06cb0eeb5aa 100644 --- a/core/services/feeds/mocks/connections_manager.go +++ b/core/services/feeds/mocks/connections_manager.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. package mocks diff --git a/core/services/feeds/mocks/feeds_manager_client.go b/core/services/feeds/mocks/feeds_manager_client.go index f07200cc8fd..71c8786da3e 100644 --- a/core/services/feeds/mocks/feeds_manager_client.go +++ b/core/services/feeds/mocks/feeds_manager_client.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. package mocks diff --git a/core/services/feeds/mocks/orm.go b/core/services/feeds/mocks/orm.go index 73bc4c4d4a0..f84d80a6eb1 100644 --- a/core/services/feeds/mocks/orm.go +++ b/core/services/feeds/mocks/orm.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. package mocks diff --git a/core/services/feeds/mocks/service.go b/core/services/feeds/mocks/service.go index d8bc88c8159..05ede181f44 100644 --- a/core/services/feeds/mocks/service.go +++ b/core/services/feeds/mocks/service.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. package mocks diff --git a/core/services/feeds/orm_test.go b/core/services/feeds/orm_test.go index 0cf20cf9800..3a0a17c99e0 100644 --- a/core/services/feeds/orm_test.go +++ b/core/services/feeds/orm_test.go @@ -1669,7 +1669,7 @@ func createJob(t *testing.T, db *sqlx.DB, externalJobID uuid.UUID) *job.Job { _, address := cltest.MustInsertRandomKey(t, keyStore.Eth()) legacyChains := evmrelay.NewLegacyChainsFromRelayerExtenders(relayExtenders) - jb, err := ocr.ValidatedOracleSpecToml(legacyChains, + jb, err := ocr.ValidatedOracleSpecToml(config, legacyChains, testspecs.GenerateOCRSpec(testspecs.OCRSpecParams{ JobID: externalJobID.String(), TransmitterAddress: address.Hex(), diff --git a/core/services/feeds/service.go b/core/services/feeds/service.go index 27d324d2342..8c4ea7a36bf 100644 --- a/core/services/feeds/service.go +++ b/core/services/feeds/service.go @@ -111,6 +111,7 @@ type service struct { ocr1KeyStore keystore.OCR ocr2KeyStore keystore.OCR2 jobSpawner job.Spawner + gCfg GeneralConfig insecureCfg InsecureConfig jobCfg JobConfig ocrCfg OCRConfig @@ -129,6 +130,7 @@ func NewService( db *sqlx.DB, jobSpawner job.Spawner, keyStore keystore.Master, + gCfg GeneralConfig, insecureCfg InsecureConfig, jobCfg JobConfig, ocrCfg OCRConfig, @@ -149,6 +151,7 @@ func NewService( csaKeyStore: keyStore.CSA(), ocr1KeyStore: keyStore.OCR(), ocr2KeyStore: keyStore.OCR2(), + gCfg: gCfg, insecureCfg: insecureCfg, jobCfg: jobCfg, ocrCfg: ocrCfg, @@ -1137,7 +1140,7 @@ func (s *service) generateJob(ctx context.Context, spec string) (*job.Job, error if !s.ocrCfg.Enabled() { return nil, ErrOCRDisabled } - js, err = ocr.ValidatedOracleSpecToml(s.legacyChains, spec) + js, err = ocr.ValidatedOracleSpecToml(s.gCfg, s.legacyChains, spec) case job.OffchainReporting2: if !s.ocr2cfg.Enabled() { return nil, ErrOCR2Disabled diff --git a/core/services/feeds/service_test.go b/core/services/feeds/service_test.go index 536584a0846..f83a98986e2 100644 --- a/core/services/feeds/service_test.go +++ b/core/services/feeds/service_test.go @@ -177,7 +177,6 @@ func setupTestServiceCfg(t *testing.T, overrideCfg func(c *chainlink.Config, s * db := pgtest.NewSqlxDB(t) gcfg := configtest.NewGeneralConfig(t, overrideCfg) keyStore := new(ksmocks.Master) - scopedConfig := evmtest.NewChainScopedConfig(t, gcfg) ethKeyStore := cltest.NewKeyStore(t, db).Eth() relayExtenders := evmtest.NewChainRelayExtenders(t, evmtest.TestChainOpts{DB: db, GeneralConfig: gcfg, HeadTracker: headtracker.NullTracker, KeyStore: ethKeyStore}) @@ -187,7 +186,7 @@ func setupTestServiceCfg(t *testing.T, overrideCfg func(c *chainlink.Config, s * keyStore.On("P2P").Return(p2pKeystore) keyStore.On("OCR").Return(ocr1Keystore) keyStore.On("OCR2").Return(ocr2Keystore) - svc := feeds.NewService(orm, jobORM, db, spawner, keyStore, scopedConfig.Insecure(), scopedConfig.JobPipeline(), scopedConfig.OCR(), scopedConfig.OCR2(), scopedConfig.Database(), legacyChains, lggr, "1.0.0", nil) + svc := feeds.NewService(orm, jobORM, db, spawner, keyStore, gcfg, gcfg.Insecure(), gcfg.JobPipeline(), gcfg.OCR(), gcfg.OCR2(), gcfg.Database(), legacyChains, lggr, "1.0.0", nil) svc.SetConnectionsManager(connMgr) return &TestService{ diff --git a/core/services/fluxmonitorv2/delegate.go b/core/services/fluxmonitorv2/delegate.go index 72aa04c7201..b7b0df77cc4 100644 --- a/core/services/fluxmonitorv2/delegate.go +++ b/core/services/fluxmonitorv2/delegate.go @@ -10,14 +10,21 @@ import ( txmgrcommon "github.com/smartcontractkit/chainlink/v2/common/txmgr" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/txmgr" "github.com/smartcontractkit/chainlink/v2/core/chains/legacyevm" + "github.com/smartcontractkit/chainlink/v2/core/config" "github.com/smartcontractkit/chainlink/v2/core/logger" "github.com/smartcontractkit/chainlink/v2/core/services/job" "github.com/smartcontractkit/chainlink/v2/core/services/keystore" "github.com/smartcontractkit/chainlink/v2/core/services/pipeline" ) +type DelegateConfig interface { + FluxMonitor() config.FluxMonitor + JobPipeline() config.JobPipeline +} + // Delegate represents a Flux Monitor delegate type Delegate struct { + cfg DelegateConfig db *sqlx.DB ethKeyStore keystore.Eth jobORM job.ORM @@ -31,6 +38,7 @@ var _ job.Delegate = (*Delegate)(nil) // NewDelegate constructs a new delegate func NewDelegate( + cfg DelegateConfig, ethKeyStore keystore.Eth, jobORM job.ORM, pipelineORM pipeline.ORM, @@ -40,6 +48,7 @@ func NewDelegate( lggr logger.Logger, ) *Delegate { return &Delegate{ + cfg: cfg, db: db, ethKeyStore: ethKeyStore, jobORM: jobORM, @@ -69,10 +78,9 @@ func (d *Delegate) ServicesForSpec(ctx context.Context, jb job.Job) (services [] if err != nil { return nil, err } - cfg := chain.Config() - strategy := txmgrcommon.NewQueueingTxStrategy(jb.ExternalJobID, cfg.FluxMonitor().DefaultTransactionQueueDepth()) + strategy := txmgrcommon.NewQueueingTxStrategy(jb.ExternalJobID, d.cfg.FluxMonitor().DefaultTransactionQueueDepth()) var checker txmgr.TransmitCheckerSpec - if chain.Config().FluxMonitor().SimulateTransactions() { + if d.cfg.FluxMonitor().SimulateTransactions() { checker.CheckerType = txmgr.TransmitCheckerTypeSimulate } @@ -88,7 +96,7 @@ func (d *Delegate) ServicesForSpec(ctx context.Context, jb job.Job) (services [] d.pipelineRunner, chain.Config().EVM(), chain.Config().EVM().GasEstimator(), - chain.Config().JobPipeline(), + d.cfg.JobPipeline(), d.lggr, ) if err != nil { diff --git a/core/services/fluxmonitorv2/mocks/contract_submitter.go b/core/services/fluxmonitorv2/mocks/contract_submitter.go index 3154b4c86ee..ac67c353cfb 100644 --- a/core/services/fluxmonitorv2/mocks/contract_submitter.go +++ b/core/services/fluxmonitorv2/mocks/contract_submitter.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. package mocks diff --git a/core/services/fluxmonitorv2/mocks/flags.go b/core/services/fluxmonitorv2/mocks/flags.go index 6ff1616111b..0585611ed03 100644 --- a/core/services/fluxmonitorv2/mocks/flags.go +++ b/core/services/fluxmonitorv2/mocks/flags.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. package mocks diff --git a/core/services/fluxmonitorv2/mocks/key_store_interface.go b/core/services/fluxmonitorv2/mocks/key_store_interface.go index 7b2aac75e2f..f831c854ce4 100644 --- a/core/services/fluxmonitorv2/mocks/key_store_interface.go +++ b/core/services/fluxmonitorv2/mocks/key_store_interface.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. package mocks diff --git a/core/services/fluxmonitorv2/mocks/orm.go b/core/services/fluxmonitorv2/mocks/orm.go index e5173db8264..7755543b405 100644 --- a/core/services/fluxmonitorv2/mocks/orm.go +++ b/core/services/fluxmonitorv2/mocks/orm.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. package mocks diff --git a/core/services/functions/mocks/bridge_accessor.go b/core/services/functions/mocks/bridge_accessor.go index 4978da55d8b..797007d7886 100644 --- a/core/services/functions/mocks/bridge_accessor.go +++ b/core/services/functions/mocks/bridge_accessor.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. package mocks diff --git a/core/services/functions/mocks/external_adapter_client.go b/core/services/functions/mocks/external_adapter_client.go index dbf4081c95d..cd402c1e6a5 100644 --- a/core/services/functions/mocks/external_adapter_client.go +++ b/core/services/functions/mocks/external_adapter_client.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. package mocks diff --git a/core/services/functions/mocks/functions_listener.go b/core/services/functions/mocks/functions_listener.go index d63248f00cf..fed369fd659 100644 --- a/core/services/functions/mocks/functions_listener.go +++ b/core/services/functions/mocks/functions_listener.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. package mocks diff --git a/core/services/functions/mocks/offchain_transmitter.go b/core/services/functions/mocks/offchain_transmitter.go index 5eee967e685..1e1422b8d46 100644 --- a/core/services/functions/mocks/offchain_transmitter.go +++ b/core/services/functions/mocks/offchain_transmitter.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. package mocks diff --git a/core/services/functions/mocks/orm.go b/core/services/functions/mocks/orm.go index ff72916171b..c921fda5c69 100644 --- a/core/services/functions/mocks/orm.go +++ b/core/services/functions/mocks/orm.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. package mocks diff --git a/core/services/gateway/connector/mocks/gateway_connector.go b/core/services/gateway/connector/mocks/gateway_connector.go index ba972425f66..0f37ee6040a 100644 --- a/core/services/gateway/connector/mocks/gateway_connector.go +++ b/core/services/gateway/connector/mocks/gateway_connector.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. package mocks diff --git a/core/services/gateway/connector/mocks/gateway_connector_handler.go b/core/services/gateway/connector/mocks/gateway_connector_handler.go index e83e06b60e3..c21528134f7 100644 --- a/core/services/gateway/connector/mocks/gateway_connector_handler.go +++ b/core/services/gateway/connector/mocks/gateway_connector_handler.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. package mocks diff --git a/core/services/gateway/connector/mocks/signer.go b/core/services/gateway/connector/mocks/signer.go index 18c7186f7fc..bb4c3648397 100644 --- a/core/services/gateway/connector/mocks/signer.go +++ b/core/services/gateway/connector/mocks/signer.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. package mocks diff --git a/core/services/gateway/handlers/functions/allowlist/mocks/onchain_allowlist.go b/core/services/gateway/handlers/functions/allowlist/mocks/onchain_allowlist.go index 6668a3c76ff..7581414d00f 100644 --- a/core/services/gateway/handlers/functions/allowlist/mocks/onchain_allowlist.go +++ b/core/services/gateway/handlers/functions/allowlist/mocks/onchain_allowlist.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. package mocks diff --git a/core/services/gateway/handlers/functions/allowlist/mocks/orm.go b/core/services/gateway/handlers/functions/allowlist/mocks/orm.go index 76121270518..c1d47169c51 100644 --- a/core/services/gateway/handlers/functions/allowlist/mocks/orm.go +++ b/core/services/gateway/handlers/functions/allowlist/mocks/orm.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. package mocks diff --git a/core/services/gateway/handlers/functions/subscriptions/mocks/onchain_subscriptions.go b/core/services/gateway/handlers/functions/subscriptions/mocks/onchain_subscriptions.go index 5f2054c4e47..93b476820a4 100644 --- a/core/services/gateway/handlers/functions/subscriptions/mocks/onchain_subscriptions.go +++ b/core/services/gateway/handlers/functions/subscriptions/mocks/onchain_subscriptions.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. package mocks diff --git a/core/services/gateway/handlers/functions/subscriptions/mocks/orm.go b/core/services/gateway/handlers/functions/subscriptions/mocks/orm.go index 16a82a488b4..614ba83af17 100644 --- a/core/services/gateway/handlers/functions/subscriptions/mocks/orm.go +++ b/core/services/gateway/handlers/functions/subscriptions/mocks/orm.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. package mocks diff --git a/core/services/gateway/handlers/mocks/don.go b/core/services/gateway/handlers/mocks/don.go index 6e88708dd7d..91c162b2f55 100644 --- a/core/services/gateway/handlers/mocks/don.go +++ b/core/services/gateway/handlers/mocks/don.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. package mocks diff --git a/core/services/gateway/handlers/mocks/handler.go b/core/services/gateway/handlers/mocks/handler.go index 7dfe1eae784..e22c7f158f3 100644 --- a/core/services/gateway/handlers/mocks/handler.go +++ b/core/services/gateway/handlers/mocks/handler.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. package mocks diff --git a/core/services/gateway/network/mocks/connection_acceptor.go b/core/services/gateway/network/mocks/connection_acceptor.go index c45cc7fbe3e..37ebc7b8c9e 100644 --- a/core/services/gateway/network/mocks/connection_acceptor.go +++ b/core/services/gateway/network/mocks/connection_acceptor.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. package mocks diff --git a/core/services/gateway/network/mocks/connection_initiator.go b/core/services/gateway/network/mocks/connection_initiator.go index 87e4f407328..7efac288ba8 100644 --- a/core/services/gateway/network/mocks/connection_initiator.go +++ b/core/services/gateway/network/mocks/connection_initiator.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. package mocks diff --git a/core/services/gateway/network/mocks/http_request_handler.go b/core/services/gateway/network/mocks/http_request_handler.go index 7c5ff4025cf..0cbcf3eb6b1 100644 --- a/core/services/gateway/network/mocks/http_request_handler.go +++ b/core/services/gateway/network/mocks/http_request_handler.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. package mocks diff --git a/core/services/gateway/network/mocks/http_server.go b/core/services/gateway/network/mocks/http_server.go index 81e180e7b8d..586677c604c 100644 --- a/core/services/gateway/network/mocks/http_server.go +++ b/core/services/gateway/network/mocks/http_server.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. package mocks diff --git a/core/services/gateway/network/mocks/web_socket_server.go b/core/services/gateway/network/mocks/web_socket_server.go index 4f75f3b7d0f..fb880193c7e 100644 --- a/core/services/gateway/network/mocks/web_socket_server.go +++ b/core/services/gateway/network/mocks/web_socket_server.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. package mocks diff --git a/core/services/job/helpers_test.go b/core/services/job/helpers_test.go index b35389ad4ad..22e1b0bef63 100644 --- a/core/services/job/helpers_test.go +++ b/core/services/job/helpers_test.go @@ -216,7 +216,7 @@ func makeMinimalHTTPOracleSpec(t *testing.T, db *sqlx.DB, cfg chainlink.GeneralC keyStore := cltest.NewKeyStore(t, db) relayExtenders := evmtest.NewChainRelayExtenders(t, evmtest.TestChainOpts{DB: db, Client: evmtest.NewEthClientMockWithDefaultChain(t), GeneralConfig: cfg, KeyStore: keyStore.Eth()}) legacyChains := evmrelay.NewLegacyChainsFromRelayerExtenders(relayExtenders) - _, err := ocr.ValidatedOracleSpecToml(legacyChains, s) + _, err := ocr.ValidatedOracleSpecToml(cfg, legacyChains, s) require.NoError(t, err) err = toml.Unmarshal([]byte(s), &os) require.NoError(t, err) diff --git a/core/services/job/job_orm_test.go b/core/services/job/job_orm_test.go index 3cd94735ca8..ffbd02c512b 100644 --- a/core/services/job/job_orm_test.go +++ b/core/services/job/job_orm_test.go @@ -40,7 +40,6 @@ import ( ocr2validate "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/validate" "github.com/smartcontractkit/chainlink/v2/core/services/ocrbootstrap" "github.com/smartcontractkit/chainlink/v2/core/services/pipeline" - "github.com/smartcontractkit/chainlink/v2/core/services/relay" evmrelay "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm" "github.com/smartcontractkit/chainlink/v2/core/services/vrf/vrfcommon" "github.com/smartcontractkit/chainlink/v2/core/services/webhook" @@ -360,7 +359,7 @@ func TestORM_DeleteJob_DeletesAssociatedRecords(t *testing.T) { _, address := cltest.MustInsertRandomKey(t, keyStore.Eth()) relayExtenders := evmtest.NewChainRelayExtenders(t, evmtest.TestChainOpts{DB: db, GeneralConfig: config, KeyStore: keyStore.Eth()}) legacyChains := evmrelay.NewLegacyChainsFromRelayerExtenders(relayExtenders) - jb, err := ocr.ValidatedOracleSpecToml(legacyChains, testspecs.GenerateOCRSpec(testspecs.OCRSpecParams{ + jb, err := ocr.ValidatedOracleSpecToml(config, legacyChains, testspecs.GenerateOCRSpec(testspecs.OCRSpecParams{ TransmitterAddress: address.Hex(), DS1BridgeName: bridge.Name.String(), DS2BridgeName: bridge2.Name.String(), @@ -765,7 +764,7 @@ func TestORM_CreateJob_OCR_DuplicatedContractAddress(t *testing.T) { }) relayExtenders := evmtest.NewChainRelayExtenders(t, evmtest.TestChainOpts{DB: db, GeneralConfig: config, KeyStore: keyStore.Eth()}) legacyChains := evmrelay.NewLegacyChainsFromRelayerExtenders(relayExtenders) - jb, err := ocr.ValidatedOracleSpecToml(legacyChains, spec.Toml()) + jb, err := ocr.ValidatedOracleSpecToml(config, legacyChains, spec.Toml()) require.NoError(t, err) t.Run("with a set chain id", func(t *testing.T) { @@ -777,7 +776,7 @@ func TestORM_CreateJob_OCR_DuplicatedContractAddress(t *testing.T) { externalJobID = uuid.NullUUID{UUID: uuid.New(), Valid: true} spec.JobID = externalJobID.UUID.String() - jba, err := ocr.ValidatedOracleSpecToml(legacyChains, spec.Toml()) + jba, err := ocr.ValidatedOracleSpecToml(config, legacyChains, spec.Toml()) require.NoError(t, err) err = jobORM.CreateJob(&jba) // Try to add duplicate job with default id require.Error(t, err) @@ -785,7 +784,7 @@ func TestORM_CreateJob_OCR_DuplicatedContractAddress(t *testing.T) { externalJobID = uuid.NullUUID{UUID: uuid.New(), Valid: true} spec.JobID = externalJobID.UUID.String() - jb2, err := ocr.ValidatedOracleSpecToml(legacyChains, spec.Toml()) + jb2, err := ocr.ValidatedOracleSpecToml(config, legacyChains, spec.Toml()) require.NoError(t, err) err = jobORM.CreateJob(&jb2) // Try to add duplicate job with custom id @@ -927,7 +926,7 @@ func TestORM_ValidateKeyStoreMatch(t *testing.T) { t.Run("test ETH key validation", func(t *testing.T) { ctx := testutils.Context(t) - jb.OCR2OracleSpec.Relay = relay.EVM + jb.OCR2OracleSpec.Relay = types.NetworkEVM err := job.ValidateKeyStoreMatch(ctx, jb.OCR2OracleSpec, keyStore, "bad key") require.EqualError(t, err, "no EVM key matching: \"bad key\"") @@ -938,7 +937,7 @@ func TestORM_ValidateKeyStoreMatch(t *testing.T) { t.Run("test Cosmos key validation", func(t *testing.T) { ctx := testutils.Context(t) - jb.OCR2OracleSpec.Relay = relay.Cosmos + jb.OCR2OracleSpec.Relay = types.NetworkCosmos err := job.ValidateKeyStoreMatch(ctx, jb.OCR2OracleSpec, keyStore, "bad key") require.EqualError(t, err, "no Cosmos key matching: \"bad key\"") @@ -950,7 +949,7 @@ func TestORM_ValidateKeyStoreMatch(t *testing.T) { t.Run("test Solana key validation", func(t *testing.T) { ctx := testutils.Context(t) - jb.OCR2OracleSpec.Relay = relay.Solana + jb.OCR2OracleSpec.Relay = types.NetworkSolana err := job.ValidateKeyStoreMatch(ctx, jb.OCR2OracleSpec, keyStore, "bad key") require.EqualError(t, err, "no Solana key matching: \"bad key\"") @@ -963,7 +962,7 @@ func TestORM_ValidateKeyStoreMatch(t *testing.T) { t.Run("test Starknet key validation", func(t *testing.T) { ctx := testutils.Context(t) - jb.OCR2OracleSpec.Relay = relay.StarkNet + jb.OCR2OracleSpec.Relay = types.NetworkStarkNet err := job.ValidateKeyStoreMatch(ctx, jb.OCR2OracleSpec, keyStore, "bad key") require.EqualError(t, err, "no Starknet key matching: \"bad key\"") @@ -1007,7 +1006,7 @@ func Test_FindJobs(t *testing.T) { _, address := cltest.MustInsertRandomKey(t, keyStore.Eth()) relayExtenders := evmtest.NewChainRelayExtenders(t, evmtest.TestChainOpts{DB: db, GeneralConfig: config, KeyStore: keyStore.Eth()}) legacyChains := evmrelay.NewLegacyChainsFromRelayerExtenders(relayExtenders) - jb1, err := ocr.ValidatedOracleSpecToml(legacyChains, + jb1, err := ocr.ValidatedOracleSpecToml(config, legacyChains, testspecs.GenerateOCRSpec(testspecs.OCRSpecParams{ JobID: uuid.New().String(), TransmitterAddress: address.Hex(), @@ -1092,7 +1091,7 @@ func Test_FindJob(t *testing.T) { _, address := cltest.MustInsertRandomKey(t, keyStore.Eth()) relayExtenders := evmtest.NewChainRelayExtenders(t, evmtest.TestChainOpts{DB: db, GeneralConfig: config, KeyStore: keyStore.Eth()}) legacyChains := evmrelay.NewLegacyChainsFromRelayerExtenders(relayExtenders) - job, err := ocr.ValidatedOracleSpecToml(legacyChains, + job, err := ocr.ValidatedOracleSpecToml(config, legacyChains, testspecs.GenerateOCRSpec(testspecs.OCRSpecParams{ JobID: externalJobID.String(), Name: "orig ocr spec", @@ -1103,7 +1102,7 @@ func Test_FindJob(t *testing.T) { ) require.NoError(t, err) - jobSameAddress, err := ocr.ValidatedOracleSpecToml(legacyChains, + jobSameAddress, err := ocr.ValidatedOracleSpecToml(config, legacyChains, testspecs.GenerateOCRSpec(testspecs.OCRSpecParams{ JobID: uuid.New().String(), TransmitterAddress: address.Hex(), @@ -1322,7 +1321,7 @@ func Test_FindPipelineRuns(t *testing.T) { externalJobID := uuid.New() _, address := cltest.MustInsertRandomKey(t, keyStore.Eth()) - jb, err := ocr.ValidatedOracleSpecToml(legacyChains, + jb, err := ocr.ValidatedOracleSpecToml(config, legacyChains, testspecs.GenerateOCRSpec(testspecs.OCRSpecParams{ JobID: externalJobID.String(), TransmitterAddress: address.Hex(), @@ -1384,7 +1383,7 @@ func Test_PipelineRunsByJobID(t *testing.T) { externalJobID := uuid.New() _, address := cltest.MustInsertRandomKey(t, keyStore.Eth()) - jb, err := ocr.ValidatedOracleSpecToml(legacyChains, + jb, err := ocr.ValidatedOracleSpecToml(config, legacyChains, testspecs.GenerateOCRSpec(testspecs.OCRSpecParams{ JobID: externalJobID.String(), TransmitterAddress: address.Hex(), @@ -1450,7 +1449,7 @@ func Test_FindPipelineRunIDsByJobID(t *testing.T) { key, err := ethkey.NewV2() require.NoError(t, err) - jb, err = ocr.ValidatedOracleSpecToml(legacyChains, + jb, err = ocr.ValidatedOracleSpecToml(config, legacyChains, testspecs.GenerateOCRSpec(testspecs.OCRSpecParams{ JobID: jobID, Name: fmt.Sprintf("Job #%v", jobID), @@ -1554,7 +1553,7 @@ func Test_FindPipelineRunsByIDs(t *testing.T) { externalJobID := uuid.New() _, address := cltest.MustInsertRandomKey(t, keyStore.Eth()) - jb, err := ocr.ValidatedOracleSpecToml(legacyChains, + jb, err := ocr.ValidatedOracleSpecToml(config, legacyChains, testspecs.GenerateOCRSpec(testspecs.OCRSpecParams{ JobID: externalJobID.String(), TransmitterAddress: address.Hex(), @@ -1730,7 +1729,7 @@ func Test_CountPipelineRunsByJobID(t *testing.T) { externalJobID := uuid.New() _, address := cltest.MustInsertRandomKey(t, keyStore.Eth()) - jb, err := ocr.ValidatedOracleSpecToml(legacyChains, + jb, err := ocr.ValidatedOracleSpecToml(config, legacyChains, testspecs.GenerateOCRSpec(testspecs.OCRSpecParams{ JobID: externalJobID.String(), TransmitterAddress: address.Hex(), diff --git a/core/services/job/mocks/kv_store.go b/core/services/job/mocks/kv_store.go index 139978f3579..270a6c1d554 100644 --- a/core/services/job/mocks/kv_store.go +++ b/core/services/job/mocks/kv_store.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. package mocks diff --git a/core/services/job/mocks/orm.go b/core/services/job/mocks/orm.go index 44b8c1f5be8..b8534b9d688 100644 --- a/core/services/job/mocks/orm.go +++ b/core/services/job/mocks/orm.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. package mocks diff --git a/core/services/job/mocks/service_ctx.go b/core/services/job/mocks/service_ctx.go index 43c28632963..d01ef619be3 100644 --- a/core/services/job/mocks/service_ctx.go +++ b/core/services/job/mocks/service_ctx.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. package mocks diff --git a/core/services/job/mocks/spawner.go b/core/services/job/mocks/spawner.go index 60d36b18fa5..37e883ef3c5 100644 --- a/core/services/job/mocks/spawner.go +++ b/core/services/job/mocks/spawner.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. package mocks diff --git a/core/services/job/models.go b/core/services/job/models.go index 67b7b8b0bbe..0c6390b3dbf 100644 --- a/core/services/job/models.go +++ b/core/services/job/models.go @@ -25,7 +25,6 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/chains/evm/utils/big" clnull "github.com/smartcontractkit/chainlink/v2/core/null" "github.com/smartcontractkit/chainlink/v2/core/services/pipeline" - "github.com/smartcontractkit/chainlink/v2/core/services/relay" "github.com/smartcontractkit/chainlink/v2/core/services/signatures/secp256k1" "github.com/smartcontractkit/chainlink/v2/core/store/models" "github.com/smartcontractkit/chainlink/v2/core/utils/stringutils" @@ -327,15 +326,32 @@ func (r JSONConfig) MercuryCredentialName() (string, error) { return name, nil } +func (r JSONConfig) ApplyDefaultsOCR2(cfg ocr2Config) { + _, ok := r["defaultTransactionQueueDepth"] + if !ok { + r["defaultTransactionQueueDepth"] = cfg.DefaultTransactionQueueDepth() + } + _, ok = r["simulateTransactions"] + if !ok { + r["simulateTransactions"] = cfg.SimulateTransactions() + } +} + +type ocr2Config interface { + DefaultTransactionQueueDepth() uint32 + SimulateTransactions() bool +} + var ForwardersSupportedPlugins = []types.OCR2PluginType{types.Median, types.DKG, types.OCR2VRF, types.OCR2Keeper, types.Functions} // OCR2OracleSpec defines the job spec for OCR2 jobs. // Relay config is chain specific config for a relay (chain adapter). type OCR2OracleSpec struct { - ID int32 `toml:"-"` - ContractID string `toml:"contractID"` - FeedID *common.Hash `toml:"feedID"` - Relay relay.Network `toml:"relay"` + ID int32 `toml:"-"` + ContractID string `toml:"contractID"` + FeedID *common.Hash `toml:"feedID"` + // Network + Relay string `toml:"relay"` // TODO BCF-2442 implement ChainID as top level parameter rathe than buried in RelayConfig. ChainID string `toml:"chainID"` RelayConfig JSONConfig `toml:"relayConfig"` @@ -354,9 +370,9 @@ type OCR2OracleSpec struct { CaptureAutomationCustomTelemetry bool `toml:"captureAutomationCustomTelemetry"` } -func validateRelayID(id relay.ID) error { +func validateRelayID(id types.RelayID) error { // only the EVM has specific requirements - if id.Network == relay.EVM { + if id.Network == types.NetworkEVM { _, err := toml.ChainIDInt64(id.ChainID) if err != nil { return fmt.Errorf("invalid EVM chain id %s: %w", id.ChainID, err) @@ -365,20 +381,20 @@ func validateRelayID(id relay.ID) error { return nil } -func (s *OCR2OracleSpec) RelayID() (relay.ID, error) { +func (s *OCR2OracleSpec) RelayID() (types.RelayID, error) { cid, err := s.getChainID() if err != nil { - return relay.ID{}, err + return types.RelayID{}, err } - rid := relay.NewID(s.Relay, cid) + rid := types.NewRelayID(s.Relay, cid) err = validateRelayID(rid) if err != nil { - return relay.ID{}, err + return types.RelayID{}, err } return rid, nil } -func (s *OCR2OracleSpec) getChainID() (relay.ChainID, error) { +func (s *OCR2OracleSpec) getChainID() (string, error) { if s.ChainID != "" { return s.ChainID, nil } @@ -386,7 +402,7 @@ func (s *OCR2OracleSpec) getChainID() (relay.ChainID, error) { return s.getChainIdFromRelayConfig() } -func (s *OCR2OracleSpec) getChainIdFromRelayConfig() (relay.ChainID, error) { +func (s *OCR2OracleSpec) getChainIdFromRelayConfig() (string, error) { v, exists := s.RelayConfig["chainID"] if !exists { @@ -738,10 +754,10 @@ type LegacyGasStationSidecarSpec struct { // BootstrapSpec defines the spec to handles the node communication setup process. type BootstrapSpec struct { - ID int32 `toml:"-"` - ContractID string `toml:"contractID"` - FeedID *common.Hash `toml:"feedID"` - Relay relay.Network `toml:"relay"` + ID int32 `toml:"-"` + ContractID string `toml:"contractID"` + FeedID *common.Hash `toml:"feedID"` + Relay string `toml:"relay"` // RelayID.Network RelayConfig JSONConfig MonitoringEndpoint null.String `toml:"monitoringEndpoint"` BlockchainTimeout models.Interval `toml:"blockchainTimeout"` diff --git a/core/services/job/models_test.go b/core/services/job/models_test.go index fa15e3b1b22..4d10fbb43c4 100644 --- a/core/services/job/models_test.go +++ b/core/services/job/models_test.go @@ -12,51 +12,50 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/codec" "github.com/smartcontractkit/chainlink-common/pkg/types" - "github.com/smartcontractkit/chainlink/v2/core/services/relay" evmtypes "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm/types" "github.com/smartcontractkit/chainlink/v2/core/store/models" ) func TestOCR2OracleSpec_RelayIdentifier(t *testing.T) { type fields struct { - Relay relay.Network + Relay string ChainID string RelayConfig JSONConfig } tests := []struct { name string fields fields - want relay.ID + want types.RelayID wantErr bool }{ {name: "err no chain id", fields: fields{}, - want: relay.ID{}, + want: types.RelayID{}, wantErr: true, }, { name: "evm explicitly configured", fields: fields{ - Relay: relay.EVM, + Relay: types.NetworkEVM, ChainID: "1", }, - want: relay.ID{Network: relay.EVM, ChainID: "1"}, + want: types.RelayID{Network: types.NetworkEVM, ChainID: "1"}, }, { name: "evm implicitly configured", fields: fields{ - Relay: relay.EVM, + Relay: types.NetworkEVM, RelayConfig: map[string]any{"chainID": 1}, }, - want: relay.ID{Network: relay.EVM, ChainID: "1"}, + want: types.RelayID{Network: types.NetworkEVM, ChainID: "1"}, }, { name: "evm implicitly configured with bad value", fields: fields{ - Relay: relay.EVM, + Relay: types.NetworkEVM, RelayConfig: map[string]any{"chainID": float32(1)}, }, - want: relay.ID{}, + want: types.RelayID{}, wantErr: true, }, } @@ -91,7 +90,7 @@ var ( func TestOCR2OracleSpec(t *testing.T) { val := OCR2OracleSpec{ - Relay: relay.EVM, + Relay: types.NetworkEVM, PluginType: types.Median, ContractID: "foo", OCRKeyBundleID: null.StringFrom("bar"), diff --git a/core/services/job/orm.go b/core/services/job/orm.go index 9d2a6545163..f7238799634 100644 --- a/core/services/job/orm.go +++ b/core/services/job/orm.go @@ -31,7 +31,6 @@ import ( medianconfig "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/median/config" "github.com/smartcontractkit/chainlink/v2/core/services/pg" "github.com/smartcontractkit/chainlink/v2/core/services/pipeline" - "github.com/smartcontractkit/chainlink/v2/core/services/relay" "github.com/smartcontractkit/chainlink/v2/core/store/models" ) @@ -488,24 +487,24 @@ func ValidateKeyStoreMatch(ctx context.Context, spec *OCR2OracleSpec, keyStore k return } -func validateKeyStoreMatchForRelay(ctx context.Context, network relay.Network, keyStore keystore.Master, key string) error { +func validateKeyStoreMatchForRelay(ctx context.Context, network string, keyStore keystore.Master, key string) error { switch network { - case relay.EVM: + case types.NetworkEVM: _, err := keyStore.Eth().Get(ctx, key) if err != nil { return errors.Errorf("no EVM key matching: %q", key) } - case relay.Cosmos: + case types.NetworkCosmos: _, err := keyStore.Cosmos().Get(key) if err != nil { return errors.Errorf("no Cosmos key matching: %q", key) } - case relay.Solana: + case types.NetworkSolana: _, err := keyStore.Solana().Get(key) if err != nil { return errors.Errorf("no Solana key matching: %q", key) } - case relay.StarkNet: + case types.NetworkStarkNet: _, err := keyStore.StarkNet().Get(key) if err != nil { return errors.Errorf("no Starknet key matching: %q", key) diff --git a/core/services/job/orm_test.go b/core/services/job/orm_test.go index 2e19669417a..fb0e846b9d2 100644 --- a/core/services/job/orm_test.go +++ b/core/services/job/orm_test.go @@ -34,13 +34,13 @@ func TestLoadConfigVarsLocalOCR(t *testing.T) { chainConfig := evmtest.NewChainScopedConfig(t, config) jobSpec := &job.OCROracleSpec{} - jobSpec = job.LoadConfigVarsLocalOCR(chainConfig.EVM().OCR(), *jobSpec, chainConfig.OCR()) + jobSpec = job.LoadConfigVarsLocalOCR(chainConfig.EVM().OCR(), *jobSpec, config.OCR()) - require.Equal(t, models.Interval(chainConfig.OCR().ObservationTimeout()), jobSpec.ObservationTimeout) - require.Equal(t, models.Interval(chainConfig.OCR().BlockchainTimeout()), jobSpec.BlockchainTimeout) - require.Equal(t, models.Interval(chainConfig.OCR().ContractSubscribeInterval()), jobSpec.ContractConfigTrackerSubscribeInterval) - require.Equal(t, models.Interval(chainConfig.OCR().ContractPollInterval()), jobSpec.ContractConfigTrackerPollInterval) - require.Equal(t, chainConfig.OCR().CaptureEATelemetry(), jobSpec.CaptureEATelemetry) + require.Equal(t, models.Interval(config.OCR().ObservationTimeout()), jobSpec.ObservationTimeout) + require.Equal(t, models.Interval(config.OCR().BlockchainTimeout()), jobSpec.BlockchainTimeout) + require.Equal(t, models.Interval(config.OCR().ContractSubscribeInterval()), jobSpec.ContractConfigTrackerSubscribeInterval) + require.Equal(t, models.Interval(config.OCR().ContractPollInterval()), jobSpec.ContractConfigTrackerPollInterval) + require.Equal(t, config.OCR().CaptureEATelemetry(), jobSpec.CaptureEATelemetry) require.Equal(t, chainConfig.EVM().OCR().ContractConfirmations(), jobSpec.ContractConfigConfirmations) require.Equal(t, models.Interval(chainConfig.EVM().OCR().DatabaseTimeout()), *jobSpec.DatabaseTimeout) diff --git a/core/services/job/runner_integration_test.go b/core/services/job/runner_integration_test.go index e13b1025b8b..26a78a8624e 100644 --- a/core/services/job/runner_integration_test.go +++ b/core/services/job/runner_integration_test.go @@ -198,7 +198,7 @@ func TestRunner(t *testing.T) { // Reference a different one legacyChains := cltest.NewLegacyChainsWithMockChain(t, nil, config) - jb, err := ocr.ValidatedOracleSpecToml(legacyChains, fmt.Sprintf(` + jb, err := ocr.ValidatedOracleSpecToml(config, legacyChains, fmt.Sprintf(` type = "offchainreporting" schemaVersion = 1 evmChainID = 0 @@ -446,7 +446,7 @@ answer1 [type=median index=0]; evmChainID = "0" ` s = fmt.Sprintf(s, cltest.NewEIP55Address()) - jb, err := ocr.ValidatedOracleSpecToml(legacyChains, s) + jb, err := ocr.ValidatedOracleSpecToml(config, legacyChains, s) require.NoError(t, err) err = toml.Unmarshal([]byte(s), &jb) require.NoError(t, err) @@ -468,7 +468,7 @@ answer1 [type=median index=0]; monitoringEndpoint, legacyChains, lggr, - config.Database(), + config, servicetest.Run(t, mailboxtest.NewMonitor(t)), ) _, err = sd.ServicesForSpec(testutils.Context(t), jb) @@ -481,7 +481,7 @@ answer1 [type=median index=0]; require.NoError(t, err) s := fmt.Sprintf(minimalNonBootstrapTemplate, cltest.NewEIP55Address(), transmitterAddress.Hex(), kb.ID(), "http://blah.com", "") - jb, err := ocr.ValidatedOracleSpecToml(legacyChains, s) + jb, err := ocr.ValidatedOracleSpecToml(config, legacyChains, s) require.NoError(t, err) err = toml.Unmarshal([]byte(s), &jb) require.NoError(t, err) @@ -503,7 +503,7 @@ answer1 [type=median index=0]; monitoringEndpoint, legacyChains, lggr, - config.Database(), + config, servicetest.Run(t, mailboxtest.NewMonitor(t)), ) _, err = sd.ServicesForSpec(testutils.Context(t), jb) @@ -512,7 +512,7 @@ answer1 [type=median index=0]; t.Run("test min bootstrap", func(t *testing.T) { s := fmt.Sprintf(minimalBootstrapTemplate, cltest.NewEIP55Address()) - jb, err := ocr.ValidatedOracleSpecToml(legacyChains, s) + jb, err := ocr.ValidatedOracleSpecToml(config, legacyChains, s) require.NoError(t, err) err = toml.Unmarshal([]byte(s), &jb) require.NoError(t, err) @@ -531,7 +531,7 @@ answer1 [type=median index=0]; monitoringEndpoint, legacyChains, lggr, - config.Database(), + config, servicetest.Run(t, mailboxtest.NewMonitor(t)), ) _, err = sd.ServicesForSpec(testutils.Context(t), jb) @@ -565,7 +565,7 @@ answer1 [type=median index=0]; require.NoError(t, err) s := fmt.Sprintf(minimalNonBootstrapTemplate, cltest.NewEIP55Address(), transmitterAddress.Hex(), kb.ID(), "http://blah.com", "") - jb, err := ocr.ValidatedOracleSpecToml(legacyChains, s) + jb, err := ocr.ValidatedOracleSpecToml(config, legacyChains, s) require.NoError(t, err) err = toml.Unmarshal([]byte(s), &jb) require.NoError(t, err) @@ -587,7 +587,7 @@ answer1 [type=median index=0]; monitoringEndpoint, legacyChains, lggr, - config.Database(), + config, servicetest.Run(t, mailboxtest.NewMonitor(t)), ) @@ -632,7 +632,7 @@ answer1 [type=median index=0]; monitoringEndpoint, legacyChains, lggr, - config.Database(), + config, servicetest.Run(t, mailboxtest.NewMonitor(t)), ) services, err := sd.ServicesForSpec(testutils.Context(t), *jb) diff --git a/core/services/job/spawner_test.go b/core/services/job/spawner_test.go index d3927da6590..ae8ffaa2161 100644 --- a/core/services/job/spawner_test.go +++ b/core/services/job/spawner_test.go @@ -15,6 +15,7 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/loop" "github.com/smartcontractkit/chainlink-common/pkg/services" "github.com/smartcontractkit/chainlink-common/pkg/services/servicetest" + "github.com/smartcontractkit/chainlink-common/pkg/types" "github.com/smartcontractkit/chainlink-common/pkg/utils" "github.com/smartcontractkit/chainlink-common/pkg/utils/mailbox/mailboxtest" "github.com/smartcontractkit/chainlink/v2/core/capabilities" @@ -34,7 +35,6 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/services/ocr" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2" "github.com/smartcontractkit/chainlink/v2/core/services/pipeline" - "github.com/smartcontractkit/chainlink/v2/core/services/relay" evmrelay "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm" evmrelayer "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm" "github.com/smartcontractkit/chainlink/v2/plugins" @@ -69,7 +69,7 @@ type relayGetter struct { r *evmrelayer.Relayer } -func (g *relayGetter) Get(id relay.ID) (loop.Relayer, error) { +func (g *relayGetter) Get(id types.RelayID) (loop.Relayer, error) { return evmrelayer.NewLoopRelayServerAdapter(g.r, g.e), nil } @@ -132,7 +132,7 @@ func TestSpawner_CreateJobDeleteJob(t *testing.T) { serviceA1.On("Start", mock.Anything).Return(nil).Once() serviceA2.On("Start", mock.Anything).Return(nil).Once().Run(func(mock.Arguments) { eventuallyA.ItHappened() }) mailMon := servicetest.Run(t, mailboxtest.NewMonitor(t)) - dA := ocr.NewDelegate(nil, orm, nil, nil, nil, monitoringEndpoint, legacyChains, logger.TestLogger(t), config.Database(), mailMon) + dA := ocr.NewDelegate(nil, orm, nil, nil, nil, monitoringEndpoint, legacyChains, logger.TestLogger(t), config, mailMon) delegateA := &delegate{jobA.Type, []job.ServiceCtx{serviceA1, serviceA2}, 0, make(chan struct{}), dA} eventuallyB := cltest.NewAwaiter() @@ -140,7 +140,7 @@ func TestSpawner_CreateJobDeleteJob(t *testing.T) { serviceB2 := mocks.NewServiceCtx(t) serviceB1.On("Start", mock.Anything).Return(nil).Once() serviceB2.On("Start", mock.Anything).Return(nil).Once().Run(func(mock.Arguments) { eventuallyB.ItHappened() }) - dB := ocr.NewDelegate(nil, orm, nil, nil, nil, monitoringEndpoint, legacyChains, logger.TestLogger(t), config.Database(), mailMon) + dB := ocr.NewDelegate(nil, orm, nil, nil, nil, monitoringEndpoint, legacyChains, logger.TestLogger(t), config, mailMon) delegateB := &delegate{jobB.Type, []job.ServiceCtx{serviceB1, serviceB2}, 0, make(chan struct{}), dB} spawner := job.NewSpawner(orm, config.Database(), noopChecker{}, map[job.Type]job.Delegate{ @@ -191,7 +191,7 @@ func TestSpawner_CreateJobDeleteJob(t *testing.T) { lggr := logger.TestLogger(t) orm := NewTestORM(t, db, pipeline.NewORM(db, lggr, config.JobPipeline().MaxSuccessfulRuns()), bridges.NewORM(db), keyStore, config.Database()) mailMon := servicetest.Run(t, mailboxtest.NewMonitor(t)) - d := ocr.NewDelegate(nil, orm, nil, nil, nil, monitoringEndpoint, legacyChains, logger.TestLogger(t), config.Database(), mailMon) + d := ocr.NewDelegate(nil, orm, nil, nil, nil, monitoringEndpoint, legacyChains, logger.TestLogger(t), config, mailMon) delegateA := &delegate{jobA.Type, []job.ServiceCtx{serviceA1, serviceA2}, 0, nil, d} spawner := job.NewSpawner(orm, config.Database(), noopChecker{}, map[job.Type]job.Delegate{ jobA.Type: delegateA, @@ -225,7 +225,7 @@ func TestSpawner_CreateJobDeleteJob(t *testing.T) { lggr := logger.TestLogger(t) orm := NewTestORM(t, db, pipeline.NewORM(db, lggr, config.JobPipeline().MaxSuccessfulRuns()), bridges.NewORM(db), keyStore, config.Database()) mailMon := servicetest.Run(t, mailboxtest.NewMonitor(t)) - d := ocr.NewDelegate(nil, orm, nil, nil, nil, monitoringEndpoint, legacyChains, logger.TestLogger(t), config.Database(), mailMon) + d := ocr.NewDelegate(nil, orm, nil, nil, nil, monitoringEndpoint, legacyChains, logger.TestLogger(t), config, mailMon) delegateA := &delegate{jobA.Type, []job.ServiceCtx{serviceA1, serviceA2}, 0, nil, d} spawner := job.NewSpawner(orm, config.Database(), noopChecker{}, map[job.Type]job.Delegate{ jobA.Type: delegateA, diff --git a/core/services/keeper/delegate.go b/core/services/keeper/delegate.go index 9652434759b..184a61e1e1a 100644 --- a/core/services/keeper/delegate.go +++ b/core/services/keeper/delegate.go @@ -9,6 +9,7 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/utils/mailbox" "github.com/smartcontractkit/chainlink/v2/core/chains/legacyevm" + "github.com/smartcontractkit/chainlink/v2/core/config" "github.com/smartcontractkit/chainlink/v2/core/logger" "github.com/smartcontractkit/chainlink/v2/core/services/job" "github.com/smartcontractkit/chainlink/v2/core/services/pipeline" @@ -17,7 +18,12 @@ import ( // To make sure Delegate struct implements job.Delegate interface var _ job.Delegate = (*Delegate)(nil) +type DelegateConfig interface { + Keeper() config.Keeper +} + type Delegate struct { + cfg DelegateConfig logger logger.Logger db *sqlx.DB jrm job.ORM @@ -28,6 +34,7 @@ type Delegate struct { // NewDelegate is the constructor of Delegate func NewDelegate( + cfg DelegateConfig, db *sqlx.DB, jrm job.ORM, pr pipeline.Runner, @@ -36,6 +43,7 @@ func NewDelegate( mailMon *mailbox.Monitor, ) *Delegate { return &Delegate{ + cfg: cfg, logger: logger, db: db, jrm: jrm, @@ -94,7 +102,7 @@ func (d *Delegate) ServicesForSpec(ctx context.Context, spec job.Job) (services } } - keeper := chain.Config().Keeper() + keeper := d.cfg.Keeper() registry := keeper.Registry() registrySynchronizer := NewRegistrySynchronizer(RegistrySynchronizerOptions{ Job: spec, @@ -117,7 +125,7 @@ func (d *Delegate) ServicesForSpec(ctx context.Context, spec job.Job) (services chain.HeadBroadcaster(), chain.GasEstimator(), svcLogger, - chain.Config().Keeper(), + d.cfg.Keeper(), effectiveKeeperAddress, ) diff --git a/core/services/keeper/orm_test.go b/core/services/keeper/orm_test.go index 3d305f3e2b1..439970b381b 100644 --- a/core/services/keeper/orm_test.go +++ b/core/services/keeper/orm_test.go @@ -14,16 +14,15 @@ import ( "github.com/jmoiron/sqlx" - evmconfig "github.com/smartcontractkit/chainlink/v2/core/chains/evm/config" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/types" evmutils "github.com/smartcontractkit/chainlink/v2/core/chains/evm/utils" ubig "github.com/smartcontractkit/chainlink/v2/core/chains/evm/utils/big" "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/configtest" - "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/evmtest" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/pgtest" "github.com/smartcontractkit/chainlink/v2/core/logger" + "github.com/smartcontractkit/chainlink/v2/core/services/chainlink" "github.com/smartcontractkit/chainlink/v2/core/services/keeper" "github.com/smartcontractkit/chainlink/v2/core/utils" bigmath "github.com/smartcontractkit/chainlink/v2/core/utils/big_math" @@ -36,12 +35,11 @@ var ( func setupKeeperDB(t *testing.T) ( *sqlx.DB, - evmconfig.ChainScopedConfig, + chainlink.GeneralConfig, *keeper.ORM, ) { - gcfg := configtest.NewGeneralConfig(t, nil) + cfg := configtest.NewGeneralConfig(t, nil) db := pgtest.NewSqlxDB(t) - cfg := evmtest.NewChainScopedConfig(t, gcfg) orm := keeper.NewORM(db, logger.TestLogger(t)) return db, cfg, orm } diff --git a/core/services/keeper/upkeep_executer_test.go b/core/services/keeper/upkeep_executer_test.go index 33850ea7134..ec23331f904 100644 --- a/core/services/keeper/upkeep_executer_test.go +++ b/core/services/keeper/upkeep_executer_test.go @@ -89,7 +89,7 @@ func setup(t *testing.T, estimator gas.EvmFeeEstimator, overrideFn func(c *chain registry, jb := cltest.MustInsertKeeperRegistry(t, db, orm, keyStore.Eth(), 0, 1, 20) lggr := logger.TestLogger(t) - executer := keeper.NewUpkeepExecuter(jb, orm, jpv2.Pr, ethClient, ch.HeadBroadcaster(), ch.GasEstimator(), lggr, ch.Config().Keeper(), jb.KeeperSpec.FromAddress.Address()) + executer := keeper.NewUpkeepExecuter(jb, orm, jpv2.Pr, ethClient, ch.HeadBroadcaster(), ch.GasEstimator(), lggr, cfg.Keeper(), jb.KeeperSpec.FromAddress.Address()) upkeep := cltest.MustInsertUpkeepForRegistry(t, db, registry) servicetest.Run(t, executer) return db, cfg, ethClient, executer, registry, upkeep, jb, jpv2, txm, keyStore, ch, orm @@ -262,14 +262,14 @@ func Test_UpkeepExecuter_PerformsUpkeep_Happy(t *testing.T) { }) t.Run("errors if submission chain not found", func(t *testing.T) { - db, _, ethMock, _, _, _, _, jpv2, _, keyStore, ch, orm := setup(t, mockEstimator(t), nil) + db, cfg, ethMock, _, _, _, _, jpv2, _, keyStore, ch, orm := setup(t, mockEstimator(t), nil) registry, jb := cltest.MustInsertKeeperRegistry(t, db, orm, keyStore.Eth(), 0, 1, 20) // change chain ID to non-configured chain jb.KeeperSpec.EVMChainID = (*ubig.Big)(big.NewInt(999)) cltest.MustInsertUpkeepForRegistry(t, db, registry) lggr := logger.TestLogger(t) - executer := keeper.NewUpkeepExecuter(jb, orm, jpv2.Pr, ethMock, ch.HeadBroadcaster(), ch.GasEstimator(), lggr, ch.Config().Keeper(), jb.KeeperSpec.FromAddress.Address()) + executer := keeper.NewUpkeepExecuter(jb, orm, jpv2.Pr, ethMock, ch.HeadBroadcaster(), ch.GasEstimator(), lggr, cfg.Keeper(), jb.KeeperSpec.FromAddress.Address()) err := executer.Start(testutils.Context(t)) require.NoError(t, err) head := newHead() diff --git a/core/services/keystore/mocks/cosmos.go b/core/services/keystore/mocks/cosmos.go index 36d1daec524..5e16a1a3c34 100644 --- a/core/services/keystore/mocks/cosmos.go +++ b/core/services/keystore/mocks/cosmos.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. package mocks diff --git a/core/services/keystore/mocks/csa.go b/core/services/keystore/mocks/csa.go index ba0ce76e39a..c99fef9de8c 100644 --- a/core/services/keystore/mocks/csa.go +++ b/core/services/keystore/mocks/csa.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. package mocks diff --git a/core/services/keystore/mocks/dkg_encrypt.go b/core/services/keystore/mocks/dkg_encrypt.go index 1dc17b61183..48f50b3cec7 100644 --- a/core/services/keystore/mocks/dkg_encrypt.go +++ b/core/services/keystore/mocks/dkg_encrypt.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. package mocks diff --git a/core/services/keystore/mocks/dkg_sign.go b/core/services/keystore/mocks/dkg_sign.go index 1ff71e2fc8d..fd16f573a87 100644 --- a/core/services/keystore/mocks/dkg_sign.go +++ b/core/services/keystore/mocks/dkg_sign.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. package mocks diff --git a/core/services/keystore/mocks/eth.go b/core/services/keystore/mocks/eth.go index 591477ce6d3..f4a2bea1b02 100644 --- a/core/services/keystore/mocks/eth.go +++ b/core/services/keystore/mocks/eth.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. package mocks diff --git a/core/services/keystore/mocks/master.go b/core/services/keystore/mocks/master.go index 4662635cb00..2739c4bbe34 100644 --- a/core/services/keystore/mocks/master.go +++ b/core/services/keystore/mocks/master.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. package mocks diff --git a/core/services/keystore/mocks/ocr.go b/core/services/keystore/mocks/ocr.go index b29f07f03f4..76659d0d4d1 100644 --- a/core/services/keystore/mocks/ocr.go +++ b/core/services/keystore/mocks/ocr.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. package mocks diff --git a/core/services/keystore/mocks/ocr2.go b/core/services/keystore/mocks/ocr2.go index 13f0c65b9d1..74c8eed70cc 100644 --- a/core/services/keystore/mocks/ocr2.go +++ b/core/services/keystore/mocks/ocr2.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. package mocks diff --git a/core/services/keystore/mocks/p2p.go b/core/services/keystore/mocks/p2p.go index 7e480c5d96f..cb5a9329e54 100644 --- a/core/services/keystore/mocks/p2p.go +++ b/core/services/keystore/mocks/p2p.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. package mocks diff --git a/core/services/keystore/mocks/solana.go b/core/services/keystore/mocks/solana.go index 7c4593ac5a3..2f9514cc1da 100644 --- a/core/services/keystore/mocks/solana.go +++ b/core/services/keystore/mocks/solana.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. package mocks diff --git a/core/services/keystore/mocks/starknet.go b/core/services/keystore/mocks/starknet.go index 61fb89418b4..a6cc0d5e5f3 100644 --- a/core/services/keystore/mocks/starknet.go +++ b/core/services/keystore/mocks/starknet.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. package mocks diff --git a/core/services/keystore/mocks/vrf.go b/core/services/keystore/mocks/vrf.go index acd6e02d434..87c6a724bdb 100644 --- a/core/services/keystore/mocks/vrf.go +++ b/core/services/keystore/mocks/vrf.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. package mocks diff --git a/core/services/mocks/checker.go b/core/services/mocks/checker.go index 2572efb1822..09be8c23453 100644 --- a/core/services/mocks/checker.go +++ b/core/services/mocks/checker.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. package mocks diff --git a/core/services/ocr/config.go b/core/services/ocr/config.go index 53ec9f9cea9..0dca9e83b3c 100644 --- a/core/services/ocr/config.go +++ b/core/services/ocr/config.go @@ -4,13 +4,15 @@ import ( ocrtypes "github.com/smartcontractkit/libocr/offchainreporting/types" evmconfig "github.com/smartcontractkit/chainlink/v2/core/chains/evm/config" + "github.com/smartcontractkit/chainlink/v2/core/config" "github.com/smartcontractkit/chainlink/v2/core/services/job" - "github.com/smartcontractkit/chainlink/v2/core/services/pg" ) // Config contains OCR configurations for a job. type Config interface { - pg.QConfig + Insecure() config.Insecure + JobPipeline() config.JobPipeline + OCR() config.OCR } func toLocalConfig(cfg ValidationConfig, evmOcrConfig evmconfig.OCR, insecureCfg insecureConfig, spec job.OCROracleSpec, ocrConfig job.OCRConfig) ocrtypes.LocalConfig { diff --git a/core/services/ocr/contract_tracker_test.go b/core/services/ocr/contract_tracker_test.go index 5473a2c924c..6f8b05c6436 100644 --- a/core/services/ocr/contract_tracker_test.go +++ b/core/services/ocr/contract_tracker_test.go @@ -20,7 +20,6 @@ import ( htmocks "github.com/smartcontractkit/chainlink/v2/common/headtracker/mocks" evmclimocks "github.com/smartcontractkit/chainlink/v2/core/chains/evm/client/mocks" - evmconfig "github.com/smartcontractkit/chainlink/v2/core/chains/evm/config" logmocks "github.com/smartcontractkit/chainlink/v2/core/chains/evm/log/mocks" evmtypes "github.com/smartcontractkit/chainlink/v2/core/chains/evm/types" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/offchain_aggregator_wrapper" @@ -55,13 +54,10 @@ type contractTrackerUni struct { } func newContractTrackerUni(t *testing.T, opts ...interface{}) (uni contractTrackerUni) { - var cfg evmconfig.ChainScopedConfig var filterer *offchainaggregator.OffchainAggregatorFilterer var contract *offchain_aggregator_wrapper.OffchainAggregator for _, opt := range opts { switch v := opt.(type) { - case evmconfig.ChainScopedConfig: - cfg = v case *offchainaggregator.OffchainAggregatorFilterer: filterer = v case *offchain_aggregator_wrapper.OffchainAggregator: @@ -70,9 +66,8 @@ func newContractTrackerUni(t *testing.T, opts ...interface{}) (uni contractTrack t.Fatalf("unrecognised option type %T", v) } } - if cfg == nil { - cfg = evmtest.NewChainScopedConfig(t, configtest.NewTestGeneralConfig(t)) - } + gcfg := configtest.NewTestGeneralConfig(t) + cfg := evmtest.NewChainScopedConfig(t, gcfg) if filterer == nil { filterer = mustNewFilterer(t) } diff --git a/core/services/ocr/delegate.go b/core/services/ocr/delegate.go index b16ede8089f..88561bd1c3a 100644 --- a/core/services/ocr/delegate.go +++ b/core/services/ocr/delegate.go @@ -12,13 +12,13 @@ import ( "github.com/jmoiron/sqlx" - commonlogger "github.com/smartcontractkit/chainlink-common/pkg/logger" - "github.com/smartcontractkit/chainlink-common/pkg/utils/mailbox" - "github.com/smartcontractkit/libocr/gethwrappers/offchainaggregator" ocr "github.com/smartcontractkit/libocr/offchainreporting" ocrtypes "github.com/smartcontractkit/libocr/offchainreporting/types" + commonlogger "github.com/smartcontractkit/chainlink-common/pkg/logger" + "github.com/smartcontractkit/chainlink-common/pkg/utils/mailbox" + txmgrcommon "github.com/smartcontractkit/chainlink/v2/common/txmgr" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/txmgr" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/types" @@ -95,7 +95,7 @@ func (d *Delegate) ServicesForSpec(ctx context.Context, jb job.Job) (services [] if err != nil { return nil, err } - concreteSpec, err := job.LoadConfigVarsOCR(chain.Config().EVM().OCR(), chain.Config().OCR(), *jb.OCROracleSpec) + concreteSpec, err := job.LoadConfigVarsOCR(chain.Config().EVM().OCR(), d.cfg.OCR(), *jb.OCROracleSpec) if err != nil { return nil, err } @@ -156,11 +156,11 @@ func (d *Delegate) ServicesForSpec(ctx context.Context, jb job.Job) (services [] v2Bootstrappers = peerWrapper.P2PConfig().V2().DefaultBootstrappers() } - ocrLogger := commonlogger.NewOCRWrapper(lggr, chain.Config().OCR().TraceLogging(), func(msg string) { + ocrLogger := commonlogger.NewOCRWrapper(lggr, d.cfg.OCR().TraceLogging(), func(msg string) { d.jobORM.TryRecordError(jb.ID, msg) }) - lc := toLocalConfig(chain.Config().EVM(), chain.Config().EVM().OCR(), chain.Config().Insecure(), *concreteSpec, chain.Config().OCR()) + lc := toLocalConfig(chain.Config().EVM(), chain.Config().EVM().OCR(), d.cfg.Insecure(), *concreteSpec, d.cfg.OCR()) if err = ocr.SanityCheckLocalConfig(lc); err != nil { return nil, err } @@ -196,11 +196,10 @@ func (d *Delegate) ServicesForSpec(ctx context.Context, jb job.Job) (services [] return nil, errors.Wrap(err, "could not get contract ABI JSON") } - cfg := chain.Config() - strategy := txmgrcommon.NewQueueingTxStrategy(jb.ExternalJobID, cfg.OCR().DefaultTransactionQueueDepth()) + strategy := txmgrcommon.NewQueueingTxStrategy(jb.ExternalJobID, d.cfg.OCR().DefaultTransactionQueueDepth()) var checker txmgr.TransmitCheckerSpec - if chain.Config().OCR().SimulateTransactions() { + if d.cfg.OCR().SimulateTransactions() { checker.CheckerType = txmgr.TransmitCheckerTypeSimulate } @@ -254,8 +253,8 @@ func (d *Delegate) ServicesForSpec(ctx context.Context, jb job.Job) (services [] saver := ocrcommon.NewResultRunSaver( d.pipelineRunner, lggr, - cfg.JobPipeline().MaxSuccessfulRuns(), - cfg.JobPipeline().ResultWriteQueueDepth(), + d.cfg.JobPipeline().MaxSuccessfulRuns(), + d.cfg.JobPipeline().ResultWriteQueueDepth(), ) var configOverrider ocrtypes.ConfigOverrider @@ -277,7 +276,7 @@ func (d *Delegate) ServicesForSpec(ctx context.Context, jb job.Job) (services [] configOverrider = configOverriderService } - jb.OCROracleSpec.CaptureEATelemetry = chain.Config().OCR().CaptureEATelemetry() + jb.OCROracleSpec.CaptureEATelemetry = d.cfg.OCR().CaptureEATelemetry() enhancedTelemChan := make(chan ocrcommon.EnhancedTelemetryData, 100) if ocrcommon.ShouldCollectEnhancedTelemetry(&jb) { enhancedTelemService := ocrcommon.NewEnhancedTelemetryService(&jb, enhancedTelemChan, make(chan struct{}), d.monitoringEndpointGen.GenMonitoringEndpoint("EVM", chain.ID().String(), concreteSpec.ContractAddress.String(), synchronization.EnhancedEA), lggr.Named("EnhancedTelemetry")) diff --git a/core/services/ocr/mocks/ocr_contract_tracker_db.go b/core/services/ocr/mocks/ocr_contract_tracker_db.go index 42eebf939d7..ed47d87cd1e 100644 --- a/core/services/ocr/mocks/ocr_contract_tracker_db.go +++ b/core/services/ocr/mocks/ocr_contract_tracker_db.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. package mocks diff --git a/core/services/ocr/validate.go b/core/services/ocr/validate.go index a0f2353eac1..a31994f891a 100644 --- a/core/services/ocr/validate.go +++ b/core/services/ocr/validate.go @@ -14,10 +14,16 @@ import ( evmconfig "github.com/smartcontractkit/chainlink/v2/core/chains/evm/config" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/types" "github.com/smartcontractkit/chainlink/v2/core/chains/legacyevm" + coreconfig "github.com/smartcontractkit/chainlink/v2/core/config" "github.com/smartcontractkit/chainlink/v2/core/services/job" "github.com/smartcontractkit/chainlink/v2/core/services/ocrcommon" ) +type GeneralConfig interface { + OCR() coreconfig.OCR + Insecure() coreconfig.Insecure +} + type ValidationConfig interface { ChainType() config.ChainType } @@ -37,8 +43,8 @@ type insecureConfig interface { } // ValidatedOracleSpecToml validates an oracle spec that came from TOML -func ValidatedOracleSpecToml(legacyChains legacyevm.LegacyChainContainer, tomlString string) (job.Job, error) { - return ValidatedOracleSpecTomlCfg(func(id *big.Int) (evmconfig.ChainScopedConfig, error) { +func ValidatedOracleSpecToml(gcfg GeneralConfig, legacyChains legacyevm.LegacyChainContainer, tomlString string) (job.Job, error) { + return ValidatedOracleSpecTomlCfg(gcfg, func(id *big.Int) (evmconfig.ChainScopedConfig, error) { c, err := legacyChains.Get(id.String()) if err != nil { return nil, err @@ -47,7 +53,7 @@ func ValidatedOracleSpecToml(legacyChains legacyevm.LegacyChainContainer, tomlSt }, tomlString) } -func ValidatedOracleSpecTomlCfg(configFn func(id *big.Int) (evmconfig.ChainScopedConfig, error), tomlString string) (job.Job, error) { +func ValidatedOracleSpecTomlCfg(gcfg GeneralConfig, configFn func(id *big.Int) (evmconfig.ChainScopedConfig, error), tomlString string) (job.Job, error) { var jb = job.Job{} var spec job.OCROracleSpec tree, err := toml.Load(tomlString) @@ -94,10 +100,10 @@ func ValidatedOracleSpecTomlCfg(configFn func(id *big.Int) (evmconfig.ChainScope if err := validateBootstrapSpec(tree); err != nil { return jb, err } - } else if err := validateNonBootstrapSpec(tree, jb, cfg.OCR().ObservationTimeout()); err != nil { + } else if err := validateNonBootstrapSpec(tree, jb, gcfg.OCR().ObservationTimeout()); err != nil { return jb, err } - if err := validateTimingParameters(cfg.EVM(), cfg.EVM().OCR(), cfg.Insecure(), spec, cfg.OCR()); err != nil { + if err := validateTimingParameters(cfg.EVM(), cfg.EVM().OCR(), gcfg.Insecure(), spec, gcfg.OCR()); err != nil { return jb, err } return jb, nil diff --git a/core/services/ocr/validate_test.go b/core/services/ocr/validate_test.go index e55c5d1a484..6e68559d09d 100644 --- a/core/services/ocr/validate_test.go +++ b/core/services/ocr/validate_test.go @@ -373,7 +373,7 @@ answer1 [type=median index=0]; } }) - s, err := ocr.ValidatedOracleSpecTomlCfg(func(id *big.Int) (evmconfig.ChainScopedConfig, error) { + s, err := ocr.ValidatedOracleSpecTomlCfg(c, func(id *big.Int) (evmconfig.ChainScopedConfig, error) { return evmtest.NewChainScopedConfig(t, c), nil }, tc.toml) tc.assertion(t, s, err) diff --git a/core/services/ocr2/delegate.go b/core/services/ocr2/delegate.go index da6d6a1b6e7..7a2ef532fd2 100644 --- a/core/services/ocr2/delegate.go +++ b/core/services/ocr2/delegate.go @@ -38,6 +38,7 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/loop" "github.com/smartcontractkit/chainlink-common/pkg/loop/reportingplugins" "github.com/smartcontractkit/chainlink-common/pkg/types" + "github.com/smartcontractkit/chainlink-common/pkg/types/core" llotypes "github.com/smartcontractkit/chainlink-common/pkg/types/llo" "github.com/smartcontractkit/chainlink-common/pkg/utils/mailbox" @@ -107,7 +108,7 @@ func (e ErrRelayNotEnabled) Error() string { } type RelayGetter interface { - Get(id relay.ID) (loop.Relayer, error) + Get(id types.RelayID) (loop.Relayer, error) } type Delegate struct { db *sqlx.DB // legacy: prefer to use ds instead @@ -130,7 +131,7 @@ type Delegate struct { mailMon *mailbox.Monitor legacyChains legacyevm.LegacyChainContainer // legacy: use relayers instead - capabilitiesRegistry types.CapabilitiesRegistry + capabilitiesRegistry core.CapabilitiesRegistry } type DelegateConfig interface { @@ -185,7 +186,9 @@ type ocr2Config interface { ContractPollInterval() time.Duration ContractTransmitterTransmitTimeout() time.Duration DatabaseTimeout() time.Duration + DefaultTransactionQueueDepth() uint32 KeyBundleID() (string, error) + SimulateTransactions() bool TraceLogging() bool CaptureAutomationCustomTelemetry() bool } @@ -242,7 +245,7 @@ func NewDelegate( ethKs keystore.Eth, relayers RelayGetter, mailMon *mailbox.Monitor, - capabilitiesRegistry types.CapabilitiesRegistry, + capabilitiesRegistry core.CapabilitiesRegistry, ) *Delegate { return &Delegate{ db: db, @@ -294,14 +297,14 @@ func (d *Delegate) OnDeleteJob(ctx context.Context, jb job.Job) error { return nil } // we only have clean to do for the EVM - if rid.Network == relay.EVM { + if rid.Network == types.NetworkEVM { return d.cleanupEVM(ctx, jb, rid) } return nil } // cleanupEVM is a helper for clean up EVM specific state when a job is deleted -func (d *Delegate) cleanupEVM(ctx context.Context, jb job.Job, relayID relay.ID) error { +func (d *Delegate) cleanupEVM(ctx context.Context, jb job.Job, relayID types.RelayID) error { // If UnregisterFilter returns an // error, that means it failed to remove a valid active filter from the db. We do abort the job deletion // in that case, since it should be easy for the user to retry and will avoid leaving the db in @@ -386,7 +389,7 @@ func (d *Delegate) ServicesForSpec(ctx context.Context, jb job.Job) ([]job.Servi return nil, ErrJobSpecNoRelayer{Err: err, PluginName: string(spec.PluginType)} } - if rid.Network == relay.EVM { + if rid.Network == types.NetworkEVM { lggr = logger.Sugared(lggr.With("evmChainID", rid.ChainID)) chain, err2 := d.legacyChains.Get(rid.ChainID) @@ -399,6 +402,7 @@ func (d *Delegate) ServicesForSpec(ctx context.Context, jb job.Job) ([]job.Servi } } spec.RelayConfig["effectiveTransmitterID"] = effectiveTransmitterID + spec.RelayConfig.ApplyDefaultsOCR2(d.cfg.OCR2()) ocrDB := NewDB(d.db, spec.ID, 0, lggr, d.cfg.Database()) if d.peerWrapper == nil { @@ -536,8 +540,8 @@ func (d *Delegate) newServicesGenericPlugin( ocrDB *db, lc ocrtypes.LocalConfig, ocrLogger commontypes.Logger, - capabilitiesRegistry types.CapabilitiesRegistry, - keyValueStore types.KeyValueStore, + capabilitiesRegistry core.CapabilitiesRegistry, + keyValueStore core.KeyValueStore, ) (srvs []job.ServiceCtx, err error) { spec := jb.OCR2OracleSpec // NOTE: we don't need to validate this config, since that happens as part of creating the job. @@ -635,7 +639,7 @@ func (d *Delegate) newServicesGenericPlugin( return nil, fmt.Errorf("cannot dump plugin config to string before sending to plugin: %s", err) } - pluginConfig := types.ReportingPluginServiceConfig{ + pluginConfig := core.ReportingPluginServiceConfig{ PluginName: pCfg.PluginName, Command: command, ProviderType: pCfg.ProviderType, @@ -739,7 +743,7 @@ func (d *Delegate) newServicesMercury( if err != nil { return nil, ErrJobSpecNoRelayer{Err: err, PluginName: "mercury"} } - if rid.Network != relay.EVM { + if rid.Network != types.NetworkEVM { return nil, fmt.Errorf("mercury services: expected EVM relayer got %s", rid.Network) } relayer, err := d.RelayGetter.Get(rid) @@ -823,7 +827,7 @@ func (d *Delegate) newServicesLLO( if err != nil { return nil, ErrJobSpecNoRelayer{Err: err, PluginName: "streams"} } - if rid.Network != relay.EVM { + if rid.Network != types.NetworkEVM { return nil, fmt.Errorf("streams services: expected EVM relayer got %s", rid.Network) } relayer, err := d.RelayGetter.Get(rid) @@ -998,7 +1002,7 @@ func (d *Delegate) newServicesDKG( if err != nil { return nil, ErrJobSpecNoRelayer{Err: err, PluginName: "DKG"} } - if rid.Network != relay.EVM { + if rid.Network != types.NetworkEVM { return nil, fmt.Errorf("DKG services: expected EVM relayer got %s", rid.Network) } @@ -1068,7 +1072,7 @@ func (d *Delegate) newServicesOCR2VRF( if err != nil { return nil, ErrJobSpecNoRelayer{Err: err, PluginName: "VRF"} } - if rid.Network != relay.EVM { + if rid.Network != types.NetworkEVM { return nil, fmt.Errorf("VRF services: expected EVM relayer got %s", rid.Network) } chain, err2 := d.legacyChains.Get(rid.ChainID) @@ -1182,10 +1186,10 @@ func (d *Delegate) newServicesOCR2VRF( lggr.ErrorIf(d.jobORM.RecordError(jb.ID, msg), "unable to record error") }) dkgReportingPluginFactoryDecorator := func(wrapped ocrtypes.ReportingPluginFactory) ocrtypes.ReportingPluginFactory { - return promwrapper.NewPromFactory(wrapped, "DKG", string(relay.EVM), chain.ID()) + return promwrapper.NewPromFactory(wrapped, "DKG", string(types.NetworkEVM), chain.ID()) } vrfReportingPluginFactoryDecorator := func(wrapped ocrtypes.ReportingPluginFactory) ocrtypes.ReportingPluginFactory { - return promwrapper.NewPromFactory(wrapped, "OCR2VRF", string(relay.EVM), chain.ID()) + return promwrapper.NewPromFactory(wrapped, "OCR2VRF", string(types.NetworkEVM), chain.ID()) } noopMonitoringEndpoint := telemetry.NoopAgent{} oracles, err2 := ocr2vrf.NewOCR2VRF(ocr2vrf.DKGVRFArgs{ @@ -1286,7 +1290,7 @@ func (d *Delegate) newServicesOCR2Keepers21( if err != nil { return nil, ErrJobSpecNoRelayer{Err: err, PluginName: "keeper2"} } - if rid.Network != relay.EVM { + if rid.Network != types.NetworkEVM { return nil, fmt.Errorf("keeper2 services: expected EVM relayer got %s", rid.Network) } @@ -1437,7 +1441,7 @@ func (d *Delegate) newServicesOCR2Keepers20( if err != nil { return nil, ErrJobSpecNoRelayer{Err: err, PluginName: "keepers2.0"} } - if rid.Network != relay.EVM { + if rid.Network != types.NetworkEVM { return nil, fmt.Errorf("keepers2.0 services: expected EVM relayer got %s", rid.Network) } chain, err2 := d.legacyChains.Get(rid.ChainID) @@ -1561,7 +1565,7 @@ func (d *Delegate) newServicesOCR2Functions( if err != nil { return nil, ErrJobSpecNoRelayer{Err: err, PluginName: "functions"} } - if rid.Network != relay.EVM { + if rid.Network != types.NetworkEVM { return nil, fmt.Errorf("functions services: expected EVM relayer got %s", rid.Network) } chain, err := d.legacyChains.Get(rid.ChainID) diff --git a/core/services/ocr2/plugins/dkg/persistence/db.go b/core/services/ocr2/plugins/dkg/persistence/db.go index 72997e28699..b8ecfbaceb4 100644 --- a/core/services/ocr2/plugins/dkg/persistence/db.go +++ b/core/services/ocr2/plugins/dkg/persistence/db.go @@ -21,7 +21,6 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/logger" "github.com/smartcontractkit/chainlink/v2/core/services/pg" - "github.com/smartcontractkit/chainlink/v2/core/services/relay" ) var ( @@ -60,7 +59,7 @@ type shareDB struct { } // NewShareDB creates a new DKG share database. -func NewShareDB(db *sqlx.DB, lggr logger.Logger, cfg pg.QConfig, chainID *big.Int, chainType relay.Network) ocr2vrftypes.DKGSharePersistence { +func NewShareDB(db *sqlx.DB, lggr logger.Logger, cfg pg.QConfig, chainID *big.Int, chainType string) ocr2vrftypes.DKGSharePersistence { return &shareDB{ q: pg.NewQ(db, lggr, cfg), lggr: lggr, diff --git a/core/services/ocr2/plugins/dkg/persistence/db_test.go b/core/services/ocr2/plugins/dkg/persistence/db_test.go index 53a5ae26758..a3949ea70dc 100644 --- a/core/services/ocr2/plugins/dkg/persistence/db_test.go +++ b/core/services/ocr2/plugins/dkg/persistence/db_test.go @@ -10,19 +10,19 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/smartcontractkit/chainlink-common/pkg/types" ocr2vrftypes "github.com/smartcontractkit/chainlink-vrf/types" "github.com/smartcontractkit/chainlink-vrf/types/hash" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/pgtest" "github.com/smartcontractkit/chainlink/v2/core/logger" - "github.com/smartcontractkit/chainlink/v2/core/services/relay" ) func setup(t testing.TB) (ocr2vrftypes.DKGSharePersistence, *sqlx.DB) { db := pgtest.NewSqlxDB(t) lggr := logger.TestLogger(t) - return NewShareDB(db, lggr, pgtest.NewQConfig(true), big.NewInt(1337), relay.EVM), db + return NewShareDB(db, lggr, pgtest.NewQConfig(true), big.NewInt(1337), types.NetworkEVM), db } func TestShareDB_WriteShareRecords(t *testing.T) { diff --git a/core/services/ocr2/plugins/dkg/plugin.go b/core/services/ocr2/plugins/dkg/plugin.go index 0310122655f..65216ac1115 100644 --- a/core/services/ocr2/plugins/dkg/plugin.go +++ b/core/services/ocr2/plugins/dkg/plugin.go @@ -22,7 +22,6 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/dkg/config" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/dkg/persistence" "github.com/smartcontractkit/chainlink/v2/core/services/pg" - "github.com/smartcontractkit/chainlink/v2/core/services/relay" evmrelay "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm" ) @@ -38,7 +37,7 @@ func NewDKGServices( db *sqlx.DB, qConfig pg.QConfig, chainID *big.Int, - network relay.Network, + network string, ) ([]job.ServiceCtx, error) { var pluginConfig config.PluginConfig err := json.Unmarshal(jb.OCR2OracleSpec.PluginConfig.Bytes(), &pluginConfig) diff --git a/core/services/ocr2/plugins/generic/pipeline_runner_adapter.go b/core/services/ocr2/plugins/generic/pipeline_runner_adapter.go index e6a429a5f73..22217b83660 100644 --- a/core/services/ocr2/plugins/generic/pipeline_runner_adapter.go +++ b/core/services/ocr2/plugins/generic/pipeline_runner_adapter.go @@ -4,7 +4,7 @@ import ( "context" "time" - "github.com/smartcontractkit/chainlink-common/pkg/types" + "github.com/smartcontractkit/chainlink-common/pkg/types/core" "github.com/smartcontractkit/chainlink/v2/core/logger" "github.com/smartcontractkit/chainlink/v2/core/services/job" @@ -12,7 +12,7 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/store/models" ) -var _ types.PipelineRunnerService = (*PipelineRunnerAdapter)(nil) +var _ core.PipelineRunnerService = (*PipelineRunnerAdapter)(nil) type pipelineRunner interface { ExecuteAndInsertFinishedRun(ctx context.Context, spec pipeline.Spec, vars pipeline.Vars, l logger.Logger, saveSuccessfulTaskRuns bool) (runID int64, results pipeline.TaskRunResults, err error) @@ -24,7 +24,7 @@ type PipelineRunnerAdapter struct { logger logger.Logger } -func (p *PipelineRunnerAdapter) ExecuteRun(ctx context.Context, spec string, vars types.Vars, options types.Options) (types.TaskResults, error) { +func (p *PipelineRunnerAdapter) ExecuteRun(ctx context.Context, spec string, vars core.Vars, options core.Options) (core.TaskResults, error) { s := pipeline.Spec{ DotDagSource: spec, CreatedAt: time.Now(), @@ -50,13 +50,13 @@ func (p *PipelineRunnerAdapter) ExecuteRun(ctx context.Context, spec string, var return nil, err } - taskResults := make([]types.TaskResult, len(trrs)) + taskResults := make([]core.TaskResult, len(trrs)) for i, trr := range trrs { - taskResults[i] = types.TaskResult{ + taskResults[i] = core.TaskResult{ ID: trr.ID.String(), Type: string(trr.Task.Type()), Index: int(trr.Task.OutputIndex()), - TaskValue: types.TaskValue{ + TaskValue: core.TaskValue{ Value: trr.Result.OutputDB(), Error: trr.Result.Error, IsTerminal: len(trr.Task.Outputs()) == 0, diff --git a/core/services/ocr2/plugins/generic/pipeline_runner_adapter_test.go b/core/services/ocr2/plugins/generic/pipeline_runner_adapter_test.go index ae74cb218ee..0d6bc02e198 100644 --- a/core/services/ocr2/plugins/generic/pipeline_runner_adapter_test.go +++ b/core/services/ocr2/plugins/generic/pipeline_runner_adapter_test.go @@ -12,7 +12,7 @@ import ( "github.com/stretchr/testify/require" "gopkg.in/guregu/null.v4" - "github.com/smartcontractkit/chainlink-common/pkg/types" + "github.com/smartcontractkit/chainlink-common/pkg/types/core" "github.com/smartcontractkit/chainlink/v2/core/bridges" "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" @@ -78,7 +78,7 @@ func TestAdapter_Integration(t *testing.T) { err = jobORM.CreateJob(&jb) require.NoError(t, err) pra := generic.NewPipelineRunnerAdapter(logger, jb, pr) - results, err := pra.ExecuteRun(testutils.Context(t), spec, types.Vars{Vars: map[string]interface{}{"val": 1}}, types.Options{}) + results, err := pra.ExecuteRun(testutils.Context(t), spec, core.Vars{Vars: map[string]interface{}{"val": 1}}, core.Options{}) require.NoError(t, err) finalResult := results[0].Value.Val.(decimal.Decimal) @@ -110,7 +110,7 @@ func TestAdapter_AddsDefaultVars(t *testing.T) { jobID, externalJobID, name := int32(100), uuid.New(), null.StringFrom("job-name") pra := generic.NewPipelineRunnerAdapter(logger, job.Job{ID: jobID, ExternalJobID: externalJobID, Name: name}, mpr) - _, err := pra.ExecuteRun(testutils.Context(t), spec, types.Vars{}, types.Options{}) + _, err := pra.ExecuteRun(testutils.Context(t), spec, core.Vars{}, core.Options{}) require.NoError(t, err) gotName, err := mpr.vars.Get("jb.name") @@ -133,7 +133,7 @@ func TestPipelineRunnerAdapter_SetsVarsOnSpec(t *testing.T) { pra := generic.NewPipelineRunnerAdapter(logger, job.Job{ID: jobID, ExternalJobID: externalJobID, Name: name, Type: jobType}, mpr) maxDuration := 100 * time.Second - _, err := pra.ExecuteRun(testutils.Context(t), spec, types.Vars{}, types.Options{MaxTaskDuration: maxDuration}) + _, err := pra.ExecuteRun(testutils.Context(t), spec, core.Vars{}, core.Options{MaxTaskDuration: maxDuration}) require.NoError(t, err) assert.Equal(t, jobID, mpr.spec.JobID) diff --git a/core/services/ocr2/plugins/generic/telemetry_adapter.go b/core/services/ocr2/plugins/generic/telemetry_adapter.go index a2ec6ba20cf..ea2206202ee 100644 --- a/core/services/ocr2/plugins/generic/telemetry_adapter.go +++ b/core/services/ocr2/plugins/generic/telemetry_adapter.go @@ -9,10 +9,10 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/services/synchronization" "github.com/smartcontractkit/chainlink/v2/core/services/telemetry" - "github.com/smartcontractkit/chainlink-common/pkg/types" + "github.com/smartcontractkit/chainlink-common/pkg/types/core" ) -var _ types.TelemetryService = (*TelemetryAdapter)(nil) +var _ core.TelemetryService = (*TelemetryAdapter)(nil) type TelemetryAdapter struct { endpointGenerator telemetry.MonitoringEndpointGenerator diff --git a/core/services/ocr2/plugins/mercury/plugin_test.go b/core/services/ocr2/plugins/mercury/plugin_test.go index 131f51af4b4..1d3260fdb1f 100644 --- a/core/services/ocr2/plugins/mercury/plugin_test.go +++ b/core/services/ocr2/plugins/mercury/plugin_test.go @@ -27,7 +27,6 @@ import ( libocr2types "github.com/smartcontractkit/libocr/offchainreporting2plus/types" "github.com/smartcontractkit/chainlink/v2/core/services/pipeline" - "github.com/smartcontractkit/chainlink/v2/core/services/relay" "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm/mercury/types" "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm/mercury/utils" "github.com/smartcontractkit/chainlink/v2/plugins" @@ -74,7 +73,7 @@ var ( ID: 7, ContractID: "phony", FeedID: ptr(common.BytesToHash([]byte{1, 2, 3})), - Relay: relay.EVM, + Relay: commontypes.NetworkEVM, ChainID: "1", }, PipelineSpec: &pipeline.Spec{}, diff --git a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v20/mocks/registry.go b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v20/mocks/registry.go index 8c8ea721d73..0e2f87d0821 100644 --- a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v20/mocks/registry.go +++ b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v20/mocks/registry.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. package mocks diff --git a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/core/mocks/upkeep_state_reader.go b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/core/mocks/upkeep_state_reader.go index 5a815987a83..0e9badc2ac3 100644 --- a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/core/mocks/upkeep_state_reader.go +++ b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/core/mocks/upkeep_state_reader.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. package mocks diff --git a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/mocks/http_client.go b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/mocks/http_client.go index d6982e9dbdb..ab8e9f04940 100644 --- a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/mocks/http_client.go +++ b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/mocks/http_client.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. package mocks diff --git a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/mocks/registry.go b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/mocks/registry.go index 0ef1fdd4038..c68e7094cca 100644 --- a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/mocks/registry.go +++ b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/mocks/registry.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. package mocks diff --git a/core/services/ocr2/plugins/ocr2vrf/coordinator/mocks/vrf_beacon.go b/core/services/ocr2/plugins/ocr2vrf/coordinator/mocks/vrf_beacon.go index 827b5ae9836..278fe573439 100644 --- a/core/services/ocr2/plugins/ocr2vrf/coordinator/mocks/vrf_beacon.go +++ b/core/services/ocr2/plugins/ocr2vrf/coordinator/mocks/vrf_beacon.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. package mocks diff --git a/core/services/ocr2/plugins/ocr2vrf/coordinator/mocks/vrf_beacon_coordinator.go b/core/services/ocr2/plugins/ocr2vrf/coordinator/mocks/vrf_beacon_coordinator.go index c0f85d67e06..d62a08f6a86 100644 --- a/core/services/ocr2/plugins/ocr2vrf/coordinator/mocks/vrf_beacon_coordinator.go +++ b/core/services/ocr2/plugins/ocr2vrf/coordinator/mocks/vrf_beacon_coordinator.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. package mocks diff --git a/core/services/ocr2/plugins/ocr2vrf/coordinator/mocks/vrf_coordinator.go b/core/services/ocr2/plugins/ocr2vrf/coordinator/mocks/vrf_coordinator.go index f59d048febe..7dddf15a322 100644 --- a/core/services/ocr2/plugins/ocr2vrf/coordinator/mocks/vrf_coordinator.go +++ b/core/services/ocr2/plugins/ocr2vrf/coordinator/mocks/vrf_coordinator.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. package mocks diff --git a/core/services/ocr2/plugins/promwrapper/mocks/prometheus_backend.go b/core/services/ocr2/plugins/promwrapper/mocks/prometheus_backend.go index 418cb276011..4e4b912c75b 100644 --- a/core/services/ocr2/plugins/promwrapper/mocks/prometheus_backend.go +++ b/core/services/ocr2/plugins/promwrapper/mocks/prometheus_backend.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. package mocks diff --git a/core/services/ocr2/plugins/threshold/mocks/decryptor.go b/core/services/ocr2/plugins/threshold/mocks/decryptor.go index 5496483c9dd..daabd6d7de9 100644 --- a/core/services/ocr2/plugins/threshold/mocks/decryptor.go +++ b/core/services/ocr2/plugins/threshold/mocks/decryptor.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. package mocks diff --git a/core/services/ocr2/validate/config.go b/core/services/ocr2/validate/config.go index 0084a18308b..d22bd781d19 100644 --- a/core/services/ocr2/validate/config.go +++ b/core/services/ocr2/validate/config.go @@ -7,9 +7,9 @@ import ( "github.com/smartcontractkit/libocr/offchainreporting2plus/types" + commontypes "github.com/smartcontractkit/chainlink-common/pkg/types" "github.com/smartcontractkit/chainlink/v2/core/config/env" "github.com/smartcontractkit/chainlink/v2/core/services/job" - "github.com/smartcontractkit/chainlink/v2/core/services/relay" ) // OCR2Config contains OCR2 configurations for a job. @@ -19,6 +19,8 @@ type OCR2Config interface { ContractPollInterval() time.Duration ContractTransmitterTransmitTimeout() time.Duration DatabaseTimeout() time.Duration + DefaultTransactionQueueDepth() uint32 + SimulateTransactions() bool TraceLogging() bool } @@ -49,7 +51,7 @@ func ToLocalConfig(ocr2Config OCR2Config, insConf InsecureConfig, spec job.OCR2O ContractTransmitterTransmitTimeout: ocr2Config.ContractTransmitterTransmitTimeout(), DatabaseTimeout: ocr2Config.DatabaseTimeout(), } - if spec.Relay == relay.Solana && env.MedianPlugin.Cmd.Get() != "" { + if spec.Relay == commontypes.NetworkSolana && env.MedianPlugin.Cmd.Get() != "" { // Work around for Solana Feeds configured with zero values to support LOOP Plugins. minOCR2MaxDurationQuery, err := getMinOCR2MaxDurationQuery() if err != nil { diff --git a/core/services/ocr2/validate/validate.go b/core/services/ocr2/validate/validate.go index 19c8043f25b..59f7053de56 100644 --- a/core/services/ocr2/validate/validate.go +++ b/core/services/ocr2/validate/validate.go @@ -23,7 +23,6 @@ import ( mercuryconfig "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/mercury/config" ocr2vrfconfig "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ocr2vrf/config" "github.com/smartcontractkit/chainlink/v2/core/services/ocrcommon" - "github.com/smartcontractkit/chainlink/v2/core/services/relay" "github.com/smartcontractkit/chainlink/v2/plugins" ) @@ -54,7 +53,7 @@ func ValidatedOracleSpecToml(ctx context.Context, config OCR2Config, insConf Ins if jb.Type != job.OffchainReporting2 { return jb, pkgerrors.Errorf("the only supported type is currently 'offchainreporting2', got %s", jb.Type) } - if _, ok := relay.SupportedRelays[spec.Relay]; !ok { + if _, ok := types.SupportedRelays[spec.Relay]; !ok { return jb, pkgerrors.Errorf("no such relay %v supported", spec.Relay) } if len(spec.P2PV2Bootstrappers) > 0 { diff --git a/core/services/ocrbootstrap/delegate.go b/core/services/ocrbootstrap/delegate.go index 2d87cf80346..84f473088bb 100644 --- a/core/services/ocrbootstrap/delegate.go +++ b/core/services/ocrbootstrap/delegate.go @@ -19,11 +19,10 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/services/job" "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/validate" "github.com/smartcontractkit/chainlink/v2/core/services/ocrcommon" - "github.com/smartcontractkit/chainlink/v2/core/services/relay" ) type RelayGetter interface { - Get(relay.ID) (loop.Relayer, error) + Get(types.RelayID) (loop.Relayer, error) } // Delegate creates Bootstrap jobs @@ -101,6 +100,7 @@ func (d *Delegate) ServicesForSpec(ctx context.Context, jb job.Job) (services [] if spec.FeedID != nil { spec.RelayConfig["feedID"] = *spec.FeedID } + spec.RelayConfig.ApplyDefaultsOCR2(d.ocr2Cfg) ctxVals := loop.ContextValues{ JobID: jb.ID, diff --git a/core/services/ocrcommon/data_source.go b/core/services/ocrcommon/data_source.go index f07cfc0ab7a..9ca111dea68 100644 --- a/core/services/ocrcommon/data_source.go +++ b/core/services/ocrcommon/data_source.go @@ -3,7 +3,6 @@ package ocrcommon import ( "context" "encoding/json" - errjoin "errors" "fmt" "math/big" "sync" @@ -294,31 +293,30 @@ func (ds *inMemoryDataSourceCache) updateCache(ctx context.Context) error { ds.mu.Lock() defer ds.mu.Unlock() - // check for any errors - _, latestTrrs, latestUpdateErr := ds.executeRun(ctx) - if latestTrrs.FinalResult(ds.lggr).HasErrors() { - latestUpdateErr = errjoin.Join(append(latestTrrs.FinalResult(ds.lggr).AllErrors, latestUpdateErr)...) - } - - if latestUpdateErr != nil { + _, latestTrrs, err := ds.executeRun(ctx) + if err != nil { previousUpdateErr := ds.latestUpdateErr - ds.latestUpdateErr = latestUpdateErr - // raise log severity + ds.latestUpdateErr = err + // warn log if previous cache update also errored if previousUpdateErr != nil { ds.lggr.Warnf("consecutive cache updates errored: previous err: %v new err: %v", previousUpdateErr, ds.latestUpdateErr) } - return errors.Wrapf(ds.latestUpdateErr, "error executing run for spec ID %v", ds.spec.ID) + + return errors.Wrapf(ds.latestUpdateErr, "error updating in memory data source cache for spec ID %v", ds.spec.ID) } - ds.latestTrrs = latestTrrs - ds.latestResult = ds.latestTrrs.FinalResult(ds.lggr) - value, err := ds.inMemoryDataSource.parse(ds.latestResult) + value, err := ds.inMemoryDataSource.parse(latestTrrs.FinalResult(ds.lggr)) if err != nil { - return errors.Wrapf(err, "invalid result") + ds.latestUpdateErr = errors.Wrapf(err, "invalid result") + return ds.latestUpdateErr } - // backup in case data source fails continuously and node gets rebooted + // update cache values + ds.latestTrrs = latestTrrs + ds.latestResult = ds.latestTrrs.FinalResult(ds.lggr) + ds.latestUpdateErr = nil + // backup in case data source fails continuously and node gets rebooted timePairBytes, err := json.Marshal(&ResultTimePair{Result: *serializablebig.New(value), Time: time.Now()}) if err != nil { return fmt.Errorf("failed to marshal result time pair, err: %w", err) @@ -341,7 +339,7 @@ func (ds *inMemoryDataSourceCache) get(ctx context.Context) (pipeline.FinalResul ds.mu.RUnlock() if err := ds.updateCache(ctx); err != nil { - ds.lggr.Warnf("failed to update cache err: %v, returning stale result now, err: %v", err) + ds.lggr.Warnf("failed to update cache, returning stale result now, err: %v", err) } ds.mu.RLock() @@ -357,15 +355,15 @@ func (ds *inMemoryDataSourceCache) Observe(ctx context.Context, timestamp ocr2ty timePairBytes, err := ds.kvStore.Get(ctx, dataSourceCacheKey) if err != nil { - return nil, fmt.Errorf("failed to get result time pair bytes, err: %w", err) + return nil, fmt.Errorf("in memory data source cache is empty and failed to get backup persisted value, err: %w", err) } - if err := json.Unmarshal(timePairBytes, &resTime); err != nil { - return nil, fmt.Errorf("failed to unmarshal result time pair bytes, err: %w", err) + if err = json.Unmarshal(timePairBytes, &resTime); err != nil { + return nil, fmt.Errorf("in memory data source cache is empty and failed to unmarshal backup persisted value, err: %w", err) } if time.Since(resTime.Time) >= ds.stalenessAlertThreshold { - ds.lggr.Errorf("cache hasn't been updated for over %v, latestUpdateErr is: %v", ds.stalenessAlertThreshold, ds.latestUpdateErr) + ds.lggr.Errorf("in memory data source cache is empty and the persisted value hasn't been updated for over %v, latestUpdateErr is: %v", ds.stalenessAlertThreshold, ds.latestUpdateErr) } return resTime.Result.ToInt(), nil } @@ -376,6 +374,13 @@ func (ds *inMemoryDataSourceCache) Observe(ctx context.Context, timestamp ocr2ty ConfigDigest: timestamp.ConfigDigest.Hex(), }) + // if last update was unsuccessful, check how much time passed since a successful update + if ds.latestUpdateErr != nil { + if time.Since(ds.latestTrrs.GetTaskRunResultsFinishedAt()) >= ds.stalenessAlertThreshold { + ds.lggr.Errorf("in memory cache is old and hasn't been updated for over %v, latestUpdateErr is: %v", ds.stalenessAlertThreshold, ds.latestUpdateErr) + } + + } return ds.parse(latestResult) } diff --git a/core/services/p2p/types/mocks/peer.go b/core/services/p2p/types/mocks/peer.go index 23824b99a44..3a2e218c170 100644 --- a/core/services/p2p/types/mocks/peer.go +++ b/core/services/p2p/types/mocks/peer.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. package mocks diff --git a/core/services/p2p/types/mocks/peer_wrapper.go b/core/services/p2p/types/mocks/peer_wrapper.go index 02347cf6b86..cd20dc7ad94 100644 --- a/core/services/p2p/types/mocks/peer_wrapper.go +++ b/core/services/p2p/types/mocks/peer_wrapper.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. package mocks diff --git a/core/services/p2p/types/mocks/signer.go b/core/services/p2p/types/mocks/signer.go index 274116be57c..baacbef07bd 100644 --- a/core/services/p2p/types/mocks/signer.go +++ b/core/services/p2p/types/mocks/signer.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. package mocks diff --git a/core/services/pipeline/common.go b/core/services/pipeline/common.go index a88b2165a2e..a0fc28c6862 100644 --- a/core/services/pipeline/common.go +++ b/core/services/pipeline/common.go @@ -217,6 +217,17 @@ func (result *TaskRunResult) IsTerminal() bool { // TaskRunResults represents a collection of results for all task runs for one pipeline run type TaskRunResults []TaskRunResult +// GetTaskRunResultsFinishedAt returns latest finishedAt time from TaskRunResults. +func (trrs TaskRunResults) GetTaskRunResultsFinishedAt() time.Time { + var finishedTime time.Time + for _, trr := range trrs { + if trr.FinishedAt.Valid && trr.FinishedAt.Time.After(finishedTime) { + finishedTime = trr.FinishedAt.Time + } + } + return finishedTime +} + // FinalResult pulls the FinalResult for the pipeline_run from the task runs // It needs to respect the output index of each task func (trrs TaskRunResults) FinalResult(l logger.Logger) FinalResult { diff --git a/core/services/pipeline/mocks/config.go b/core/services/pipeline/mocks/config.go index b29a3cc9e11..1c9213443fa 100644 --- a/core/services/pipeline/mocks/config.go +++ b/core/services/pipeline/mocks/config.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. package mocks diff --git a/core/services/pipeline/mocks/orm.go b/core/services/pipeline/mocks/orm.go index fe9aa2823a4..2fa6d8681e8 100644 --- a/core/services/pipeline/mocks/orm.go +++ b/core/services/pipeline/mocks/orm.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. package mocks diff --git a/core/services/pipeline/mocks/pipeline_param_unmarshaler.go b/core/services/pipeline/mocks/pipeline_param_unmarshaler.go index 40f2ba4dd32..dcc15bf6fc2 100644 --- a/core/services/pipeline/mocks/pipeline_param_unmarshaler.go +++ b/core/services/pipeline/mocks/pipeline_param_unmarshaler.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. package mocks diff --git a/core/services/pipeline/mocks/runner.go b/core/services/pipeline/mocks/runner.go index e0378399f58..88d71c76c3a 100644 --- a/core/services/pipeline/mocks/runner.go +++ b/core/services/pipeline/mocks/runner.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. package mocks diff --git a/core/services/promreporter/prom_reporter_test.go b/core/services/promreporter/prom_reporter_test.go index 635b5b83c47..bb09b86df95 100644 --- a/core/services/promreporter/prom_reporter_test.go +++ b/core/services/promreporter/prom_reporter_test.go @@ -53,6 +53,7 @@ func newLegacyChainContainer(t *testing.T, db *sqlx.DB) legacyevm.LegacyChainCon evmConfig, evmConfig.GasEstimator(), evmConfig.Transactions(), + nil, dbConfig, dbConfig.Listener(), ethClient, diff --git a/core/services/relay/evm/evm.go b/core/services/relay/evm/evm.go index 4f31110fda1..e9aaa7e0a8e 100644 --- a/core/services/relay/evm/evm.go +++ b/core/services/relay/evm/evm.go @@ -520,11 +520,10 @@ func newOnChainContractTransmitter(ctx context.Context, lggr logger.Logger, rarg if opts.subjectID != nil { subject = *opts.subjectID } - scoped := configWatcher.chain.Config() - strategy := txmgrcommon.NewQueueingTxStrategy(subject, scoped.OCR2().DefaultTransactionQueueDepth()) + strategy := txmgrcommon.NewQueueingTxStrategy(subject, relayConfig.DefaultTransactionQueueDepth) var checker txm.TransmitCheckerSpec - if configWatcher.chain.Config().OCR2().SimulateTransactions() { + if relayConfig.SimulateTransactions { checker.CheckerType = txm.TransmitCheckerTypeSimulate } diff --git a/core/services/relay/evm/functions.go b/core/services/relay/evm/functions.go index 9444ab4164d..f10874da149 100644 --- a/core/services/relay/evm/functions.go +++ b/core/services/relay/evm/functions.go @@ -182,11 +182,10 @@ func newFunctionsContractTransmitter(ctx context.Context, contractVersion uint32 fromAddresses = append(fromAddresses, common.HexToAddress(s)) } - scoped := configWatcher.chain.Config() - strategy := txmgrcommon.NewQueueingTxStrategy(rargs.ExternalJobID, scoped.OCR2().DefaultTransactionQueueDepth()) + strategy := txmgrcommon.NewQueueingTxStrategy(rargs.ExternalJobID, relayConfig.DefaultTransactionQueueDepth) var checker txm.TransmitCheckerSpec - if configWatcher.chain.Config().OCR2().SimulateTransactions() { + if relayConfig.SimulateTransactions { checker.CheckerType = txm.TransmitCheckerTypeSimulate } diff --git a/core/services/relay/evm/mercury/mocks/async_deleter.go b/core/services/relay/evm/mercury/mocks/async_deleter.go index b706e9c771e..6a43c1a0568 100644 --- a/core/services/relay/evm/mercury/mocks/async_deleter.go +++ b/core/services/relay/evm/mercury/mocks/async_deleter.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. package mocks diff --git a/core/services/relay/evm/mocks/loop_relay_adapter.go b/core/services/relay/evm/mocks/loop_relay_adapter.go index 5e7335af06d..9b2fed8423a 100644 --- a/core/services/relay/evm/mocks/loop_relay_adapter.go +++ b/core/services/relay/evm/mocks/loop_relay_adapter.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. package mocks diff --git a/core/services/relay/evm/mocks/request_round_db.go b/core/services/relay/evm/mocks/request_round_db.go index 4168ba4a1b0..d1aa15a3b5b 100644 --- a/core/services/relay/evm/mocks/request_round_db.go +++ b/core/services/relay/evm/mocks/request_round_db.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. package mocks diff --git a/core/services/relay/evm/request_round_tracker_test.go b/core/services/relay/evm/request_round_tracker_test.go index 3421004ccf5..6af6c593a2b 100644 --- a/core/services/relay/evm/request_round_tracker_test.go +++ b/core/services/relay/evm/request_round_tracker_test.go @@ -17,7 +17,6 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" htmocks "github.com/smartcontractkit/chainlink/v2/common/headtracker/mocks" evmclimocks "github.com/smartcontractkit/chainlink/v2/core/chains/evm/client/mocks" - evmconfig "github.com/smartcontractkit/chainlink/v2/core/chains/evm/config" logmocks "github.com/smartcontractkit/chainlink/v2/core/chains/evm/log/mocks" evmtypes "github.com/smartcontractkit/chainlink/v2/core/chains/evm/types" "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" @@ -53,13 +52,10 @@ type contractTrackerUni struct { } func newContractTrackerUni(t *testing.T, opts ...interface{}) (uni contractTrackerUni) { - var chain evmconfig.ChainScopedConfig var filterer *ocr2aggregator.OCR2AggregatorFilterer var contract *offchain_aggregator_wrapper.OffchainAggregator for _, opt := range opts { switch v := opt.(type) { - case evmconfig.ChainScopedConfig: - chain = v case *ocr2aggregator.OCR2AggregatorFilterer: filterer = v case *offchain_aggregator_wrapper.OffchainAggregator: @@ -68,9 +64,8 @@ func newContractTrackerUni(t *testing.T, opts ...interface{}) (uni contractTrack t.Fatalf("unrecognised option type %T", v) } } - if chain == nil { - chain = evmtest.NewChainScopedConfig(t, configtest.NewTestGeneralConfig(t)) - } + config := configtest.NewTestGeneralConfig(t) + chain := evmtest.NewChainScopedConfig(t, config) if filterer == nil { filterer = mustNewFilterer(t, testutils.NewAddress()) } diff --git a/core/services/relay/evm/types/mocks/log_poller_wrapper.go b/core/services/relay/evm/types/mocks/log_poller_wrapper.go index 8017e983e53..46a0b08d0c3 100644 --- a/core/services/relay/evm/types/mocks/log_poller_wrapper.go +++ b/core/services/relay/evm/types/mocks/log_poller_wrapper.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. package mocks diff --git a/core/services/relay/evm/types/types.go b/core/services/relay/evm/types/types.go index ea794262bd4..26e1c6f7128 100644 --- a/core/services/relay/evm/types/types.go +++ b/core/services/relay/evm/types/types.go @@ -113,6 +113,9 @@ type RelayConfig struct { ChainReader *ChainReaderConfig `json:"chainReader"` Codec *CodecConfig `json:"codec"` + DefaultTransactionQueueDepth uint32 `json:"defaultTransactionQueueDepth"` + SimulateTransactions bool `json:"simulateTransactions"` + // Contract-specific SendingKeys pq.StringArray `json:"sendingKeys"` diff --git a/core/services/relay/relay.go b/core/services/relay/relay.go index db8cb03d431..b4cc4517390 100644 --- a/core/services/relay/relay.go +++ b/core/services/relay/relay.go @@ -3,73 +3,11 @@ package relay import ( "context" "fmt" - "regexp" "github.com/smartcontractkit/chainlink-common/pkg/loop" "github.com/smartcontractkit/chainlink-common/pkg/types" ) -type Network = string -type ChainID = string - -const ( - EVM = "evm" - Cosmos = "cosmos" - Solana = "solana" - StarkNet = "starknet" -) - -var SupportedRelays = map[Network]struct{}{ - EVM: {}, - Cosmos: {}, - Solana: {}, - StarkNet: {}, -} - -// ID uniquely identifies a relayer by network and chain id -type ID struct { - Network Network - ChainID ChainID -} - -func (i *ID) Name() string { - return fmt.Sprintf("%s.%s", i.Network, i.ChainID) -} - -func (i *ID) String() string { - return i.Name() -} -func NewID(n Network, c ChainID) ID { - return ID{Network: n, ChainID: c} -} - -var idRegex = regexp.MustCompile( - fmt.Sprintf("^((%s)|(%s)|(%s)|(%s))\\.", EVM, Cosmos, Solana, StarkNet), -) - -func (i *ID) UnmarshalString(s string) error { - idxs := idRegex.FindStringIndex(s) - if idxs == nil { - return fmt.Errorf("error unmarshaling Identifier. %q does not match expected pattern", s) - } - // ignore the `.` in the match by dropping last rune - network := s[idxs[0] : idxs[1]-1] - chainID := s[idxs[1]:] - newID := &ID{ChainID: chainID} - for n := range SupportedRelays { - if network == n { - newID.Network = n - break - } - } - if newID.Network == "" { - return fmt.Errorf("error unmarshaling identifier: did not find network in supported list %q", network) - } - i.ChainID = newID.ChainID - i.Network = newID.Network - return nil -} - // ServerAdapter extends [loop.RelayerAdapter] by overriding NewPluginProvider to dispatches calls according to `RelayArgs.ProviderType`. // This should only be used to adapt relayers not running via GRPC in a LOOPP. type ServerAdapter struct { diff --git a/core/services/relay/relay_test.go b/core/services/relay/relay_test.go index dc12b769609..c0b2248ed1a 100644 --- a/core/services/relay/relay_test.go +++ b/core/services/relay/relay_test.go @@ -15,53 +15,6 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" ) -func TestIdentifier_UnmarshalString(t *testing.T) { - type fields struct { - Network Network - ChainID ChainID - } - type args struct { - s string - } - tests := []struct { - name string - want fields - args args - wantErr bool - }{ - {name: "evm", - args: args{s: "evm.1"}, - wantErr: false, - want: fields{Network: EVM, ChainID: "1"}, - }, - {name: "bad network", - args: args{s: "notANetwork.1"}, - wantErr: true, - }, - {name: "bad pattern", - args: args{s: "evm_1"}, - wantErr: true, - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - i := &ID{} - err := i.UnmarshalString(tt.args.s) - if (err != nil) != tt.wantErr { - t.Errorf("Identifier.UnmarshalString() error = %v, wantErr %v", err, tt.wantErr) - } - assert.Equal(t, tt.want.Network, i.Network) - assert.Equal(t, tt.want.ChainID, i.ChainID) - }) - } -} - -func TestNewID(t *testing.T) { - rid := NewID(EVM, "chain id") - assert.Equal(t, EVM, rid.Network) - assert.Equal(t, "chain id", rid.ChainID) -} - type staticMedianProvider struct { } diff --git a/core/services/s4/mocks/orm.go b/core/services/s4/mocks/orm.go index 4a5d7fa992d..f616623eb89 100644 --- a/core/services/s4/mocks/orm.go +++ b/core/services/s4/mocks/orm.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. package mocks diff --git a/core/services/s4/mocks/storage.go b/core/services/s4/mocks/storage.go index 06fc153a358..5971b9f1ece 100644 --- a/core/services/s4/mocks/storage.go +++ b/core/services/s4/mocks/storage.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. package mocks diff --git a/core/services/synchronization/mocks/telemetry_service.go b/core/services/synchronization/mocks/telemetry_service.go index 375b46ad7bb..b705d49aecd 100644 --- a/core/services/synchronization/mocks/telemetry_service.go +++ b/core/services/synchronization/mocks/telemetry_service.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. package mocks diff --git a/core/services/vrf/delegate_test.go b/core/services/vrf/delegate_test.go index 6df91cef717..a3962977257 100644 --- a/core/services/vrf/delegate_test.go +++ b/core/services/vrf/delegate_test.go @@ -83,7 +83,7 @@ func buildVrfUni(t *testing.T, db *sqlx.DB, cfg chainlink.GeneralConfig) vrfUniv btORM := bridges.NewORM(db) ks := keystore.NewInMemory(db, utils.FastScryptParams, lggr) _, dbConfig, evmConfig := txmgr.MakeTestConfigs(t) - txm, err := txmgr.NewTxm(db, db, evmConfig, evmConfig.GasEstimator(), evmConfig.Transactions(), dbConfig, dbConfig.Listener(), ec, logger.TestLogger(t), nil, ks.Eth(), nil) + txm, err := txmgr.NewTxm(db, db, evmConfig, evmConfig.GasEstimator(), evmConfig.Transactions(), nil, dbConfig, dbConfig.Listener(), ec, logger.TestLogger(t), nil, ks.Eth(), nil) orm := headtracker.NewORM(*testutils.FixtureChainID, db) require.NoError(t, orm.IdempotentInsertHead(testutils.Context(t), cltest.Head(51))) jrm := job.NewORM(db, prm, btORM, ks, lggr, cfg.Database()) diff --git a/core/services/vrf/mocks/aggregator_v3_interface.go b/core/services/vrf/mocks/aggregator_v3_interface.go index 46ca11aa200..65351354d7a 100644 --- a/core/services/vrf/mocks/aggregator_v3_interface.go +++ b/core/services/vrf/mocks/aggregator_v3_interface.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. package mocks diff --git a/core/services/vrf/mocks/config.go b/core/services/vrf/mocks/config.go index b46a28ec037..3685e17b0ff 100644 --- a/core/services/vrf/mocks/config.go +++ b/core/services/vrf/mocks/config.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. package mocks diff --git a/core/services/vrf/mocks/fee_config.go b/core/services/vrf/mocks/fee_config.go index ee7ea4e9a58..0d62898862b 100644 --- a/core/services/vrf/mocks/fee_config.go +++ b/core/services/vrf/mocks/fee_config.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. package mocks diff --git a/core/services/vrf/mocks/vrf_coordinator_v2.go b/core/services/vrf/mocks/vrf_coordinator_v2.go index 529bc789257..e8c1467e44f 100644 --- a/core/services/vrf/mocks/vrf_coordinator_v2.go +++ b/core/services/vrf/mocks/vrf_coordinator_v2.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. package mocks diff --git a/core/services/webhook/mocks/external_initiator_manager.go b/core/services/webhook/mocks/external_initiator_manager.go index 010b6f8db0a..9711ae686ea 100644 --- a/core/services/webhook/mocks/external_initiator_manager.go +++ b/core/services/webhook/mocks/external_initiator_manager.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. package mocks diff --git a/core/services/webhook/mocks/http_client.go b/core/services/webhook/mocks/http_client.go index fa4f597dc4f..27167f235c3 100644 --- a/core/services/webhook/mocks/http_client.go +++ b/core/services/webhook/mocks/http_client.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. package mocks diff --git a/core/services/workflows/delegate.go b/core/services/workflows/delegate.go index ed7d266131a..e22a78212d2 100644 --- a/core/services/workflows/delegate.go +++ b/core/services/workflows/delegate.go @@ -7,7 +7,7 @@ import ( "github.com/google/uuid" "github.com/pelletier/go-toml" - "github.com/smartcontractkit/chainlink-common/pkg/types" + "github.com/smartcontractkit/chainlink-common/pkg/types/core" "github.com/smartcontractkit/chainlink/v2/core/capabilities/targets" "github.com/smartcontractkit/chainlink/v2/core/chains/legacyevm" "github.com/smartcontractkit/chainlink/v2/core/logger" @@ -15,7 +15,7 @@ import ( ) type Delegate struct { - registry types.CapabilitiesRegistry + registry core.CapabilitiesRegistry logger logger.Logger legacyEVMChains legacyevm.LegacyChainContainer } @@ -55,7 +55,7 @@ func (d *Delegate) ServicesForSpec(ctx context.Context, spec job.Job) ([]job.Ser return []job.ServiceCtx{engine}, nil } -func NewDelegate(logger logger.Logger, registry types.CapabilitiesRegistry, legacyEVMChains legacyevm.LegacyChainContainer) *Delegate { +func NewDelegate(logger logger.Logger, registry core.CapabilitiesRegistry, legacyEVMChains legacyevm.LegacyChainContainer) *Delegate { return &Delegate{logger: logger, registry: registry, legacyEVMChains: legacyEVMChains} } diff --git a/core/services/workflows/engine.go b/core/services/workflows/engine.go index 4694ca4286f..052c2c86647 100644 --- a/core/services/workflows/engine.go +++ b/core/services/workflows/engine.go @@ -10,7 +10,7 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/capabilities" "github.com/smartcontractkit/chainlink-common/pkg/services" - "github.com/smartcontractkit/chainlink-common/pkg/types" + "github.com/smartcontractkit/chainlink-common/pkg/types/core" "github.com/smartcontractkit/chainlink-common/pkg/values" "github.com/smartcontractkit/chainlink/v2/core/logger" ) @@ -25,7 +25,7 @@ const ( type Engine struct { services.StateMachine logger logger.Logger - registry types.CapabilitiesRegistry + registry core.CapabilitiesRegistry workflow *workflow executionStates *inMemoryStore pendingStepRequests chan stepRequest @@ -591,7 +591,7 @@ type Config struct { Spec string WorkflowID string Lggr logger.Logger - Registry types.CapabilitiesRegistry + Registry core.CapabilitiesRegistry MaxWorkerLimit int QueueSize int NewWorkerTimeout time.Duration diff --git a/core/sessions/ldapauth/mocks/ldap_client.go b/core/sessions/ldapauth/mocks/ldap_client.go index 63021636018..d8fe4dbadfc 100644 --- a/core/sessions/ldapauth/mocks/ldap_client.go +++ b/core/sessions/ldapauth/mocks/ldap_client.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. package mocks diff --git a/core/sessions/ldapauth/mocks/ldap_conn.go b/core/sessions/ldapauth/mocks/ldap_conn.go index 8b4fff82047..3116320cd99 100644 --- a/core/sessions/ldapauth/mocks/ldap_conn.go +++ b/core/sessions/ldapauth/mocks/ldap_conn.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. package mocks diff --git a/core/sessions/mocks/authentication_provider.go b/core/sessions/mocks/authentication_provider.go index 82be3a578d0..3031a7c9809 100644 --- a/core/sessions/mocks/authentication_provider.go +++ b/core/sessions/mocks/authentication_provider.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. package mocks diff --git a/core/sessions/mocks/basic_admin_users_orm.go b/core/sessions/mocks/basic_admin_users_orm.go index dc9c40a62c0..b8376267c24 100644 --- a/core/sessions/mocks/basic_admin_users_orm.go +++ b/core/sessions/mocks/basic_admin_users_orm.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. +// Code generated by mockery v2.42.2. DO NOT EDIT. package mocks diff --git a/core/store/migrate/migrate_test.go b/core/store/migrate/migrate_test.go index b3a15123efa..3c0c2dc2158 100644 --- a/core/store/migrate/migrate_test.go +++ b/core/store/migrate/migrate_test.go @@ -27,7 +27,6 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/services/job" "github.com/smartcontractkit/chainlink/v2/core/services/pg" "github.com/smartcontractkit/chainlink/v2/core/services/pipeline" - "github.com/smartcontractkit/chainlink/v2/core/services/relay" "github.com/smartcontractkit/chainlink/v2/core/store/migrate" "github.com/smartcontractkit/chainlink/v2/core/store/models" ) @@ -37,7 +36,7 @@ var migrationDir = "migrations" type OffchainReporting2OracleSpec100 struct { ID int32 `toml:"-"` ContractID string `toml:"contractID"` - Relay relay.Network `toml:"relay"` + Relay string `toml:"relay"` // RelayID.Network RelayConfig job.JSONConfig `toml:"relayConfig"` P2PBootstrapPeers pq.StringArray `toml:"p2pBootstrapPeers"` OCRKeyBundleID null.String `toml:"ocrKeyBundleID"` diff --git a/core/web/chains_controller.go b/core/web/chains_controller.go index 61c8d1dc84d..bcaaf909540 100644 --- a/core/web/chains_controller.go +++ b/core/web/chains_controller.go @@ -12,7 +12,6 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/logger" "github.com/smartcontractkit/chainlink/v2/core/logger/audit" "github.com/smartcontractkit/chainlink/v2/core/services/chainlink" - "github.com/smartcontractkit/chainlink/v2/core/services/relay" ) type ChainsController interface { @@ -23,7 +22,7 @@ type ChainsController interface { } type chainsController[R jsonapi.EntityNamer] struct { - network relay.Network + network string resourceName string chainStats chainlink.ChainStatuser errNotEnabled error @@ -41,7 +40,7 @@ func (e errChainDisabled) Error() string { return fmt.Sprintf("%s is disabled: Set %s=true to enable", e.name, e.tomlKey) } -func newChainsController[R jsonapi.EntityNamer](network relay.Network, chainStats chainlink.ChainsNodesStatuser, errNotEnabled error, +func newChainsController[R jsonapi.EntityNamer](network string, chainStats chainlink.ChainsNodesStatuser, errNotEnabled error, newResource func(types.ChainStatus) R, lggr logger.Logger, auditLogger audit.AuditLogger) *chainsController[R] { return &chainsController[R]{ network: network, @@ -79,7 +78,7 @@ func (cc *chainsController[R]) Show(c *gin.Context) { jsonAPIError(c, http.StatusBadRequest, cc.errNotEnabled) return } - relayID := relay.ID{Network: cc.network, ChainID: c.Param("ID")} + relayID := types.RelayID{Network: cc.network, ChainID: c.Param("ID")} chain, err := cc.chainStats.ChainStatus(c, relayID) if err != nil { jsonAPIError(c, http.StatusBadRequest, err) diff --git a/core/web/cosmos_chains_controller.go b/core/web/cosmos_chains_controller.go index 20a0738c5eb..56ae007128f 100644 --- a/core/web/cosmos_chains_controller.go +++ b/core/web/cosmos_chains_controller.go @@ -1,15 +1,15 @@ package web import ( + "github.com/smartcontractkit/chainlink-common/pkg/types" "github.com/smartcontractkit/chainlink/v2/core/services/chainlink" - "github.com/smartcontractkit/chainlink/v2/core/services/relay" "github.com/smartcontractkit/chainlink/v2/core/web/presenters" ) func NewCosmosChainsController(app chainlink.Application) ChainsController { return newChainsController[presenters.CosmosChainResource]( - relay.Cosmos, - app.GetRelayers().List(chainlink.FilterRelayersByType(relay.Cosmos)), + types.NetworkCosmos, + app.GetRelayers().List(chainlink.FilterRelayersByType(types.NetworkCosmos)), ErrCosmosNotEnabled, presenters.NewCosmosChainResource, app.GetLogger(), diff --git a/core/web/cosmos_nodes_controller.go b/core/web/cosmos_nodes_controller.go index 121d7d8422b..c384c10247f 100644 --- a/core/web/cosmos_nodes_controller.go +++ b/core/web/cosmos_nodes_controller.go @@ -1,8 +1,8 @@ package web import ( + "github.com/smartcontractkit/chainlink-common/pkg/types" "github.com/smartcontractkit/chainlink/v2/core/services/chainlink" - "github.com/smartcontractkit/chainlink/v2/core/services/relay" "github.com/smartcontractkit/chainlink/v2/core/web/presenters" ) @@ -10,7 +10,7 @@ import ( var ErrCosmosNotEnabled = errChainDisabled{name: "Cosmos", tomlKey: "Cosmos.Enabled"} func NewCosmosNodesController(app chainlink.Application) NodesController { - scopedNodeStatuser := NewNetworkScopedNodeStatuser(app.GetRelayers(), relay.Cosmos) + scopedNodeStatuser := NewNetworkScopedNodeStatuser(app.GetRelayers(), types.NetworkCosmos) return newNodesController[presenters.CosmosNodeResource]( scopedNodeStatuser, ErrCosmosNotEnabled, presenters.NewCosmosNodeResource, app.GetAuditLogger(), diff --git a/core/web/cosmos_transfer_controller.go b/core/web/cosmos_transfer_controller.go index 9b958346642..d0de1fd727e 100644 --- a/core/web/cosmos_transfer_controller.go +++ b/core/web/cosmos_transfer_controller.go @@ -10,10 +10,10 @@ import ( "github.com/google/uuid" "github.com/pkg/errors" + "github.com/smartcontractkit/chainlink-common/pkg/types" coscfg "github.com/smartcontractkit/chainlink-cosmos/pkg/cosmos/config" "github.com/smartcontractkit/chainlink-cosmos/pkg/cosmos/db" "github.com/smartcontractkit/chainlink-cosmos/pkg/cosmos/denom" - "github.com/smartcontractkit/chainlink/v2/core/services/relay" "github.com/smartcontractkit/chainlink/v2/core/logger/audit" "github.com/smartcontractkit/chainlink/v2/core/services/chainlink" @@ -28,7 +28,7 @@ type CosmosTransfersController struct { // Create sends native coins from the Chainlink's account to a specified address. func (tc *CosmosTransfersController) Create(c *gin.Context) { - relayers := tc.App.GetRelayers().List(chainlink.FilterRelayersByType(relay.Cosmos)) + relayers := tc.App.GetRelayers().List(chainlink.FilterRelayersByType(types.NetworkCosmos)) if relayers == nil { jsonAPIError(c, http.StatusBadRequest, ErrSolanaNotEnabled) return @@ -48,7 +48,7 @@ func (tc *CosmosTransfersController) Create(c *gin.Context) { return } - relayerID := relay.ID{Network: relay.Cosmos, ChainID: tr.CosmosChainID} + relayerID := types.RelayID{Network: types.NetworkCosmos, ChainID: tr.CosmosChainID} relayer, err := relayers.Get(relayerID) if err != nil { if errors.Is(err, chainlink.ErrNoSuchRelayer) { diff --git a/core/web/evm_chains_controller.go b/core/web/evm_chains_controller.go index 45b4964c215..3d939a9f9bc 100644 --- a/core/web/evm_chains_controller.go +++ b/core/web/evm_chains_controller.go @@ -1,8 +1,8 @@ package web import ( + "github.com/smartcontractkit/chainlink-common/pkg/types" "github.com/smartcontractkit/chainlink/v2/core/services/chainlink" - "github.com/smartcontractkit/chainlink/v2/core/services/relay" "github.com/smartcontractkit/chainlink/v2/core/web/presenters" ) @@ -10,8 +10,8 @@ var ErrEVMNotEnabled = errChainDisabled{name: "EVM", tomlKey: "EVM.Enabled"} func NewEVMChainsController(app chainlink.Application) ChainsController { return newChainsController[presenters.EVMChainResource]( - relay.EVM, - app.GetRelayers().List(chainlink.FilterRelayersByType(relay.EVM)), + types.NetworkEVM, + app.GetRelayers().List(chainlink.FilterRelayersByType(types.NetworkEVM)), ErrEVMNotEnabled, presenters.NewEVMChainResource, app.GetLogger(), diff --git a/core/web/evm_nodes_controller.go b/core/web/evm_nodes_controller.go index c8d0b91c0f7..ba8e112c365 100644 --- a/core/web/evm_nodes_controller.go +++ b/core/web/evm_nodes_controller.go @@ -1,13 +1,13 @@ package web import ( + "github.com/smartcontractkit/chainlink-common/pkg/types" "github.com/smartcontractkit/chainlink/v2/core/services/chainlink" - "github.com/smartcontractkit/chainlink/v2/core/services/relay" "github.com/smartcontractkit/chainlink/v2/core/web/presenters" ) func NewEVMNodesController(app chainlink.Application) NodesController { - scopedNodeStatuser := NewNetworkScopedNodeStatuser(app.GetRelayers(), relay.EVM) + scopedNodeStatuser := NewNetworkScopedNodeStatuser(app.GetRelayers(), types.NetworkEVM) return newNodesController[presenters.EVMNodeResource]( scopedNodeStatuser, ErrEVMNotEnabled, presenters.NewEVMNodeResource, app.GetAuditLogger()) diff --git a/core/web/jobs_controller.go b/core/web/jobs_controller.go index 5226d7dd7d6..0808422cca7 100644 --- a/core/web/jobs_controller.go +++ b/core/web/jobs_controller.go @@ -222,7 +222,7 @@ func (jc *JobsController) validateJobSpec(ctx context.Context, tomlString string config := jc.App.GetConfig() switch jobType { case job.OffchainReporting: - jb, err = ocr.ValidatedOracleSpecToml(jc.App.GetRelayers().LegacyEVMChains(), tomlString) + jb, err = ocr.ValidatedOracleSpecToml(config, jc.App.GetRelayers().LegacyEVMChains(), tomlString) if !config.OCR().Enabled() { return jb, http.StatusNotImplemented, errors.New("The Offchain Reporting feature is disabled by configuration") } diff --git a/core/web/loader/chain.go b/core/web/loader/chain.go index 34ca4bd5f82..215c643f3c5 100644 --- a/core/web/loader/chain.go +++ b/core/web/loader/chain.go @@ -9,7 +9,6 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/types" "github.com/smartcontractkit/chainlink/v2/core/chains" "github.com/smartcontractkit/chainlink/v2/core/services/chainlink" - "github.com/smartcontractkit/chainlink/v2/core/services/relay" ) type chainBatcher struct { @@ -20,7 +19,7 @@ func (b *chainBatcher) loadByIDs(ctx context.Context, keys dataloader.Keys) []*d // Create a map for remembering the order of keys passed in keyOrder := make(map[string]int, len(keys)) // Collect the keys to search for - var chainIDs []relay.ChainID + var chainIDs []string for ix, key := range keys { chainIDs = append(chainIDs, key.String()) keyOrder[key.String()] = ix diff --git a/core/web/loader/node.go b/core/web/loader/node.go index 3d229813101..e67f1fd4d41 100644 --- a/core/web/loader/node.go +++ b/core/web/loader/node.go @@ -8,7 +8,6 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/types" "github.com/smartcontractkit/chainlink/v2/core/services/chainlink" - "github.com/smartcontractkit/chainlink/v2/core/services/relay" ) type nodeBatcher struct { @@ -20,10 +19,10 @@ func (b *nodeBatcher) loadByChainIDs(ctx context.Context, keys dataloader.Keys) keyOrder := make(map[string]int, len(keys)) // Collect the keys to search for // note backward compatibility -- this only ever supported evm chains - evmrelayIDs := make([]relay.ID, 0, len(keys)) + evmrelayIDs := make([]types.RelayID, 0, len(keys)) for ix, key := range keys { - rid := relay.ID{Network: relay.EVM, ChainID: key.String()} + rid := types.RelayID{Network: types.NetworkEVM, ChainID: key.String()} evmrelayIDs = append(evmrelayIDs, rid) keyOrder[key.String()] = ix } diff --git a/core/web/nodes_controller.go b/core/web/nodes_controller.go index 04c4693983f..bf5bb0e65e1 100644 --- a/core/web/nodes_controller.go +++ b/core/web/nodes_controller.go @@ -11,7 +11,6 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/logger/audit" "github.com/smartcontractkit/chainlink/v2/core/services/chainlink" - "github.com/smartcontractkit/chainlink/v2/core/services/relay" ) type NodesController interface { @@ -20,11 +19,11 @@ type NodesController interface { } type NetworkScopedNodeStatuser struct { - network relay.Network + network string relayers chainlink.RelayerChainInteroperators } -func NewNetworkScopedNodeStatuser(relayers chainlink.RelayerChainInteroperators, network relay.Network) *NetworkScopedNodeStatuser { +func NewNetworkScopedNodeStatuser(relayers chainlink.RelayerChainInteroperators, network string) *NetworkScopedNodeStatuser { scoped := relayers.List(chainlink.FilterRelayersByType(network)) return &NetworkScopedNodeStatuser{ network: network, @@ -32,7 +31,7 @@ func NewNetworkScopedNodeStatuser(relayers chainlink.RelayerChainInteroperators, } } -func (n *NetworkScopedNodeStatuser) NodeStatuses(ctx context.Context, offset, limit int, relayIDs ...relay.ID) (nodes []types.NodeStatus, count int, err error) { +func (n *NetworkScopedNodeStatuser) NodeStatuses(ctx context.Context, offset, limit int, relayIDs ...types.RelayID) (nodes []types.NodeStatus, count int, err error) { return n.relayers.NodeStatuses(ctx, offset, limit, relayIDs...) } @@ -75,7 +74,7 @@ func (n *nodesController[R]) Index(c *gin.Context, size, page, offset int) { } else { // fetch nodes for chain ID // backward compatibility - var rid relay.ID + var rid types.RelayID err = rid.UnmarshalString(id) if err != nil { rid.ChainID = id diff --git a/core/web/presenters/job.go b/core/web/presenters/job.go index 296add4ee25..12b958a346d 100644 --- a/core/web/presenters/job.go +++ b/core/web/presenters/job.go @@ -15,7 +15,6 @@ import ( clnull "github.com/smartcontractkit/chainlink/v2/core/null" "github.com/smartcontractkit/chainlink/v2/core/services/job" "github.com/smartcontractkit/chainlink/v2/core/services/pipeline" - "github.com/smartcontractkit/chainlink/v2/core/services/relay" "github.com/smartcontractkit/chainlink/v2/core/services/signatures/secp256k1" "github.com/smartcontractkit/chainlink/v2/core/store/models" ) @@ -167,7 +166,7 @@ func NewOffChainReportingSpec(spec *job.OCROracleSpec) *OffChainReportingSpec { // OffChainReporting2Spec defines the spec details of a OffChainReporting2 Job type OffChainReporting2Spec struct { ContractID string `json:"contractID"` - Relay relay.Network `json:"relay"` + Relay string `json:"relay"` // RelayID.Network RelayConfig map[string]interface{} `json:"relayConfig"` P2PV2Bootstrappers pq.StringArray `json:"p2pv2Bootstrappers"` OCRKeyBundleID null.String `json:"ocrKeyBundleID"` @@ -392,7 +391,7 @@ func NewBlockHeaderFeederSpec(spec *job.BlockHeaderFeederSpec) *BlockHeaderFeede // BootstrapSpec defines the spec details of a BootstrapSpec Job type BootstrapSpec struct { ContractID string `json:"contractID"` - Relay relay.Network `json:"relay"` + Relay string `json:"relay"` // RelayID.Network RelayConfig map[string]interface{} `json:"relayConfig"` BlockchainTimeout models.Interval `json:"blockchainTimeout"` ContractConfigTrackerSubscribeInterval models.Interval `json:"contractConfigTrackerSubscribeInterval"` diff --git a/core/web/resolver/mutation.go b/core/web/resolver/mutation.go index 9b0f5e50a03..9663f9dfe82 100644 --- a/core/web/resolver/mutation.go +++ b/core/web/resolver/mutation.go @@ -1019,7 +1019,7 @@ func (r *Resolver) CreateJob(ctx context.Context, args struct { config := r.App.GetConfig() switch jbt { case job.OffchainReporting: - jb, err = ocr.ValidatedOracleSpecToml(r.App.GetRelayers().LegacyEVMChains(), args.Input.TOML) + jb, err = ocr.ValidatedOracleSpecToml(config, r.App.GetRelayers().LegacyEVMChains(), args.Input.TOML) if !config.OCR().Enabled() { return nil, errors.New("The Offchain Reporting feature is disabled by configuration") } diff --git a/core/web/resolver/query.go b/core/web/resolver/query.go index 5a016599dc9..e24974e765d 100644 --- a/core/web/resolver/query.go +++ b/core/web/resolver/query.go @@ -15,7 +15,6 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/chains" "github.com/smartcontractkit/chainlink/v2/core/services/keystore" "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/vrfkey" - "github.com/smartcontractkit/chainlink/v2/core/services/relay" evmrelay "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm" "github.com/smartcontractkit/chainlink/v2/core/utils/stringutils" ) @@ -69,7 +68,7 @@ func (r *Resolver) Chain(ctx context.Context, args struct{ ID graphql.ID }) (*Ch return nil, err } - cs, _, err := r.App.EVMORM().Chains(relay.ChainID(args.ID)) + cs, _, err := r.App.EVMORM().Chains(string(args.ID)) if err != nil { return nil, err } diff --git a/core/web/resolver/spec_test.go b/core/web/resolver/spec_test.go index 1b65549488f..7021576fdcf 100644 --- a/core/web/resolver/spec_test.go +++ b/core/web/resolver/spec_test.go @@ -17,7 +17,6 @@ import ( ubig "github.com/smartcontractkit/chainlink/v2/core/chains/evm/utils/big" clnull "github.com/smartcontractkit/chainlink/v2/core/null" "github.com/smartcontractkit/chainlink/v2/core/services/job" - "github.com/smartcontractkit/chainlink/v2/core/services/relay" "github.com/smartcontractkit/chainlink/v2/core/services/signatures/secp256k1" "github.com/smartcontractkit/chainlink/v2/core/store/models" ) @@ -485,7 +484,7 @@ func TestResolver_OCR2Spec(t *testing.T) { OCRKeyBundleID: null.StringFrom(keyBundleID.String()), MonitoringEndpoint: null.StringFrom("https://monitor.endpoint"), P2PV2Bootstrappers: pq.StringArray{"12D3KooWL3XJ9EMCyZvmmGXL2LMiVBtrVa2BuESsJiXkSj7333Jw@localhost:5001"}, - Relay: relay.EVM, + Relay: types.NetworkEVM, RelayConfig: relayConfig, TransmitterID: null.StringFrom(transmitterAddress.String()), PluginType: types.Median, diff --git a/core/web/resolver/testdata/config-full.toml b/core/web/resolver/testdata/config-full.toml index 4eb2fce6c47..69d56974130 100644 --- a/core/web/resolver/testdata/config-full.toml +++ b/core/web/resolver/testdata/config-full.toml @@ -343,6 +343,22 @@ LeaseDuration = '0s' NodeIsSyncingEnabled = false FinalizedBlockPollInterval = '5s' +[EVM.NodePool.Errors] +NonceTooLow = '(: |^)nonce too low' +NonceTooHigh = '(: |^)nonce too high' +ReplacementTransactionUnderpriced = '(: |^)replacement transaction underpriced' +LimitReached = '(: |^)limit reached' +TransactionAlreadyInMempool = '(: |^)transaction already in mempool' +TerminallyUnderpriced = '(: |^)terminally underpriced' +InsufficientEth = '(: |^)infufficient Eth' +TxFeeExceedsCap = '(: |^)tx fee exceeds cap' +L2FeeTooLow = '(: |^)l2 fee too low' +L2FeeTooHigh = '(: |^)l2 fee too high' +L2Full = '(: |^)l2 full' +TransactionAlreadyMined = '(: |^)transaction already mined' +Fatal = '(: |^)fatal' +ServiceUnavailable = '(: |^)service unavailable' + [EVM.OCR] ContractConfirmations = 11 ContractTransmitterTransmitTimeout = '1m0s' diff --git a/core/web/solana_chains_controller.go b/core/web/solana_chains_controller.go index 8e2d4393a5f..ffb39cddba1 100644 --- a/core/web/solana_chains_controller.go +++ b/core/web/solana_chains_controller.go @@ -1,15 +1,15 @@ package web import ( + "github.com/smartcontractkit/chainlink-common/pkg/types" "github.com/smartcontractkit/chainlink/v2/core/services/chainlink" - "github.com/smartcontractkit/chainlink/v2/core/services/relay" "github.com/smartcontractkit/chainlink/v2/core/web/presenters" ) func NewSolanaChainsController(app chainlink.Application) ChainsController { return newChainsController( - relay.Solana, - app.GetRelayers().List(chainlink.FilterRelayersByType(relay.Solana)), + types.NetworkSolana, + app.GetRelayers().List(chainlink.FilterRelayersByType(types.NetworkSolana)), ErrSolanaNotEnabled, presenters.NewSolanaChainResource, app.GetLogger(), diff --git a/core/web/solana_nodes_controller.go b/core/web/solana_nodes_controller.go index d5fbc05ccf5..b3e03b8c320 100644 --- a/core/web/solana_nodes_controller.go +++ b/core/web/solana_nodes_controller.go @@ -1,8 +1,8 @@ package web import ( + "github.com/smartcontractkit/chainlink-common/pkg/types" "github.com/smartcontractkit/chainlink/v2/core/services/chainlink" - "github.com/smartcontractkit/chainlink/v2/core/services/relay" "github.com/smartcontractkit/chainlink/v2/core/web/presenters" ) @@ -10,7 +10,7 @@ import ( var ErrSolanaNotEnabled = errChainDisabled{name: "Solana", tomlKey: "Solana.Enabled"} func NewSolanaNodesController(app chainlink.Application) NodesController { - scopedNodeStatuser := NewNetworkScopedNodeStatuser(app.GetRelayers(), relay.Solana) + scopedNodeStatuser := NewNetworkScopedNodeStatuser(app.GetRelayers(), types.NetworkSolana) return newNodesController[presenters.SolanaNodeResource]( scopedNodeStatuser, ErrSolanaNotEnabled, presenters.NewSolanaNodeResource, app.GetAuditLogger()) diff --git a/core/web/solana_transfer_controller.go b/core/web/solana_transfer_controller.go index 70218080a87..7885c73bf7a 100644 --- a/core/web/solana_transfer_controller.go +++ b/core/web/solana_transfer_controller.go @@ -8,10 +8,10 @@ import ( "github.com/google/uuid" "github.com/pkg/errors" + "github.com/smartcontractkit/chainlink-common/pkg/types" "github.com/smartcontractkit/chainlink/v2/core/chains" "github.com/smartcontractkit/chainlink/v2/core/logger/audit" "github.com/smartcontractkit/chainlink/v2/core/services/chainlink" - "github.com/smartcontractkit/chainlink/v2/core/services/relay" solanamodels "github.com/smartcontractkit/chainlink/v2/core/store/models/solana" "github.com/smartcontractkit/chainlink/v2/core/web/presenters" ) @@ -23,7 +23,7 @@ type SolanaTransfersController struct { // Create sends SOL and other native coins from the Chainlink's account to a specified address. func (tc *SolanaTransfersController) Create(c *gin.Context) { - relayers := tc.App.GetRelayers().List(chainlink.FilterRelayersByType(relay.Solana)) + relayers := tc.App.GetRelayers().List(chainlink.FilterRelayersByType(types.NetworkSolana)) if relayers == nil { jsonAPIError(c, http.StatusBadRequest, ErrSolanaNotEnabled) return @@ -48,7 +48,7 @@ func (tc *SolanaTransfersController) Create(c *gin.Context) { } amount := new(big.Int).SetUint64(tr.Amount) - relayerID := relay.ID{Network: relay.Solana, ChainID: tr.SolanaChainID} + relayerID := types.RelayID{Network: types.NetworkSolana, ChainID: tr.SolanaChainID} relayer, err := relayers.Get(relayerID) if err != nil { if errors.Is(err, chainlink.ErrNoSuchRelayer) { diff --git a/core/web/starknet_chains_controller.go b/core/web/starknet_chains_controller.go index 414e17d9823..35a06899117 100644 --- a/core/web/starknet_chains_controller.go +++ b/core/web/starknet_chains_controller.go @@ -1,15 +1,15 @@ package web import ( + "github.com/smartcontractkit/chainlink-common/pkg/types" "github.com/smartcontractkit/chainlink/v2/core/services/chainlink" - "github.com/smartcontractkit/chainlink/v2/core/services/relay" "github.com/smartcontractkit/chainlink/v2/core/web/presenters" ) func NewStarkNetChainsController(app chainlink.Application) ChainsController { return newChainsController( - relay.StarkNet, - app.GetRelayers().List(chainlink.FilterRelayersByType(relay.StarkNet)), + types.NetworkStarkNet, + app.GetRelayers().List(chainlink.FilterRelayersByType(types.NetworkStarkNet)), ErrStarkNetNotEnabled, presenters.NewStarkNetChainResource, app.GetLogger(), diff --git a/core/web/starknet_nodes_controller.go b/core/web/starknet_nodes_controller.go index d2881f2e65a..5d059d357f0 100644 --- a/core/web/starknet_nodes_controller.go +++ b/core/web/starknet_nodes_controller.go @@ -1,8 +1,8 @@ package web import ( + "github.com/smartcontractkit/chainlink-common/pkg/types" "github.com/smartcontractkit/chainlink/v2/core/services/chainlink" - "github.com/smartcontractkit/chainlink/v2/core/services/relay" "github.com/smartcontractkit/chainlink/v2/core/web/presenters" ) @@ -10,7 +10,7 @@ import ( var ErrStarkNetNotEnabled = errChainDisabled{name: "StarkNet", tomlKey: "Starknet.Enabled"} func NewStarkNetNodesController(app chainlink.Application) NodesController { - scopedNodeStatuser := NewNetworkScopedNodeStatuser(app.GetRelayers(), relay.StarkNet) + scopedNodeStatuser := NewNetworkScopedNodeStatuser(app.GetRelayers(), types.NetworkStarkNet) return newNodesController[presenters.StarkNetNodeResource]( scopedNodeStatuser, ErrStarkNetNotEnabled, presenters.NewStarkNetNodeResource, app.GetAuditLogger()) diff --git a/charts/chainlink-cluster/.env.example b/crib/.env.example similarity index 100% rename from charts/chainlink-cluster/.env.example rename to crib/.env.example diff --git a/crib/README.md b/crib/README.md new file mode 100644 index 00000000000..c9106d401cd --- /dev/null +++ b/crib/README.md @@ -0,0 +1,156 @@ +# Crib Devspace Setup + +CRIB is a devspace configuration to launch chainlink cluster for system level tests + +Install `kubefwd` (no nixpkg for it yet, planned) + +``` +brew install txn2/tap/kubefwd +``` + +If you want to build images you need [docker](https://docs.docker.com/engine/install/) service running + +Enter the shell (from the root project dir) + +``` +nix develop +``` + +# Develop + +## New cluster + +We are using [devspace](https://www.devspace.sh/docs/getting-started/installation?x0=3) + +Configure the cluster, see `deployments.app.helm.values` and [values.yaml](../charts/chainlink-cluster/values.yaml) comments for more details + +Set up your K8s access + +``` +export DEVSPACE_IMAGE="..." +./setup.sh ${my-personal-namespace-name-crib} +``` + +Create a .env file based on the .env.sample file + +```sh +cp .env.sample .env +# Fill in the required values in .env +``` + +Build and deploy the current state of your repository + +``` +devspace deploy +``` + +Default `ttl` is `72h`, use `ttl` command to update if you need more time + +Valid values are `1h`, `2m`, `3s`, etc. Go time format is invalid `1h2m3s` + +``` +devspace run ttl ${namespace} 120h +``` + +If you want to deploy an image tag that is already available in ECR, use: + +``` +devspace deploy --override-image-tag "" +``` + +If you want to deploy an image tag from a public ECR repo, use: + +``` +export DEVSPACE_IMAGE=public.ecr.aws/chainlink/chainlink +devspace deploy --override-image-tag 2.9.0 +``` + +Forward ports to check UI or run tests + +``` +devspace run connect ${my-personal-namespace-name-crib} +``` + +List ingress hostnames + +``` +devspace run ingress-hosts +``` + +Destroy the cluster + +``` +devspace purge +``` + +## Running load tests + +Check this [doc](../../integration-tests/load/ocr/README.md) + +If you used `devspace dev ...` always use `devspace reset pods` to switch the pods back + +# Helm + +If you would like to use `helm` directly, please uncomment data in `values.yaml` + +## Install from local files + +``` +helm install -f values.yaml cl-cluster . +``` + +Forward all apps (in another terminal) + +``` +sudo kubefwd svc -n cl-cluster +``` + +Then you can connect and run your tests + +# Grafana dashboard + +We are using [Grabana](https://github.com/K-Phoen/grabana) lib to create dashboards programmatically + +You can also select dashboard platform in `INFRA_PLATFORM` either `kubernetes` or `docker` + +You can select the dashboard panels with `PANELS_INCLUDED` which is a list of panel names separated by comma +If you don't specify it will include core panels by default + +``` +export LOKI_TENANT_ID=promtail +export LOKI_URL=... +export GRAFANA_URL=... +export GRAFANA_TOKEN=... +export PROMETHEUS_DATA_SOURCE_NAME=Thanos +export LOKI_DATA_SOURCE_NAME=Loki +export INFRA_PLATFORM=kubernetes +export GRAFANA_FOLDER=DashboardCoreDebug +export DASHBOARD_NAME=CL-Cluster + +devspace run dashboard_deploy +``` + +Open Grafana folder `DashboardCoreDebug` and find dashboard `ChainlinkClusterDebug` + +# Testing + +Deploy your dashboard and run soak/load [tests](../../integration-tests/load/), check [README](../../integration-tests/README.md) for further explanations + +``` +devspace run dashboard_deploy +devspace run workload +devspace run dashboard_test +``` + +# Local Testing + +Go to [dashboard-lib](../dashboard-lib) and link the modules locally + +``` +cd dashboard +pnpm link --global +cd crib/dashboard/tests +pnpm link --global dashboard-tests +``` + +Then run the tests with commands mentioned above diff --git a/charts/chainlink-cluster/dashboard/cmd/delete.go b/crib/dashboard/cmd/delete.go similarity index 100% rename from charts/chainlink-cluster/dashboard/cmd/delete.go rename to crib/dashboard/cmd/delete.go diff --git a/charts/chainlink-cluster/dashboard/cmd/deploy.go b/crib/dashboard/cmd/deploy.go similarity index 84% rename from charts/chainlink-cluster/dashboard/cmd/deploy.go rename to crib/dashboard/cmd/deploy.go index 24c3af4589b..6ee19b909a4 100644 --- a/charts/chainlink-cluster/dashboard/cmd/deploy.go +++ b/crib/dashboard/cmd/deploy.go @@ -5,6 +5,7 @@ import ( lib "github.com/smartcontractkit/chainlink/dashboard-lib" atlas_don "github.com/smartcontractkit/chainlink/dashboard-lib/atlas-don" core_don "github.com/smartcontractkit/chainlink/dashboard-lib/core-don" + core_node_components "github.com/smartcontractkit/chainlink/dashboard-lib/core-node-components" k8spods "github.com/smartcontractkit/chainlink/dashboard-lib/k8s-pods" waspdb "github.com/smartcontractkit/wasp/dashboard" "strings" @@ -30,6 +31,16 @@ func main() { // TODO: refactor as a component later addWASPRows(db, cfg) } + if cfg.PanelsIncluded["core_components"] { + db.Add( + core_node_components.New( + core_node_components.Props{ + PrometheusDataSource: cfg.DataSources.Prometheus, + PlatformOpts: core_node_components.PlatformPanelOpts(), + }, + ), + ) + } if cfg.PanelsIncluded["ocr"] || cfg.PanelsIncluded["ocr2"] || cfg.PanelsIncluded["ocr3"] { for key := range cfg.PanelsIncluded { if strings.Contains(key, "ocr") { @@ -45,7 +56,7 @@ func main() { } } } - if cfg.Platform == "kubernetes" { + if !cfg.PanelsIncluded["core_components"] && cfg.Platform == "kubernetes" { db.Add( k8spods.New( k8spods.Props{ diff --git a/charts/chainlink-cluster/devspace.yaml b/crib/devspace.yaml similarity index 88% rename from charts/chainlink-cluster/devspace.yaml rename to crib/devspace.yaml index d46e28572bb..cc82c6a464c 100644 --- a/charts/chainlink-cluster/devspace.yaml +++ b/crib/devspace.yaml @@ -52,7 +52,7 @@ commands: ttl: |- kubectl label namespace $1 cleanup.kyverno.io/ttl=$2 --overwrite workload: |- - cd ../../integration-tests/load/ocr && go test -v -run TestOCRLoad || cd - + cd ../integration-tests/load/ocr && go test -v -run TestOCRLoad || cd - dashboard_deploy: |- go run dashboard/cmd/deploy.go dashboard_test: |- @@ -98,7 +98,7 @@ deployments: releaseName: "app" chart: name: cl-cluster - path: . + path: ../charts/chainlink-cluster # for simplicity, we define all the values here # they can be defined the same way in values.yml # devspace merges these "values" with the "values.yaml" before deploy @@ -107,6 +107,42 @@ deployments: fsGroup: 999 chainlink: + global: + overridesToml: |- + [Feature] + LogPoller = true + [Log] + Level = 'debug' + JSONConsole = true + [Log.File] + MaxSize = '0b' + [WebServer] + AllowOrigins = '*' + HTTPPort = 6688 + SecureCookies = false + HTTPWriteTimeout = '1m' + [WebServer.RateLimit] + Authenticated = 2000 + Unauthenticated = 1000 + [WebServer.TLS] + HTTPSPort = 0 + [Database] + MaxIdleConns = 50 + MaxOpenConns = 50 + MigrateOnStartup = true + [OCR2] + Enabled = true + DefaultTransactionQueueDepth = 0 + [OCR] + Enabled = false + DefaultTransactionQueueDepth = 0 + [P2P] + [P2P.V2] + Enabled = true + ListenAddresses = ['0.0.0.0:6690'] + AnnounceAddresses = ['0.0.0.0:6690'] + DeltaDial = '500ms' + DeltaReconcile = '5s' securityContext: capabilities: drop: @@ -118,7 +154,7 @@ deployments: web_port: 6688 p2p_port: 6690 # extraEnvVars: - # "CL_MEDIAN_CMD": "chainlink-feeds" + # "CL_MEDIAN_CMD": "chainlink-feeds" nodes: - name: node-1 image: ${runtime.images.app} @@ -385,3 +421,13 @@ deployments: nodeSelector: tolerations: affinity: +profiles: + - name: local-dev + patches: + # Remove the global overridesToml field. + # This will be configured via a values file. + - op: remove + path: deployments.app.helm.values.chainlink.global.overridesToml + - op: add + path: deployments.app.helm.valuesFiles + value: ["../charts/chainlink-cluster/values-profiles/values-dev.yaml"] diff --git a/charts/chainlink-cluster/devspace_start.sh b/crib/devspace_start.sh similarity index 100% rename from charts/chainlink-cluster/devspace_start.sh rename to crib/devspace_start.sh diff --git a/charts/chainlink-cluster/go.mod b/crib/go.mod similarity index 95% rename from charts/chainlink-cluster/go.mod rename to crib/go.mod index 4a8dd43fd5f..28bcaece757 100644 --- a/charts/chainlink-cluster/go.mod +++ b/crib/go.mod @@ -34,5 +34,5 @@ replace ( github.com/mwitkow/grpc-proxy => github.com/smartcontractkit/grpc-proxy v0.0.0-20230731113816-f1be6620749f github.com/sercand/kuberesolver/v4 => github.com/sercand/kuberesolver/v5 v5.1.1 - github.com/smartcontractkit/chainlink/dashboard-lib => ../../dashboard-lib + github.com/smartcontractkit/chainlink/dashboard-lib => ./../dashboard-lib ) diff --git a/charts/chainlink-cluster/go.sum b/crib/go.sum similarity index 100% rename from charts/chainlink-cluster/go.sum rename to crib/go.sum diff --git a/charts/chainlink-cluster/scripts/ingress_check.sh b/crib/scripts/ingress_check.sh similarity index 100% rename from charts/chainlink-cluster/scripts/ingress_check.sh rename to crib/scripts/ingress_check.sh diff --git a/charts/chainlink-cluster/setup.sh b/crib/setup.sh similarity index 100% rename from charts/chainlink-cluster/setup.sh rename to crib/setup.sh diff --git a/dashboard-lib/README.md b/dashboard-lib/README.md index 44fd655c72a..ee8fa66a7c7 100644 --- a/dashboard-lib/README.md +++ b/dashboard-lib/README.md @@ -16,7 +16,7 @@ dashboard Each component should contain rows, logic and unique variables in `component.go` -Components should be imported from this module, see [example](../charts/chainlink-cluster/dashboard/cmd/deploy.go) +Components should be imported from this module, see [example](../crib/dashboard/cmd/deploy.go) ## How to convert from JSON using Grabana codegen utility 1. Download Grabana binary [here](https://github.com/K-Phoen/grabana/releases) diff --git a/dashboard-lib/core-node-components/component.go b/dashboard-lib/core-node-components/component.go new file mode 100644 index 00000000000..47e23c073ba --- /dev/null +++ b/dashboard-lib/core-node-components/component.go @@ -0,0 +1,175 @@ +package core_node_components + +import ( + "github.com/K-Phoen/grabana/dashboard" + "github.com/K-Phoen/grabana/row" + "github.com/K-Phoen/grabana/stat" + "github.com/K-Phoen/grabana/table" + "github.com/K-Phoen/grabana/target/prometheus" + "github.com/K-Phoen/grabana/timeseries" + "github.com/K-Phoen/grabana/timeseries/axis" + "github.com/K-Phoen/grabana/variable/interval" + "github.com/K-Phoen/grabana/variable/query" +) + +type Props struct { + PrometheusDataSource string + PlatformOpts PlatformOpts +} + +func vars(p Props) []dashboard.Option { + return []dashboard.Option{ + dashboard.VariableAsInterval( + "interval", + interval.Values([]string{"30s", "1m", "5m", "15m", "30m", "1h", "6h", "12h"}), + interval.Default("15m"), + ), + dashboard.VariableAsQuery( + "env", + query.DataSource(p.PrometheusDataSource), + query.IncludeAll(), + query.Request("label_values(up, env)"), + query.Sort(query.NumericalAsc), + ), + dashboard.VariableAsQuery( + "cluster", + query.DataSource(p.PrometheusDataSource), + query.IncludeAll(), + query.Request(`label_values(up{env="$env"}, cluster)`), + query.Sort(query.NumericalAsc), + ), + dashboard.VariableAsQuery( + "blockchain", + query.DataSource(p.PrometheusDataSource), + query.IncludeAll(), + query.Request(`label_values(up{env="$env", cluster="$cluster"}, blockchain)`), + query.Sort(query.NumericalAsc), + ), + dashboard.VariableAsQuery( + "product", + query.DataSource(p.PrometheusDataSource), + query.IncludeAll(), + query.Request(`label_values(up{env="$env", cluster="$cluster", blockchain="$blockchain"}, product)`), + query.Sort(query.NumericalAsc), + ), + dashboard.VariableAsQuery( + "network_type", + query.DataSource(p.PrometheusDataSource), + query.IncludeAll(), + query.Request(`label_values(up{env="$env", cluster="$cluster", blockchain="$blockchain", product="$product"}, network_type)`), + query.Sort(query.NumericalAsc), + ), + dashboard.VariableAsQuery( + "component", + query.DataSource(p.PrometheusDataSource), + query.IncludeAll(), + query.Request(`label_values(up{env="$env", cluster="$cluster", blockchain="$blockchain", network_type="$network_type"}, component)`), + query.Sort(query.NumericalAsc), + ), + dashboard.VariableAsQuery( + "service", + query.DataSource(p.PrometheusDataSource), + query.IncludeAll(), + query.Request(`label_values(up{env="$env", cluster="$cluster", blockchain="$blockchain", network_type="$network_type", component="$component"}, service)`), + query.Sort(query.NumericalAsc), + ), + dashboard.VariableAsQuery( + "service_id", + query.DataSource(p.PrometheusDataSource), + query.Multiple(), + query.IncludeAll(), + query.Request(`label_values(health{env="$env", cluster="$cluster", blockchain="$blockchain", network_type="$network_type", component="$component", service="$service"}, service_id)`), + query.Sort(query.NumericalAsc), + ), + } +} + +func generalInfoRow(p Props) []dashboard.Option { + return []dashboard.Option{ + dashboard.Row( + "General CL Cluster Info", + row.WithTable( + "List Nodes", + table.Span(12), + table.HideColumn("Time"), + table.HideColumn("Value"), + table.DataSource(p.PrometheusDataSource), + table.WithPrometheusTarget( + `max(up{`+p.PlatformOpts.LabelQuery+`}) by (env, cluster, blockchain, product, network_type, network, version, team, component, service)`, + prometheus.Legend(""), + prometheus.Format("table"), + prometheus.Instant(), + ), + ), + row.WithTimeSeries( + "Uptime", + timeseries.Span(12), + timeseries.Height("200px"), + timeseries.DataSource(p.PrometheusDataSource), + timeseries.Axis( + axis.Max(1), + axis.Max(0), + axis.Unit("bool"), + axis.Label("Alive"), + ), + timeseries.WithPrometheusTarget( + `up{`+p.PlatformOpts.LabelQuery+`}`, + //prometheus.Legend(""), + prometheus.Legend("Team: {{team}} env: {{env}} cluster: {{cluster}} namespace: {{namespace}} job: {{job}} blockchain: {{blockchain}} product: {{product}} networkType: {{network_type}} component: {{component}} service: {{service}}"), + ), + ), + row.WithTimeSeries( + "Service Components Health by Service", + timeseries.Span(12), + timeseries.Height("200px"), + timeseries.DataSource(p.PrometheusDataSource), + timeseries.Legend(timeseries.ToTheRight), + timeseries.WithPrometheusTarget( + `health{`+p.PlatformOpts.LabelQuery+`service_id=~"${service_id}"}`, + prometheus.Legend("{{service_id}}"), + ), + ), + row.WithTimeSeries( + "Service Components Health Avg by Service", + timeseries.Span(12), + timeseries.Height("200px"), + timeseries.DataSource(p.PrometheusDataSource), + timeseries.Legend(timeseries.ToTheRight), + timeseries.WithPrometheusTarget( + `avg(avg_over_time(health{`+p.PlatformOpts.LabelQuery+`service_id=~"${service_id}"}[$interval])) by (service_id, version, service, cluster, env)`, + prometheus.Legend("{{service_id}}"), + ), + ), + row.WithStat( + "Service Components Health Avg by Service", + stat.Span(12), + stat.Height("200px"), + stat.DataSource(p.PrometheusDataSource), + stat.Text(stat.TextValueAndName), + stat.Orientation(stat.OrientationVertical), + stat.SparkLine(), + stat.TitleFontSize(8), + stat.ValueFontSize(12), + stat.WithPrometheusTarget( + `avg(avg_over_time(health{`+p.PlatformOpts.LabelQuery+`service_id=~"${service_id}"}[$interval])) by (service_id, version, service, cluster, env)`, + prometheus.Legend("{{service_id}}"), + ), + stat.AbsoluteThresholds([]stat.ThresholdStep{ + {Color: "#FF0000", Value: float64Ptr(0.0)}, + {Color: "#FF0000", Value: float64Ptr(0.8)}, + {Color: "#008000", Value: float64Ptr(1.0)}, + }), + ), + ), + } +} + +func New(p Props) []dashboard.Option { + opts := vars(p) + opts = append(opts, generalInfoRow(p)...) + return opts +} + +func float64Ptr(input float64) *float64 { + return &input +} diff --git a/dashboard-lib/core-node-components/platform.go b/dashboard-lib/core-node-components/platform.go new file mode 100644 index 00000000000..9d85cf82c77 --- /dev/null +++ b/dashboard-lib/core-node-components/platform.go @@ -0,0 +1,29 @@ +package core_node_components + +type PlatformOpts struct { + // Platform is infrastructure deployment platform: docker or k8s + Platform string + LabelFilters map[string]string + LabelFilter string + LegendString string + LabelQuery string +} + +// PlatformPanelOpts generate different queries for "docker" and "k8s" deployment platforms +func PlatformPanelOpts() PlatformOpts { + po := PlatformOpts{ + LabelFilters: map[string]string{ + "env": `=~"${env}"`, + "cluster": `=~"${cluster}"`, + "blockchain": `=~"${blockchain}"`, + "product": `=~"${product}"`, + "network_type": `=~"${network_type}"`, + "component": `=~"${component}"`, + "service": `=~"${service}"`, + }, + } + for key, value := range po.LabelFilters { + po.LabelQuery += key + value + ", " + } + return po +} diff --git a/docs/CONFIG.md b/docs/CONFIG.md index c33dcb6ffb8..0596fcdd84d 100644 --- a/docs/CONFIG.md +++ b/docs/CONFIG.md @@ -7244,6 +7244,111 @@ reported based on latest block and finality depth. Set to 0 to disable. +## EVM.NodePool.Errors +:warning: **_ADVANCED_**: _Do not change these settings unless you know what you are doing._ +```toml +[EVM.NodePool.Errors] +NonceTooLow = '(: |^)nonce too low' # Example +NonceTooHigh = '(: |^)nonce too high' # Example +ReplacementTransactionUnderpriced = '(: |^)replacement transaction underpriced' # Example +LimitReached = '(: |^)limit reached' # Example +TransactionAlreadyInMempool = '(: |^)transaction already in mempool' # Example +TerminallyUnderpriced = '(: |^)terminally underpriced' # Example +InsufficientEth = '(: |^)insufficeint eth' # Example +TxFeeExceedsCap = '(: |^)tx fee exceeds cap' # Example +L2FeeTooLow = '(: |^)l2 fee too low' # Example +L2FeeTooHigh = '(: |^)l2 fee too high' # Example +L2Full = '(: |^)l2 full' # Example +TransactionAlreadyMined = '(: |^)transaction already mined' # Example +Fatal = '(: |^)fatal' # Example +ServiceUnavailable = '(: |^)service unavailable' # Example +``` +Errors enable the node to provide custom regex patterns to match against error messages from RPCs. + +### NonceTooLow +```toml +NonceTooLow = '(: |^)nonce too low' # Example +``` +NonceTooLow is a regex pattern to match against nonce too low errors. + +### NonceTooHigh +```toml +NonceTooHigh = '(: |^)nonce too high' # Example +``` +NonceTooHigh is a regex pattern to match against nonce too high errors. + +### ReplacementTransactionUnderpriced +```toml +ReplacementTransactionUnderpriced = '(: |^)replacement transaction underpriced' # Example +``` +ReplacementTransactionUnderpriced is a regex pattern to match against replacement transaction underpriced errors. + +### LimitReached +```toml +LimitReached = '(: |^)limit reached' # Example +``` +LimitReached is a regex pattern to match against limit reached errors. + +### TransactionAlreadyInMempool +```toml +TransactionAlreadyInMempool = '(: |^)transaction already in mempool' # Example +``` +TransactionAlreadyInMempool is a regex pattern to match against transaction already in mempool errors. + +### TerminallyUnderpriced +```toml +TerminallyUnderpriced = '(: |^)terminally underpriced' # Example +``` +TerminallyUnderpriced is a regex pattern to match against terminally underpriced errors. + +### InsufficientEth +```toml +InsufficientEth = '(: |^)insufficeint eth' # Example +``` +InsufficientEth is a regex pattern to match against insufficient eth errors. + +### TxFeeExceedsCap +```toml +TxFeeExceedsCap = '(: |^)tx fee exceeds cap' # Example +``` +TxFeeExceedsCap is a regex pattern to match against tx fee exceeds cap errors. + +### L2FeeTooLow +```toml +L2FeeTooLow = '(: |^)l2 fee too low' # Example +``` +L2FeeTooLow is a regex pattern to match against l2 fee too low errors. + +### L2FeeTooHigh +```toml +L2FeeTooHigh = '(: |^)l2 fee too high' # Example +``` +L2FeeTooHigh is a regex pattern to match against l2 fee too high errors. + +### L2Full +```toml +L2Full = '(: |^)l2 full' # Example +``` +L2Full is a regex pattern to match against l2 full errors. + +### TransactionAlreadyMined +```toml +TransactionAlreadyMined = '(: |^)transaction already mined' # Example +``` +TransactionAlreadyMined is a regex pattern to match against transaction already mined errors. + +### Fatal +```toml +Fatal = '(: |^)fatal' # Example +``` +Fatal is a regex pattern to match against fatal errors. + +### ServiceUnavailable +```toml +ServiceUnavailable = '(: |^)service unavailable' # Example +``` +ServiceUnavailable is a regex pattern to match against service unavailable errors. + ## EVM.OCR ```toml [EVM.OCR] diff --git a/go.mod b/go.mod index 470a07da052..752dd110c49 100644 --- a/go.mod +++ b/go.mod @@ -19,7 +19,7 @@ require ( github.com/ethereum/go-ethereum v1.13.8 github.com/fatih/color v1.16.0 github.com/fxamacker/cbor/v2 v2.5.0 - github.com/gagliardetto/solana-go v1.4.1-0.20220428092759-5250b4abbb27 + github.com/gagliardetto/solana-go v1.8.4 github.com/getsentry/sentry-go v0.19.0 github.com/gin-contrib/cors v1.5.0 github.com/gin-contrib/expvar v0.0.1 @@ -68,18 +68,18 @@ require ( github.com/robfig/cron/v3 v3.0.1 github.com/rogpeppe/go-internal v1.11.0 github.com/scylladb/go-reflectx v1.0.1 - github.com/shirou/gopsutil/v3 v3.23.11 + github.com/shirou/gopsutil/v3 v3.24.3 github.com/shopspring/decimal v1.3.1 github.com/smartcontractkit/chain-selectors v1.0.10 github.com/smartcontractkit/chainlink-automation v1.0.3 - github.com/smartcontractkit/chainlink-common v0.1.7-0.20240419105123-fc5d616c7d2e + github.com/smartcontractkit/chainlink-common v0.1.7-0.20240419205832-845fa69af8d9 github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240419131812-73d148593d92 github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240220203239-09be0ea34540 - github.com/smartcontractkit/chainlink-feeds v0.0.0-20240119021347-3c541a78cdb8 - github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240216142700-c5869534c19e + github.com/smartcontractkit/chainlink-feeds v0.0.0-20240422130241-13c17a91b2ab + github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240422172640-59d47c73ba58 github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240325075535-0f7eb05ee595 github.com/smartcontractkit/chainlink-vrf v0.0.0-20240222010609-cd67d123c772 - github.com/smartcontractkit/libocr v0.0.0-20240326191951-2bbe9382d052 + github.com/smartcontractkit/libocr v0.0.0-20240419185742-fd3cab206b2c github.com/smartcontractkit/tdh2/go/ocr2/decryptionplugin v0.0.0-20230906073235-9e478e5e19f1 github.com/smartcontractkit/tdh2/go/tdh2 v0.0.0-20230906073235-9e478e5e19f1 github.com/smartcontractkit/wsrpc v0.8.1 @@ -98,11 +98,11 @@ require ( go.opentelemetry.io/otel v1.24.0 go.uber.org/multierr v1.11.0 go.uber.org/zap v1.26.0 - golang.org/x/crypto v0.21.0 + golang.org/x/crypto v0.22.0 golang.org/x/exp v0.0.0-20240213143201-ec583247a57a golang.org/x/mod v0.15.0 golang.org/x/sync v0.6.0 - golang.org/x/term v0.18.0 + golang.org/x/term v0.19.0 golang.org/x/text v0.14.0 golang.org/x/time v0.5.0 golang.org/x/tools v0.18.0 @@ -132,7 +132,6 @@ require ( github.com/Microsoft/go-winio v0.6.1 // indirect github.com/VictoriaMetrics/fastcache v1.12.1 // indirect github.com/armon/go-metrics v0.4.1 // indirect - github.com/aybabtme/rgbterm v0.0.0-20170906152045-cc83f3b3ce59 // indirect github.com/bahlo/generic-list-go v0.2.0 // indirect github.com/benbjohnson/clock v1.3.0 // indirect github.com/beorn7/perks v1.0.1 // indirect @@ -177,11 +176,11 @@ require ( github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 // indirect github.com/docker/distribution v2.8.2+incompatible // indirect github.com/dustin/go-humanize v1.0.1 // indirect - github.com/dvsekhvalnov/jose2go v1.5.0 // indirect + github.com/dvsekhvalnov/jose2go v1.7.0 // indirect github.com/ethereum/c-kzg-4844 v0.4.0 // indirect github.com/fsnotify/fsnotify v1.6.0 // indirect github.com/gabriel-vasile/mimetype v1.4.2 // indirect - github.com/gagliardetto/binary v0.7.1 // indirect + github.com/gagliardetto/binary v0.7.7 // indirect github.com/gagliardetto/treeout v0.1.4 // indirect github.com/gballet/go-libpcsclite v0.0.0-20191108122812-4678299bea08 // indirect github.com/gballet/go-verkle v0.1.1-0.20231031103413-a67434b50f46 // indirect @@ -291,6 +290,7 @@ require ( github.com/spf13/pflag v1.0.5 // indirect github.com/spf13/viper v1.15.0 // indirect github.com/status-im/keycard-go v0.2.0 // indirect + github.com/streamingfast/logging v0.0.0-20220405224725-2755dab2ce75 // indirect github.com/stretchr/objx v0.5.2 // indirect github.com/subosito/gotenv v1.4.2 // indirect github.com/supranational/blst v0.3.11 // indirect @@ -310,11 +310,12 @@ require ( github.com/valyala/fastjson v1.4.1 // indirect github.com/wk8/go-ordered-map/v2 v2.1.8 // indirect github.com/x448/float16 v0.8.4 // indirect - github.com/yusufpapurcu/wmi v1.2.3 // indirect + github.com/yusufpapurcu/wmi v1.2.4 // indirect github.com/zondax/hid v0.9.1 // indirect github.com/zondax/ledger-go v0.14.1 // indirect go.dedis.ch/protobuf v1.0.11 // indirect go.etcd.io/bbolt v1.3.7 // indirect + go.mongodb.org/mongo-driver v1.15.0 // indirect go.opencensus.io v0.24.0 // indirect go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.1 // indirect go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.21.0 // indirect @@ -325,9 +326,9 @@ require ( go.opentelemetry.io/proto/otlp v1.0.0 // indirect go.uber.org/ratelimit v0.3.0 // indirect golang.org/x/arch v0.7.0 // indirect - golang.org/x/net v0.21.0 // indirect + golang.org/x/net v0.24.0 // indirect golang.org/x/oauth2 v0.17.0 // indirect - golang.org/x/sys v0.18.0 // indirect + golang.org/x/sys v0.19.0 // indirect golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 // indirect google.golang.org/api v0.149.0 // indirect google.golang.org/genproto v0.0.0-20231030173426-d783a09b4405 // indirect diff --git a/go.sum b/go.sum index 7b7a1123baa..5f042f2e4c4 100644 --- a/go.sum +++ b/go.sum @@ -160,11 +160,10 @@ github.com/aws/aws-sdk-go v1.22.1/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN github.com/aws/aws-sdk-go v1.23.20/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.45.25 h1:c4fLlh5sLdK2DCRTY1z0hyuJZU4ygxX8m1FswL6/nF4= github.com/aws/aws-sdk-go v1.45.25/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= -github.com/aybabtme/rgbterm v0.0.0-20170906152045-cc83f3b3ce59 h1:WWB576BN5zNSZc/M9d/10pqEx5VHNhaQ/yOVAkmj5Yo= -github.com/aybabtme/rgbterm v0.0.0-20170906152045-cc83f3b3ce59/go.mod h1:q/89r3U2H7sSsE2t6Kca0lfwTK8JdoNGS/yzM/4iH5I= github.com/aymerick/raymond v2.0.3-0.20180322193309-b565731e1464+incompatible/go.mod h1:osfaiScAUVup+UC9Nfq76eWqDhXlp+4UYaA8uhTBO6g= github.com/bahlo/generic-list-go v0.2.0 h1:5sz/EEAK+ls5wF+NeqDpk5+iNdMDXrh3z3nPnH1Wvgk= github.com/bahlo/generic-list-go v0.2.0/go.mod h1:2KvAjgMlE5NNynlg/5iLrrCCZ2+5xWbdbCW3pNTGyYg= +github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/benbjohnson/clock v1.3.0 h1:ip6w0uFQkncKQ979AypyG0ER7mqUSBdKLOgAle/AT8A= github.com/benbjohnson/clock v1.3.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= @@ -357,8 +356,8 @@ github.com/dominikbraun/graph v0.23.0/go.mod h1:yOjYyogZLY1LSG9E33JWZJiq5k83Qy2C github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= -github.com/dvsekhvalnov/jose2go v1.5.0 h1:3j8ya4Z4kMCwT5nXIKFSV84YS+HdqSSO0VsTQxaLAeM= -github.com/dvsekhvalnov/jose2go v1.5.0/go.mod h1:QsHjhyTlD/lAVqn/NSbVZmSCGeDehTB/mPZadG+mhXU= +github.com/dvsekhvalnov/jose2go v1.7.0 h1:bnQc8+GMnidJZA8zc6lLEAb4xNrIqHwO+9TzqvtQZPo= +github.com/dvsekhvalnov/jose2go v1.7.0/go.mod h1:QsHjhyTlD/lAVqn/NSbVZmSCGeDehTB/mPZadG+mhXU= github.com/eknkc/amber v0.0.0-20171010120322-cdade1c07385/go.mod h1:0vRUJqYpeSZifjYj7uP3BG/gKcuzL9xWVV/Y+cK33KM= github.com/elastic/go-sysinfo v1.11.1 h1:g9mwl05njS4r69TisC+vwHWTSKywZFYYUu3so3T/Lao= github.com/elastic/go-sysinfo v1.11.1/go.mod h1:6KQb31j0QeWBDF88jIdWSxE8cwoOB9tO4Y4osN7Q70E= @@ -410,13 +409,12 @@ github.com/fxamacker/cbor/v2 v2.5.0 h1:oHsG0V/Q6E/wqTS2O1Cozzsy69nqCiguo5Q1a1ADi github.com/fxamacker/cbor/v2 v2.5.0/go.mod h1:TA1xS00nchWmaBnEIxPSE5oHLuJBAVvqrtAnWBwBCVo= github.com/gabriel-vasile/mimetype v1.4.2 h1:w5qFW6JKBz9Y393Y4q372O9A7cUSequkh1Q7OhCmWKU= github.com/gabriel-vasile/mimetype v1.4.2/go.mod h1:zApsH/mKG4w07erKIaJPFiX0Tsq9BFQgN3qGY5GnNgA= -github.com/gagliardetto/binary v0.6.1/go.mod h1:aOfYkc20U0deHaHn/LVZXiqlkDbFAX0FpTlDhsXa0S0= -github.com/gagliardetto/binary v0.7.1 h1:6ggDQ26vR+4xEvl/S13NcdLK3MUCi4oSy73pS9aI1cI= -github.com/gagliardetto/binary v0.7.1/go.mod h1:aOfYkc20U0deHaHn/LVZXiqlkDbFAX0FpTlDhsXa0S0= +github.com/gagliardetto/binary v0.7.7 h1:QZpT38+sgoPg+TIQjH94sLbl/vX+nlIRA37pEyOsjfY= +github.com/gagliardetto/binary v0.7.7/go.mod h1:mUuay5LL8wFVnIlecHakSZMvcdqfs+CsotR5n77kyjM= github.com/gagliardetto/gofuzz v1.2.2 h1:XL/8qDMzcgvR4+CyRQW9UGdwPRPMHVJfqQ/uMvSUuQw= github.com/gagliardetto/gofuzz v1.2.2/go.mod h1:bkH/3hYLZrMLbfYWA0pWzXmi5TTRZnu4pMGZBkqMKvY= -github.com/gagliardetto/solana-go v1.4.1-0.20220428092759-5250b4abbb27 h1:q2IztKyRQUxJ6abXRsawaBtvDFvM+szj4jDqV4od1gs= -github.com/gagliardetto/solana-go v1.4.1-0.20220428092759-5250b4abbb27/go.mod h1:NFuoDwHPvw858ZMHUJr6bkhN8qHt4x6e+U3EYHxAwNY= +github.com/gagliardetto/solana-go v1.8.4 h1:vmD/JmTlonyXGy39bAo0inMhmbdAwV7rXZtLDMZeodE= +github.com/gagliardetto/solana-go v1.8.4/go.mod h1:i+7aAyNDTHG0jK8GZIBSI4OVvDqkt2Qx+LklYclRNG8= github.com/gagliardetto/treeout v0.1.4 h1:ozeYerrLCmCubo1TcIjFiOWTTGteOOHND1twdFpgwaw= github.com/gagliardetto/treeout v0.1.4/go.mod h1:loUefvXTrlRG5rYmJmExNryyBRh8f89VZhmMOyCyqok= github.com/gavv/httpexpect v2.0.0+incompatible/go.mod h1:x+9tiU1YnrOvnB725RkpoLv1M62hOWzwo5OXotisrKc= @@ -571,6 +569,7 @@ github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= +github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb h1:PBC98N2aIaM3XXiurYmW7fx4GZkL8feAMVq7nEjURHk= @@ -995,6 +994,7 @@ github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lN github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= +github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc= github.com/mostynb/zstdpool-freelist v0.0.0-20201229113212-927304c0c3b1 h1:mPMvm6X6tf4w8y7j9YIt6V9jfWhL6QlbEc7CCmeQlWk= github.com/mostynb/zstdpool-freelist v0.0.0-20201229113212-927304c0c3b1/go.mod h1:ye2e/VUEtE2BHE+G/QcKkcLQVAEJoYRFj5VUOQatCRE= github.com/moul/http2curl v1.0.0/go.mod h1:8UbvGypXm98wA/IqH45anm5Y2Z6ep6O31QGOAZ3H0fQ= @@ -1162,8 +1162,8 @@ github.com/sethvargo/go-retry v0.2.4 h1:T+jHEQy/zKJf5s95UkguisicE0zuF9y7+/vgz08O github.com/sethvargo/go-retry v0.2.4/go.mod h1:1afjQuvh7s4gflMObvjLPaWgluLLyhA1wmVZ6KLpICw= github.com/shirou/gopsutil v3.21.11+incompatible h1:+1+c1VGhc88SSonWP6foOcLhvnKlUeu/erjjvaPEYiI= github.com/shirou/gopsutil v3.21.11+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= -github.com/shirou/gopsutil/v3 v3.23.11 h1:i3jP9NjCPUz7FiZKxlMnODZkdSIp2gnzfrvsu9CuWEQ= -github.com/shirou/gopsutil/v3 v3.23.11/go.mod h1:1FrWgea594Jp7qmjHUUPlJDTPgcsb9mGnXDxavtikzM= +github.com/shirou/gopsutil/v3 v3.24.3 h1:eoUGJSmdfLzJ3mxIhmOAhgKEKgQkeOwKpz1NbhVnuPE= +github.com/shirou/gopsutil/v3 v3.24.3/go.mod h1:JpND7O217xa72ewWz9zN2eIIkPWsDN/3pl0H8Qt0uwg= github.com/shoenig/go-m1cpu v0.1.6/go.mod h1:1JJMcUBvfNwpq05QDQVAnx3gUHr9IYF7GNg9SUEw2VQ= github.com/shoenig/test v0.6.4/go.mod h1:byHiCGXqrVaflBLAMq/srcZIHynQPQgeyvkvXnjqq0k= github.com/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24/go.mod h1:M+9NzErvs504Cn4c5DxATwIqPbtswREoFCre64PpcG4= @@ -1180,16 +1180,16 @@ github.com/smartcontractkit/chain-selectors v1.0.10 h1:t9kJeE6B6G+hKD0GYR4kGJSCq github.com/smartcontractkit/chain-selectors v1.0.10/go.mod h1:d4Hi+E1zqjy9HqMkjBE5q1vcG9VGgxf5VxiRHfzi2kE= github.com/smartcontractkit/chainlink-automation v1.0.3 h1:h/ijT0NiyV06VxYVgcNfsE3+8OEzT3Q0Z9au0z1BPWs= github.com/smartcontractkit/chainlink-automation v1.0.3/go.mod h1:RjboV0Qd7YP+To+OrzHGXaxUxoSONveCoAK2TQ1INLU= -github.com/smartcontractkit/chainlink-common v0.1.7-0.20240419105123-fc5d616c7d2e h1:nHs5mFOR7FPII20GrCGIPywDW43MhEUlD7DqHnTgu6Q= -github.com/smartcontractkit/chainlink-common v0.1.7-0.20240419105123-fc5d616c7d2e/go.mod h1:GTDBbovHUSAUk+fuGIySF2A/whhdtHGaWmU61BoERks= +github.com/smartcontractkit/chainlink-common v0.1.7-0.20240419205832-845fa69af8d9 h1:elDIBChe7ByPNvCyrSjMLTPKrgY+sKgzzlWe2p3wokY= +github.com/smartcontractkit/chainlink-common v0.1.7-0.20240419205832-845fa69af8d9/go.mod h1:GTDBbovHUSAUk+fuGIySF2A/whhdtHGaWmU61BoERks= github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240419131812-73d148593d92 h1:MvaNzuaQh1vX4CAYLM8qFd99cf0ZF1JNwtDZtLU7WvU= github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240419131812-73d148593d92/go.mod h1:uATrrJ8IsuBkOBJ46USuf73gz9gZy5k5bzGE5/ji/rc= github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240220203239-09be0ea34540 h1:xFSv8561jsLtF6gYZr/zW2z5qUUAkcFkApin2mnbYTo= github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240220203239-09be0ea34540/go.mod h1:sjAmX8K2kbQhvDarZE1ZZgDgmHJ50s0BBc/66vKY2ek= -github.com/smartcontractkit/chainlink-feeds v0.0.0-20240119021347-3c541a78cdb8 h1:1BcjXuviSAKttOX7BZoVHRZZGfxqoA2+AL8tykmkdoc= -github.com/smartcontractkit/chainlink-feeds v0.0.0-20240119021347-3c541a78cdb8/go.mod h1:vy1L7NybTy2F/Yv7BOh+oZBa1MACD6gzd1+DkcSkfp8= -github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240216142700-c5869534c19e h1:k8HS3GsAFZnxXIW3141VsQP2+EL1XrTtOi/HDt7sdBE= -github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240216142700-c5869534c19e/go.mod h1:JiykN+8W5TA4UD2ClrzQCVvcH3NcyLEVv7RwY0busrw= +github.com/smartcontractkit/chainlink-feeds v0.0.0-20240422130241-13c17a91b2ab h1:Ct1oUlyn03HDUVdFHJqtRGRUujMqdoMzvf/Cjhe30Ag= +github.com/smartcontractkit/chainlink-feeds v0.0.0-20240422130241-13c17a91b2ab/go.mod h1:RPUY7r8GxgzXxS1ijtU1P/fpJomOXztXgUbEziNmbCA= +github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240422172640-59d47c73ba58 h1:jc4ab5QrKZfkICyxJysCt7mSExuSPbePjgZsnJR3nRQ= +github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240422172640-59d47c73ba58/go.mod h1:oV5gIuSKrPEcjQ6uB6smBsm5kXHxyydVLNyAs4V9CoQ= github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240325075535-0f7eb05ee595 h1:y6ks0HsSOhPUueOmTcoxDQ50RCS1XINlRDTemZyHjFw= github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240325075535-0f7eb05ee595/go.mod h1:vV6WfnVIbK5Q1JsIru4YcTG0T1uRpLJm6t2BgCnCSsg= github.com/smartcontractkit/chainlink-vrf v0.0.0-20240222010609-cd67d123c772 h1:LQmRsrzzaYYN3wEU1l5tWiccznhvbyGnu2N+wHSXZAo= @@ -1198,8 +1198,8 @@ github.com/smartcontractkit/go-plugin v0.0.0-20240208201424-b3b91517de16 h1:TFe+ github.com/smartcontractkit/go-plugin v0.0.0-20240208201424-b3b91517de16/go.mod h1:lBS5MtSSBZk0SHc66KACcjjlU6WzEVP/8pwz68aMkCI= github.com/smartcontractkit/grpc-proxy v0.0.0-20230731113816-f1be6620749f h1:hgJif132UCdjo8u43i7iPN1/MFnu49hv7lFGFftCHKU= github.com/smartcontractkit/grpc-proxy v0.0.0-20230731113816-f1be6620749f/go.mod h1:MvMXoufZAtqExNexqi4cjrNYE9MefKddKylxjS+//n0= -github.com/smartcontractkit/libocr v0.0.0-20240326191951-2bbe9382d052 h1:1WFjrrVrWoQ9UpVMh7Mx4jDpzhmo1h8hFUKd9awIhIU= -github.com/smartcontractkit/libocr v0.0.0-20240326191951-2bbe9382d052/go.mod h1:SJEZCHgMCAzzBvo9vMV2DQ9onfEcIJCYSViyP4JI6c4= +github.com/smartcontractkit/libocr v0.0.0-20240419185742-fd3cab206b2c h1:lIyMbTaF2H0Q71vkwZHX/Ew4KF2BxiKhqEXwF8rn+KI= +github.com/smartcontractkit/libocr v0.0.0-20240419185742-fd3cab206b2c/go.mod h1:fb1ZDVXACvu4frX3APHZaEBp0xi1DIm34DcA0CwTsZM= github.com/smartcontractkit/tdh2/go/ocr2/decryptionplugin v0.0.0-20230906073235-9e478e5e19f1 h1:yiKnypAqP8l0OX0P3klzZ7SCcBUxy5KqTAKZmQOvSQE= github.com/smartcontractkit/tdh2/go/ocr2/decryptionplugin v0.0.0-20230906073235-9e478e5e19f1/go.mod h1:q6f4fe39oZPdsh1i57WznEZgxd8siidMaSFq3wdPmVg= github.com/smartcontractkit/tdh2/go/tdh2 v0.0.0-20230906073235-9e478e5e19f1 h1:Dai1bn+Q5cpeGMQwRdjOdVjG8mmFFROVkSKuUgBErRQ= @@ -1236,6 +1236,8 @@ github.com/spf13/viper v1.15.0 h1:js3yy885G8xwJa6iOISGFwd+qlUo5AvyXb7CiihdtiU= github.com/spf13/viper v1.15.0/go.mod h1:fFcTBJxvhhzSJiZy8n+PeW6t8l+KeT/uTARa0jHOQLA= github.com/status-im/keycard-go v0.2.0 h1:QDLFswOQu1r5jsycloeQh3bVU8n/NatHHaZobtDnDzA= github.com/status-im/keycard-go v0.2.0/go.mod h1:wlp8ZLbsmrF6g6WjugPAx+IzoLrkdf9+mHxBEeo3Hbg= +github.com/streamingfast/logging v0.0.0-20220405224725-2755dab2ce75 h1:ZqpS7rAhhKD7S7DnrpEdrnW1/gZcv82ytpMviovkli4= +github.com/streamingfast/logging v0.0.0-20220405224725-2755dab2ce75/go.mod h1:VlduQ80JcGJSargkRU4Sg9Xo63wZD/l8A5NC/Uo1/uU= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= @@ -1282,6 +1284,7 @@ github.com/tidwall/gjson v1.17.0 h1:/Jocvlh98kcTfpN2+JzGQWQcqrPQwDrVEMApx/M5ZwM= github.com/tidwall/gjson v1.17.0/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= github.com/tidwall/match v1.1.1 h1:+Ho715JplO36QYgwN9PGYNhgZvoUSc9X2c80KVTi+GA= github.com/tidwall/match v1.1.1/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= +github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tidwall/pretty v1.2.0 h1:RWIZEg2iJ8/g6fDDYzMpobmaoGh5OLl4AXtGUGPcqCs= github.com/tidwall/pretty v1.2.0/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= @@ -1330,6 +1333,9 @@ github.com/wk8/go-ordered-map/v2 v2.1.8 h1:5h/BUHu93oj4gIdvHHHGsScSTMijfx5PeYkE/ github.com/wk8/go-ordered-map/v2 v2.1.8/go.mod h1:5nJHM5DyteebpVlHnWMV0rPz6Zp7+xBAnxjb1X5vnTw= github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM= github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg= +github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI= +github.com/xdg-go/scram v1.1.1/go.mod h1:RaEWvsqvNKKvBPvcKeFjrG2cJqOkHTiyTpzz23ni57g= +github.com/xdg-go/stringprep v1.0.3/go.mod h1:W3f5j4i+9rC0kuIEJL0ky1VpHXQU3ocBgklLGvcBnW8= github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb h1:zGWFAtiMcyryUHoUjUJX0/lt1H2+i2Ka2n+D3DImSNo= github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= @@ -1346,6 +1352,7 @@ github.com/ydb-platform/ydb-go-genproto v0.0.0-20231012155159-f85a672542fd h1:dz github.com/ydb-platform/ydb-go-genproto v0.0.0-20231012155159-f85a672542fd/go.mod h1:Er+FePu1dNUieD+XTMDduGpQuCPssK5Q4BjF+IIXJ3I= github.com/ydb-platform/ydb-go-sdk/v3 v3.54.2 h1:E0yUuuX7UmPxXm92+yQCjMveLFO3zfvYFIJVuAqsVRA= github.com/ydb-platform/ydb-go-sdk/v3 v3.54.2/go.mod h1:fjBLQ2TdQNl4bMjuWl9adoTGBypwUTPoGC+EqYqiIcU= +github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d/go.mod h1:rHwXgn7JulP+udvsHwJoVG1YGAP6VLg4y9I5dyZdqmA= github.com/yudai/gojsondiff v1.0.0/go.mod h1:AY32+k2cwILAkW1fbgxQ5mUmMiZFgLIV+FBNExI05xg= github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82/go.mod h1:lgjkn3NuSvDfVJdfcVVdX+jpBxNmX4rDAzaS45IcYoM= github.com/yudai/pp v2.0.1+incompatible/go.mod h1:PuxR/8QJ7cyCkFp/aUDS+JY727OFEZkTdatxwunjIkc= @@ -1355,8 +1362,8 @@ github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= -github.com/yusufpapurcu/wmi v1.2.3 h1:E1ctvB7uKFMOJw3fdOW32DwGE9I7t++CRUEMKvFoFiw= -github.com/yusufpapurcu/wmi v1.2.3/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= +github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0= +github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= github.com/zenazn/goji v0.9.0/go.mod h1:7S9M489iMyHBNxwZnk9/EHS098H4/F6TATF2mIxtB1Q= github.com/zondax/hid v0.9.1 h1:gQe66rtmyZ8VeGFcOpbuH3r7erYtNEAezCAYu8LdkJo= github.com/zondax/hid v0.9.1/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= @@ -1375,6 +1382,9 @@ go.dedis.ch/protobuf v1.0.11/go.mod h1:97QR256dnkimeNdfmURz0wAMNVbd1VmLXhG1CrTYr go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.7 h1:j+zJOnnEjF/kyHlDDgGnVL/AIqIJPq8UoB2GSNfkUfQ= go.etcd.io/bbolt v1.3.7/go.mod h1:N9Mkw9X8x5fupy0IKsmuqVtoGDyxsaDlbk4Rd05IAQw= +go.mongodb.org/mongo-driver v1.11.0/go.mod h1:s7p5vEtfbeR1gYi6pnj3c3/urpbLv2T5Sfd6Rp2HBB8= +go.mongodb.org/mongo-driver v1.15.0 h1:rJCKC8eEliewXjZGf0ddURtl7tTVy1TK3bfl0gkUSLc= +go.mongodb.org/mongo-driver v1.15.0/go.mod h1:Vzb0Mk/pa7e6cWw85R4F/endUC3u0U9jGcNU603k65c= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.1/go.mod h1:Ap50jQcDJrx6rB6VgeeFPtuPIf3wMRvRfrfYDO6+BmA= @@ -1413,6 +1423,7 @@ go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE= go.uber.org/atomic v1.11.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= +go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= @@ -1430,6 +1441,7 @@ go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= go.uber.org/zap v1.14.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= go.uber.org/zap v1.16.0/go.mod h1:MA8QOfq0BHJwdXa996Y4dYkAqRKB8/1K1QMMZVaNZjQ= +go.uber.org/zap v1.21.0/go.mod h1:wjWOCqI0f2ZZrJF/UufIOkiC8ii6tm1iqIsLo76RfJw= go.uber.org/zap v1.26.0 h1:sI7k6L95XOKS281NhVKOFCUNIvv9e0w4BF8N3u+tCRo= go.uber.org/zap v1.26.0/go.mod h1:dtElttAiwGvoJ/vj4IwHBS/gXsEu/pZ50mUIRWuG0so= golang.org/x/arch v0.0.0-20210923205945-b76863e36670/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= @@ -1454,15 +1466,16 @@ golang.org/x/crypto v0.0.0-20201203163018-be400aefbc4c/go.mod h1:jdWPYTVW3xRLrWP golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= -golang.org/x/crypto v0.0.0-20210513164829-c07d793c2f9a/go.mod h1:P+XmwS30IXTQdn5tA2iutPOUgjI07+tq3H3K9MVA1s8= golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20220214200702-86341886e292/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.3.0/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc= -golang.org/x/crypto v0.21.0 h1:X31++rzVUdKhX5sWmSOFZxx8UW/ldWx55cbf08iNAMA= -golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs= +golang.org/x/crypto v0.22.0 h1:g1v0xeRhjcugydODzvb3mEM9SQ0HGp9s/nh3COQ/C30= +golang.org/x/crypto v0.22.0/go.mod h1:vr6Su+7cTlO45qkww3VDJlzDn0ctJvRgYbC2NvXHt+M= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -1552,16 +1565,16 @@ golang.org/x/net v0.0.0-20210331212208-0fccb6fa2b5c/go.mod h1:p54w0d4576C0XHj96b golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20210423184538-5f58ad60dda6/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= -golang.org/x/net v0.0.0-20210510120150-4163338589ed/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211008194852-3b03d305991f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= -golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4= -golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= +golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= +golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -1651,7 +1664,6 @@ golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -1674,9 +1686,9 @@ golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= +golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20201210144234-2321bbc49cbf/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= @@ -1685,8 +1697,8 @@ golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= golang.org/x/term v0.12.0/go.mod h1:owVbMEjm3cBLCHdkQu9b1opXd4ETQWc3BhuQGKgXgvU= -golang.org/x/term v0.18.0 h1:FcHjZXDMxI8mM3nwhX9HlKop4C0YQvCVCdwYl2wOtE8= -golang.org/x/term v0.18.0/go.mod h1:ILwASektA3OnRv7amZ1xhE/KTR+u50pbXfZ03+6Nx58= +golang.org/x/term v0.19.0 h1:+ThwsDv+tYfnJFhF4L8jITxu1tdTWRTZpdsWgEgjL6Q= +golang.org/x/term v0.19.0/go.mod h1:2CuTdWZ7KHSQwUzKva0cbMg6q2DMI3Mmxp+gKJbskEk= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -1755,7 +1767,6 @@ golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWc golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200601175630-2caf76543d99/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= @@ -1771,6 +1782,7 @@ golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4f golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= golang.org/x/tools v0.18.0 h1:k8NLag8AGHnn+PHbl7g43CtqZAwG60vZkLqgyZgIHgQ= diff --git a/integration-tests/actions/vrf/common/errors.go b/integration-tests/actions/vrf/common/errors.go index 287403ecfdf..f174609823f 100644 --- a/integration-tests/actions/vrf/common/errors.go +++ b/integration-tests/actions/vrf/common/errors.go @@ -1,6 +1,7 @@ package common const ( + ErrGenericFormat = "%s, err %w" ErrNodePrimaryKey = "error getting node's primary ETH key" ErrNodeNewTxKey = "error creating node's EVM transaction key" ErrCreatingProvingKeyHash = "error creating a keyHash from the proving key" diff --git a/integration-tests/actions/vrf/vrfv2/contract_steps.go b/integration-tests/actions/vrf/vrfv2/contract_steps.go index bd4535ebf77..fef780b695b 100644 --- a/integration-tests/actions/vrf/vrfv2/contract_steps.go +++ b/integration-tests/actions/vrf/vrfv2/contract_steps.go @@ -8,6 +8,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/rs/zerolog" + "github.com/shopspring/decimal" "github.com/smartcontractkit/chainlink-testing-framework/blockchain" "github.com/smartcontractkit/chainlink-testing-framework/utils/conversions" @@ -212,7 +213,7 @@ func SetupVRFV2Contracts( *vrfv2Config.MaxGasLimitCoordinatorConfig, *vrfv2Config.StalenessSeconds, *vrfv2Config.GasAfterPaymentCalculation, - big.NewInt(*vrfv2Config.FallbackWeiPerUnitLink), + decimal.RequireFromString(*vrfv2Config.FallbackWeiPerUnitLink).BigInt(), vrfCoordinatorV2FeeConfig, ) if err != nil { diff --git a/integration-tests/actions/vrf/vrfv2plus/contract_steps.go b/integration-tests/actions/vrf/vrfv2plus/contract_steps.go index 77937dd8de9..143b1e2cd9b 100644 --- a/integration-tests/actions/vrf/vrfv2plus/contract_steps.go +++ b/integration-tests/actions/vrf/vrfv2plus/contract_steps.go @@ -8,6 +8,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/rs/zerolog" + "github.com/shopspring/decimal" "github.com/smartcontractkit/chainlink-testing-framework/blockchain" "github.com/smartcontractkit/chainlink-testing-framework/utils/conversions" @@ -27,15 +28,15 @@ func DeployVRFV2_5Contracts( ) (*vrfcommon.VRFContracts, error) { bhs, err := contractDeployer.DeployBlockhashStore() if err != nil { - return nil, fmt.Errorf("%s, err %w", vrfcommon.ErrDeployBlockHashStore, err) + return nil, fmt.Errorf(vrfcommon.ErrGenericFormat, vrfcommon.ErrDeployBlockHashStore, err) } err = chainClient.WaitForEvents() if err != nil { - return nil, fmt.Errorf("%s, err %w", vrfcommon.ErrWaitTXsComplete, err) + return nil, fmt.Errorf(vrfcommon.ErrGenericFormat, vrfcommon.ErrWaitTXsComplete, err) } batchBHS, err := contractDeployer.DeployBatchBlockhashStore(bhs.Address()) if err != nil { - return nil, fmt.Errorf("%s, err %w", vrfcommon.ErrDeployBatchBlockHashStore, err) + return nil, fmt.Errorf(vrfcommon.ErrGenericFormat, vrfcommon.ErrDeployBatchBlockHashStore, err) } err = chainClient.WaitForEvents() if err != nil { @@ -43,11 +44,11 @@ func DeployVRFV2_5Contracts( } coordinator, err := contractDeployer.DeployVRFCoordinatorV2_5(bhs.Address()) if err != nil { - return nil, fmt.Errorf("%s, err %w", vrfcommon.ErrDeployCoordinator, err) + return nil, fmt.Errorf(vrfcommon.ErrGenericFormat, vrfcommon.ErrDeployCoordinator, err) } err = chainClient.WaitForEvents() if err != nil { - return nil, fmt.Errorf("%s, err %w", vrfcommon.ErrWaitTXsComplete, err) + return nil, fmt.Errorf(vrfcommon.ErrGenericFormat, vrfcommon.ErrWaitTXsComplete, err) } return &vrfcommon.VRFContracts{ CoordinatorV2Plus: coordinator, @@ -62,7 +63,7 @@ func DeployVRFV2PlusConsumers(contractDeployer contracts.ContractDeployer, coord for i := 1; i <= consumerContractsAmount; i++ { loadTestConsumer, err := contractDeployer.DeployVRFv2PlusLoadTestConsumer(coordinator.Address()) if err != nil { - return nil, fmt.Errorf("%s, err %w", ErrAdvancedConsumer, err) + return nil, fmt.Errorf(vrfcommon.ErrGenericFormat, ErrAdvancedConsumer, err) } consumers = append(consumers, loadTestConsumer) } @@ -76,14 +77,14 @@ func VRFV2_5RegisterProvingKey( ) (vrfcommon.VRFEncodedProvingKey, error) { provingKey, err := actions.EncodeOnChainVRFProvingKey(*vrfKey) if err != nil { - return vrfcommon.VRFEncodedProvingKey{}, fmt.Errorf("%s, err %w", vrfcommon.ErrEncodingProvingKey, err) + return vrfcommon.VRFEncodedProvingKey{}, fmt.Errorf(vrfcommon.ErrGenericFormat, vrfcommon.ErrEncodingProvingKey, err) } err = coordinator.RegisterProvingKey( provingKey, gasLaneMaxGas, ) if err != nil { - return vrfcommon.VRFEncodedProvingKey{}, fmt.Errorf("%s, err %w", vrfcommon.ErrRegisterProvingKey, err) + return vrfcommon.VRFEncodedProvingKey{}, fmt.Errorf(vrfcommon.ErrGenericFormat, vrfcommon.ErrRegisterProvingKey, err) } return provingKey, nil } @@ -95,14 +96,14 @@ func VRFV2PlusUpgradedVersionRegisterProvingKey( ) (vrfcommon.VRFEncodedProvingKey, error) { provingKey, err := actions.EncodeOnChainVRFProvingKey(*vrfKey) if err != nil { - return vrfcommon.VRFEncodedProvingKey{}, fmt.Errorf("%s, err %w", vrfcommon.ErrEncodingProvingKey, err) + return vrfcommon.VRFEncodedProvingKey{}, fmt.Errorf(vrfcommon.ErrGenericFormat, vrfcommon.ErrEncodingProvingKey, err) } err = coordinator.RegisterProvingKey( provingKey, gasLaneMaxGasPrice, ) if err != nil { - return vrfcommon.VRFEncodedProvingKey{}, fmt.Errorf("%s, err %w", vrfcommon.ErrRegisterProvingKey, err) + return vrfcommon.VRFEncodedProvingKey{}, fmt.Errorf(vrfcommon.ErrGenericFormat, vrfcommon.ErrRegisterProvingKey, err) } return provingKey, nil } @@ -116,11 +117,11 @@ func FundVRFCoordinatorV2_5Subscription( ) error { encodedSubId, err := chainlinkutils.ABIEncode(`[{"type":"uint256"}]`, subscriptionID) if err != nil { - return fmt.Errorf("%s, err %w", vrfcommon.ErrABIEncodingFunding, err) + return fmt.Errorf(vrfcommon.ErrGenericFormat, vrfcommon.ErrABIEncodingFunding, err) } _, err = linkToken.TransferAndCall(coordinator.Address(), linkFundingAmountJuels, encodedSubId) if err != nil { - return fmt.Errorf("%s, err %w", vrfcommon.ErrSendingLinkToken, err) + return fmt.Errorf(vrfcommon.ErrGenericFormat, vrfcommon.ErrSendingLinkToken, err) } return chainClient.WaitForEvents() } @@ -169,7 +170,7 @@ func CreateFundSubsAndAddConsumers( err = evmClient.WaitForEvents() if err != nil { - return nil, fmt.Errorf("%s, err %w", vrfcommon.ErrWaitTXsComplete, err) + return nil, fmt.Errorf(vrfcommon.ErrGenericFormat, vrfcommon.ErrWaitTXsComplete, err) } return subIDs, nil } @@ -194,7 +195,7 @@ func CreateSubsAndFund( err = evmClient.WaitForEvents() if err != nil { - return nil, fmt.Errorf("%s, err %w", vrfcommon.ErrWaitTXsComplete, err) + return nil, fmt.Errorf(vrfcommon.ErrGenericFormat, vrfcommon.ErrWaitTXsComplete, err) } err = FundSubscriptions( env, @@ -237,7 +238,7 @@ func AddConsumersToSubs( for _, consumer := range consumers { err := coordinator.AddConsumer(subID, consumer.Address()) if err != nil { - return fmt.Errorf("%s, err %w", ErrAddConsumerToSub, err) + return fmt.Errorf(vrfcommon.ErrGenericFormat, ErrAddConsumerToSub, err) } } } @@ -247,7 +248,7 @@ func AddConsumersToSubs( func CreateSubAndFindSubID(env *test_env.CLClusterTestEnv, chainID int64, coordinator contracts.VRFCoordinatorV2_5) (*big.Int, error) { tx, err := coordinator.CreateSubscription() if err != nil { - return nil, fmt.Errorf("%s, err %w", vrfcommon.ErrCreateVRFSubscription, err) + return nil, fmt.Errorf(vrfcommon.ErrGenericFormat, vrfcommon.ErrCreateVRFSubscription, err) } evmClient, err := env.GetEVMClient(chainID) if err != nil { @@ -255,12 +256,12 @@ func CreateSubAndFindSubID(env *test_env.CLClusterTestEnv, chainID int64, coordi } err = evmClient.WaitForEvents() if err != nil { - return nil, fmt.Errorf("%s, err %w", vrfcommon.ErrWaitTXsComplete, err) + return nil, fmt.Errorf(vrfcommon.ErrGenericFormat, vrfcommon.ErrWaitTXsComplete, err) } receipt, err := evmClient.GetTxReceipt(tx.Hash()) if err != nil { - return nil, fmt.Errorf("%s, err %w", vrfcommon.ErrWaitTXsComplete, err) + return nil, fmt.Errorf(vrfcommon.ErrGenericFormat, vrfcommon.ErrWaitTXsComplete, err) } //SubscriptionsCreated Log should be emitted with the subscription ID @@ -291,18 +292,18 @@ func FundSubscriptions( amountWei, ) if err != nil { - return fmt.Errorf("%s, err %w", ErrFundSubWithNativeToken, err) + return fmt.Errorf(vrfcommon.ErrGenericFormat, ErrFundSubWithNativeToken, err) } //Link Billing amountJuels := conversions.EtherToWei(subscriptionFundingAmountLink) err = FundVRFCoordinatorV2_5Subscription(linkAddress, coordinator, evmClient, subID, amountJuels) if err != nil { - return fmt.Errorf("%s, err %w", vrfcommon.ErrFundSubWithLinkToken, err) + return fmt.Errorf(vrfcommon.ErrGenericFormat, vrfcommon.ErrFundSubWithLinkToken, err) } } err = evmClient.WaitForEvents() if err != nil { - return fmt.Errorf("%s, err %w", vrfcommon.ErrWaitTXsComplete, err) + return fmt.Errorf(vrfcommon.ErrGenericFormat, vrfcommon.ErrWaitTXsComplete, err) } return nil } @@ -310,11 +311,11 @@ func FundSubscriptions( func GetUpgradedCoordinatorTotalBalance(coordinator contracts.VRFCoordinatorV2PlusUpgradedVersion) (linkTotalBalance *big.Int, nativeTokenTotalBalance *big.Int, err error) { linkTotalBalance, err = coordinator.GetLinkTotalBalance(context.Background()) if err != nil { - return nil, nil, fmt.Errorf("%s, err %w", ErrLinkTotalBalance, err) + return nil, nil, fmt.Errorf(vrfcommon.ErrGenericFormat, ErrLinkTotalBalance, err) } nativeTokenTotalBalance, err = coordinator.GetNativeTokenTotalBalance(context.Background()) if err != nil { - return nil, nil, fmt.Errorf("%s, err %w", ErrNativeTokenBalance, err) + return nil, nil, fmt.Errorf(vrfcommon.ErrGenericFormat, ErrNativeTokenBalance, err) } return } @@ -322,11 +323,11 @@ func GetUpgradedCoordinatorTotalBalance(coordinator contracts.VRFCoordinatorV2Pl func GetCoordinatorTotalBalance(coordinator contracts.VRFCoordinatorV2_5) (linkTotalBalance *big.Int, nativeTokenTotalBalance *big.Int, err error) { linkTotalBalance, err = coordinator.GetLinkTotalBalance(context.Background()) if err != nil { - return nil, nil, fmt.Errorf("%s, err %w", ErrLinkTotalBalance, err) + return nil, nil, fmt.Errorf(vrfcommon.ErrGenericFormat, ErrLinkTotalBalance, err) } nativeTokenTotalBalance, err = coordinator.GetNativeTokenTotalBalance(context.Background()) if err != nil { - return nil, nil, fmt.Errorf("%s, err %w", ErrNativeTokenBalance, err) + return nil, nil, fmt.Errorf(vrfcommon.ErrGenericFormat, ErrNativeTokenBalance, err) } return } @@ -360,7 +361,7 @@ func RequestRandomness( *config.RandomnessRequestCountPerRequest, ) if err != nil { - return nil, fmt.Errorf("%s, err %w", vrfcommon.ErrRequestRandomness, err) + return nil, fmt.Errorf(vrfcommon.ErrGenericFormat, vrfcommon.ErrRequestRandomness, err) } vrfcommon.LogRandomnessRequestedEvent(l, coordinator, randomWordsRequestedEvent, isNativeBilling) @@ -404,40 +405,6 @@ func RequestRandomnessAndWaitForFulfillment( } -//func RequestRandomnessAndWaitForFulfillmentUpgraded( -// consumer contracts.VRFv2PlusLoadTestConsumer, -// coordinator contracts.Coordinator, -// vrfKeyData *vrfcommon.VRFKeyData, -// subID *big.Int, -// isNativeBilling bool, -// config *vrfv2plus_config.General, -// l zerolog.Logger, -//) (*contracts.CoordinatorRandomWordsFulfilled, error) { -// -// randomWordsRequestedEvent, err := RequestRandomness( -// consumer, -// coordinator, -// vrfKeyData, -// subID, -// isNativeBilling, -// config, -// l, -// ) -// -// if err != nil { -// return nil, fmt.Errorf("%s, err %w", vrfcommon.ErrRequestRandomness, err) -// } -// -// return WaitForRandomWordsFulfilledEventUpgraded( -// coordinator, -// randomWordsRequestedEvent.RequestId, -// subID, -// isNativeBilling, -// config.RandomWordsFulfilledEventTimeout.Duration, -// l, -// ) -//} - func DeployVRFV2PlusDirectFundingContracts( contractDeployer contracts.ContractDeployer, chainClient blockchain.EVMClient, @@ -450,11 +417,11 @@ func DeployVRFV2PlusDirectFundingContracts( vrfv2PlusWrapper, err := contractDeployer.DeployVRFV2PlusWrapper(linkTokenAddress, linkEthFeedAddress, coordinator.Address(), wrapperSubId) if err != nil { - return nil, fmt.Errorf("%s, err %w", ErrDeployWrapper, err) + return nil, fmt.Errorf(vrfcommon.ErrGenericFormat, ErrDeployWrapper, err) } err = chainClient.WaitForEvents() if err != nil { - return nil, fmt.Errorf("%s, err %w", vrfcommon.ErrWaitTXsComplete, err) + return nil, fmt.Errorf(vrfcommon.ErrGenericFormat, vrfcommon.ErrWaitTXsComplete, err) } consumers, err := DeployVRFV2PlusWrapperConsumers(contractDeployer, vrfv2PlusWrapper, consumerContractsAmount) @@ -463,7 +430,7 @@ func DeployVRFV2PlusDirectFundingContracts( } err = chainClient.WaitForEvents() if err != nil { - return nil, fmt.Errorf("%s, err %w", vrfcommon.ErrWaitTXsComplete, err) + return nil, fmt.Errorf(vrfcommon.ErrGenericFormat, vrfcommon.ErrWaitTXsComplete, err) } return &VRFV2PlusWrapperContracts{vrfv2PlusWrapper, consumers}, nil } @@ -489,7 +456,7 @@ func WrapperRequestRandomness(consumer contracts.VRFv2PlusWrapperLoadTestConsume *config.RandomnessRequestCountPerRequest, ) if err != nil { - return nil, "", fmt.Errorf("%s, err %w", ErrRequestRandomnessDirectFundingNativePayment, err) + return nil, "", fmt.Errorf(vrfcommon.ErrGenericFormat, ErrRequestRandomnessDirectFundingNativePayment, err) } } else { randomWordsRequestedEvent, err = consumer.RequestRandomness( @@ -500,7 +467,7 @@ func WrapperRequestRandomness(consumer contracts.VRFv2PlusWrapperLoadTestConsume *config.RandomnessRequestCountPerRequest, ) if err != nil { - return nil, "", fmt.Errorf("%s, err %w", ErrRequestRandomnessDirectFundingLinkPayment, err) + return nil, "", fmt.Errorf(vrfcommon.ErrGenericFormat, ErrRequestRandomnessDirectFundingLinkPayment, err) } } vrfcommon.LogRandomnessRequestedEvent(l, coordinator, randomWordsRequestedEvent, isNativeBilling) @@ -551,7 +518,7 @@ func WaitRandomWordsFulfilledEvent( }, ) if err != nil { - return nil, fmt.Errorf("%s, err %w", vrfcommon.ErrWaitRandomWordsFulfilledEvent, err) + return nil, fmt.Errorf(vrfcommon.ErrGenericFormat, vrfcommon.ErrWaitRandomWordsFulfilledEvent, err) } vrfcommon.LogRandomWordsFulfilledEvent(l, coordinator, randomWordsFulfilledEvent, isNativeBilling) @@ -563,7 +530,7 @@ func DeployVRFV2PlusWrapperConsumers(contractDeployer contracts.ContractDeployer for i := 1; i <= consumerContractsAmount; i++ { loadTestConsumer, err := contractDeployer.DeployVRFV2PlusWrapperLoadTestConsumer(vrfV2PlusWrapper.Address()) if err != nil { - return nil, fmt.Errorf("%s, err %w", ErrAdvancedConsumer, err) + return nil, fmt.Errorf(vrfcommon.ErrGenericFormat, ErrAdvancedConsumer, err) } consumers = append(consumers, loadTestConsumer) } @@ -585,7 +552,7 @@ func SetupVRFV2PlusContracts( } vrfContracts, err := DeployVRFV2_5Contracts(env.ContractDeployer, evmClient) if err != nil { - return nil, fmt.Errorf("%s, err %w", ErrDeployVRFV2_5Contracts, err) + return nil, fmt.Errorf(vrfcommon.ErrGenericFormat, ErrDeployVRFV2_5Contracts, err) } vrfContracts.LinkToken = linkToken vrfContracts.MockETHLINKFeed = mockNativeLINKFeed @@ -596,24 +563,24 @@ func SetupVRFV2PlusContracts( *configGeneral.MaxGasLimitCoordinatorConfig, *configGeneral.StalenessSeconds, *configGeneral.GasAfterPaymentCalculation, - big.NewInt(*configGeneral.FallbackWeiPerUnitLink), + decimal.RequireFromString(*configGeneral.FallbackWeiPerUnitLink).BigInt(), *configGeneral.FulfillmentFlatFeeNativePPM, *configGeneral.FulfillmentFlatFeeLinkDiscountPPM, *configGeneral.NativePremiumPercentage, *configGeneral.LinkPremiumPercentage, ) if err != nil { - return nil, fmt.Errorf("%s, err %w", vrfcommon.ErrSetVRFCoordinatorConfig, err) + return nil, fmt.Errorf(vrfcommon.ErrGenericFormat, vrfcommon.ErrSetVRFCoordinatorConfig, err) } l.Info().Str("Coordinator", vrfContracts.CoordinatorV2Plus.Address()).Msg("Setting Link and ETH/LINK feed") err = vrfContracts.CoordinatorV2Plus.SetLINKAndLINKNativeFeed(linkToken.Address(), mockNativeLINKFeed.Address()) if err != nil { - return nil, fmt.Errorf("%s, err %w", ErrSetLinkNativeLinkFeed, err) + return nil, fmt.Errorf(vrfcommon.ErrGenericFormat, ErrSetLinkNativeLinkFeed, err) } err = evmClient.WaitForEvents() if err != nil { - return nil, fmt.Errorf("%s, err %w", vrfcommon.ErrWaitTXsComplete, err) + return nil, fmt.Errorf(vrfcommon.ErrGenericFormat, vrfcommon.ErrWaitTXsComplete, err) } return vrfContracts, nil diff --git a/integration-tests/actions/vrf/vrfv2plus/setup_steps.go b/integration-tests/actions/vrf/vrfv2plus/setup_steps.go index 3ceb4b6f9dd..0b7be600cc2 100644 --- a/integration-tests/actions/vrf/vrfv2plus/setup_steps.go +++ b/integration-tests/actions/vrf/vrfv2plus/setup_steps.go @@ -7,6 +7,7 @@ import ( "testing" "time" + "github.com/shopspring/decimal" "golang.org/x/sync/errgroup" "github.com/ethereum/go-ethereum/common" @@ -39,7 +40,7 @@ func CreateVRFV2PlusJob( } ost, err := os.String() if err != nil { - return nil, fmt.Errorf("%s, err %w", vrfcommon.ErrParseJob, err) + return nil, fmt.Errorf(vrfcommon.ErrGenericFormat, vrfcommon.ErrParseJob, err) } job, err := chainlinkNode.MustCreateJob(&client.VRFV2PlusJobSpec{ @@ -57,7 +58,7 @@ func CreateVRFV2PlusJob( RequestTimeout: vrfJobSpecConfig.RequestTimeout, }) if err != nil { - return nil, fmt.Errorf("%s, err %w", ErrCreatingVRFv2PlusJob, err) + return nil, fmt.Errorf(vrfcommon.ErrGenericFormat, ErrCreatingVRFv2PlusJob, err) } return job, nil @@ -100,11 +101,11 @@ func SetupVRFV2_5Environment( l.Info().Str("Coordinator", vrfContracts.CoordinatorV2Plus.Address()).Msg("Registering Proving Key") provingKey, err := VRFV2_5RegisterProvingKey(vrfKey, vrfContracts.CoordinatorV2Plus, uint64(assets.GWei(*configGeneral.CLNodeMaxGasPriceGWei).Int64())) if err != nil { - return nil, nil, nil, fmt.Errorf("%s, err %w", vrfcommon.ErrRegisteringProvingKey, err) + return nil, nil, nil, fmt.Errorf(vrfcommon.ErrGenericFormat, vrfcommon.ErrRegisteringProvingKey, err) } keyHash, err := vrfContracts.CoordinatorV2Plus.HashOfKey(ctx, provingKey) if err != nil { - return nil, nil, nil, fmt.Errorf("%s, err %w", vrfcommon.ErrCreatingProvingKeyHash, err) + return nil, nil, nil, fmt.Errorf(vrfcommon.ErrGenericFormat, vrfcommon.ErrCreatingProvingKeyHash, err) } evmClient, err := env.GetEVMClient(chainID) @@ -124,7 +125,7 @@ func SetupVRFV2_5Environment( } err = evmClient.WaitForEvents() if err != nil { - return nil, nil, nil, fmt.Errorf("%s, err %w", vrfcommon.ErrWaitTXsComplete, err) + return nil, nil, nil, fmt.Errorf(vrfcommon.ErrGenericFormat, vrfcommon.ErrWaitTXsComplete, err) } nodeTypeToNodeMap[vrfcommon.VRF].TXKeyAddressStrings = vrfTXKeyAddressStrings @@ -219,7 +220,7 @@ func setupVRFNode(contracts *vrfcommon.VRFContracts, chainID *big.Int, config *v vrfJobSpecConfig, ) if err != nil { - return fmt.Errorf("%s, err %w", ErrCreateVRFV2PlusJobs, err) + return fmt.Errorf(vrfcommon.ErrGenericFormat, ErrCreateVRFV2PlusJobs, err) } vrfNode.Job = job @@ -233,7 +234,7 @@ func setupVRFNode(contracts *vrfcommon.VRFContracts, chainID *big.Int, config *v l.Info().Msg("Restarting Node with new sending key PriceMax configuration") err = vrfNode.CLNode.Restart(nodeConfig) if err != nil { - return fmt.Errorf("%s, err %w", vrfcommon.ErrRestartCLNode, err) + return fmt.Errorf(vrfcommon.ErrGenericFormat, vrfcommon.ErrRestartCLNode, err) } return nil } @@ -278,7 +279,7 @@ func SetupVRFV2PlusWrapperEnvironment( err = evmClient.WaitForEvents() if err != nil { - return nil, nil, fmt.Errorf("%s, err %w", vrfcommon.ErrWaitTXsComplete, err) + return nil, nil, fmt.Errorf(vrfcommon.ErrGenericFormat, vrfcommon.ErrWaitTXsComplete, err) } // once the wrapper is deployed, wrapper address will become consumer of external EOA subscription @@ -289,22 +290,21 @@ func SetupVRFV2PlusWrapperEnvironment( err = evmClient.WaitForEvents() if err != nil { - return nil, nil, fmt.Errorf("%s, err %w", vrfcommon.ErrWaitTXsComplete, err) + return nil, nil, fmt.Errorf(vrfcommon.ErrGenericFormat, vrfcommon.ErrWaitTXsComplete, err) } - err = wrapperContracts.VRFV2PlusWrapper.SetConfig( *vrfv2PlusConfig.WrapperGasOverhead, - *vrfv2PlusConfig.CoordinatorGasOverhead, + *vrfv2PlusConfig.CoordinatorGasOverheadNative, + *vrfv2PlusConfig.CoordinatorGasOverheadLink, *vrfv2PlusConfig.CoordinatorGasOverheadPerWord, - //todo - introduce separate config for Wrapper Premium Percentage - *vrfv2PlusConfig.NativePremiumPercentage, - *vrfv2PlusConfig.LinkPremiumPercentage, + *vrfv2PlusConfig.CoordinatorNativePremiumPercentage, + *vrfv2PlusConfig.CoordinatorLinkPremiumPercentage, keyHash, *vrfv2PlusConfig.WrapperMaxNumberOfWords, *vrfv2PlusConfig.StalenessSeconds, - big.NewInt(*vrfv2PlusConfig.FallbackWeiPerUnitLink), - *vrfv2PlusConfig.FulfillmentFlatFeeLinkPPM, + decimal.RequireFromString(*vrfv2PlusConfig.FallbackWeiPerUnitLink).BigInt(), *vrfv2PlusConfig.FulfillmentFlatFeeNativePPM, + *vrfv2PlusConfig.FulfillmentFlatFeeLinkDiscountPPM, ) if err != nil { return nil, nil, err @@ -312,7 +312,7 @@ func SetupVRFV2PlusWrapperEnvironment( err = evmClient.WaitForEvents() if err != nil { - return nil, nil, fmt.Errorf("%s, err %w", vrfcommon.ErrWaitTXsComplete, err) + return nil, nil, fmt.Errorf(vrfcommon.ErrGenericFormat, vrfcommon.ErrWaitTXsComplete, err) } //fund sub @@ -323,7 +323,7 @@ func SetupVRFV2PlusWrapperEnvironment( err = evmClient.WaitForEvents() if err != nil { - return nil, nil, fmt.Errorf("%s, err %w", vrfcommon.ErrWaitTXsComplete, err) + return nil, nil, fmt.Errorf(vrfcommon.ErrGenericFormat, vrfcommon.ErrWaitTXsComplete, err) } err = FundSubscriptions( @@ -349,7 +349,7 @@ func SetupVRFV2PlusWrapperEnvironment( } err = evmClient.WaitForEvents() if err != nil { - return nil, nil, fmt.Errorf("%s, err %w", vrfcommon.ErrWaitTXsComplete, err) + return nil, nil, fmt.Errorf(vrfcommon.ErrGenericFormat, vrfcommon.ErrWaitTXsComplete, err) } //fund consumer with Eth @@ -359,7 +359,7 @@ func SetupVRFV2PlusWrapperEnvironment( } err = evmClient.WaitForEvents() if err != nil { - return nil, nil, fmt.Errorf("%s, err %w", vrfcommon.ErrWaitTXsComplete, err) + return nil, nil, fmt.Errorf(vrfcommon.ErrGenericFormat, vrfcommon.ErrWaitTXsComplete, err) } return wrapperContracts, wrapperSubID, nil } diff --git a/integration-tests/contracts/contract_vrf_models.go b/integration-tests/contracts/contract_vrf_models.go index e23149c7de4..aaccbad0602 100644 --- a/integration-tests/contracts/contract_vrf_models.go +++ b/integration-tests/contracts/contract_vrf_models.go @@ -171,7 +171,19 @@ type VRFV2Wrapper interface { type VRFV2PlusWrapper interface { Address() string - SetConfig(wrapperGasOverhead uint32, coordinatorGasOverhead uint32, coordinatorGasOverheadPerWord uint16, wrapperNativePremiumPercentage uint8, wrapperLinkPremiumPercentage uint8, keyHash [32]byte, maxNumWords uint8, stalenessSeconds uint32, fallbackWeiPerUnitLink *big.Int, fulfillmentFlatFeeNativePPM uint32, fulfillmentFlatFeeLinkDiscountPPM uint32) error + SetConfig( + wrapperGasOverhead uint32, + coordinatorGasOverheadNative uint32, + coordinatorGasOverheadLink uint32, + coordinatorGasOverheadPerWord uint16, + wrapperNativePremiumPercentage uint8, + wrapperLinkPremiumPercentage uint8, + keyHash [32]byte, maxNumWords uint8, + stalenessSeconds uint32, + fallbackWeiPerUnitLink *big.Int, + fulfillmentFlatFeeNativePPM uint32, + fulfillmentFlatFeeLinkDiscountPPM uint32, + ) error GetSubID(ctx context.Context) (*big.Int, error) Coordinator(ctx context.Context) (common.Address, error) } diff --git a/integration-tests/contracts/ethereum_vrfv2plus_contracts.go b/integration-tests/contracts/ethereum_vrfv2plus_contracts.go index 1c2bbcd0113..6d4bfcea647 100644 --- a/integration-tests/contracts/ethereum_vrfv2plus_contracts.go +++ b/integration-tests/contracts/ethereum_vrfv2plus_contracts.go @@ -57,7 +57,8 @@ func (v *EthereumVRFV2PlusWrapper) Address() string { } func (v *EthereumVRFV2PlusWrapper) SetConfig(wrapperGasOverhead uint32, - coordinatorGasOverhead uint32, + coordinatorGasOverheadNative uint32, + coordinatorGasOverheadLink uint32, coordinatorGasOverheadPerWord uint16, wrapperNativePremiumPercentage uint8, wrapperLinkPremiumPercentage uint8, @@ -75,7 +76,8 @@ func (v *EthereumVRFV2PlusWrapper) SetConfig(wrapperGasOverhead uint32, tx, err := v.wrapper.SetConfig( opts, wrapperGasOverhead, - coordinatorGasOverhead, + coordinatorGasOverheadNative, + coordinatorGasOverheadLink, coordinatorGasOverheadPerWord, wrapperNativePremiumPercentage, wrapperLinkPremiumPercentage, diff --git a/integration-tests/docker/README.md b/integration-tests/docker/README.md index 7df481832e6..c558f3bca8a 100644 --- a/integration-tests/docker/README.md +++ b/integration-tests/docker/README.md @@ -20,3 +20,29 @@ cd ./integration-tests/docker/cmd go run test_env.go start-env cl-cluster ``` + +## Obtaining Test Coverage for Chainlink Node + +To acquire test coverage data for end-to-end (E2E) tests on the Chainlink Node, follow these steps: + +1. Build Chainlink Node docker image with the cover flag. + + First, build the Chainlink Node Docker image with the `GO_COVER_FLAG` argument set to `true`. This enables the coverage flag in the build process. Here’s how you can do it: + ``` + docker buildx build --platform linux/arm64 . -t localhost/chainlink-local:develop -f ./core/chainlink.Dockerfile --build-arg GO_COVER_FLAG=true + ``` + Make sure to replace localhost/chainlink-local:develop with the appropriate repository and tag. + +2. Configure and Run E2E Tests + Next, configure the E2E tests to generate an HTML coverage report. You need to modify the `overrides.toml` file as shown below to include the show_html_coverage_report setting under the `[Logging]` section: + + ``` + [Logging] + show_html_coverage_report=true + ``` + +After the tests are complete, the coverage report will be generated in HTML format. Example: `~/Downloads/go-coverage/TestOCRv2Basic_plugins-chain-reader/coverage.html` +``` + log.go:43: 16:29:46.73 INF Chainlink node coverage html report saved filePath=~/Downloads/go-coverage/TestOCRv2Basic_plugins-chain-reader/coverage.html +``` + diff --git a/integration-tests/docker/node_coverage_helper.go b/integration-tests/docker/node_coverage_helper.go new file mode 100644 index 00000000000..52531bd35cf --- /dev/null +++ b/integration-tests/docker/node_coverage_helper.go @@ -0,0 +1,162 @@ +package docker + +import ( + "context" + "fmt" + "os" + "os/exec" + "path/filepath" + "strings" + "sync" + + "github.com/pkg/errors" + tc "github.com/testcontainers/testcontainers-go" +) + +type NodeCoverageHelper struct { + Nodes []tc.Container + GoCoverSrcDir string // Path to the source directory on the chainlink image with go coverage data + NodeCoverageDirs []string // Paths to individual node coverage directories + CoverageDir string // Path to the base directory with all coverage + MergedDir string // Path to the directory where all coverage will be merged + ChainlinkDir string // Path to the root chainlink directory +} + +func NewNodeCoverageHelper(ctx context.Context, nodes []tc.Container, chainlinkDir, coverageDir string) (*NodeCoverageHelper, error) { + coverSrcDir := os.Getenv("GO_COVERAGE_SRC_DIR") + if coverSrcDir == "" { + coverSrcDir = "/var/tmp/go-coverage" // Default path + } + + helper := &NodeCoverageHelper{ + Nodes: nodes, + GoCoverSrcDir: coverSrcDir, + CoverageDir: coverageDir, + MergedDir: filepath.Join(coverageDir, "merged"), + ChainlinkDir: chainlinkDir, + } + + if err := os.MkdirAll(coverageDir, 0755); err != nil { + return nil, errors.Wrap(err, "failed to create base directory for node coverage") + } + + // Copy coverage data from nodes + if err := helper.copyCoverageFromNodes(ctx); err != nil { + return nil, errors.Wrap(err, "failed to copy coverage from nodes during initialization") + } + + // Merge the coverage data + if err := helper.mergeCoverage(); err != nil { + return nil, errors.Wrap(err, "failed to merge coverage data") + } + + return helper, nil +} + +func (c *NodeCoverageHelper) SaveMergedHTMLReport() (string, error) { + // Generate the textual coverage report + txtCommand := exec.Command("go", "tool", "covdata", "textfmt", "-i=.", "-o=cov.txt") + txtCommand.Dir = c.MergedDir + if txtOutput, err := txtCommand.CombinedOutput(); err != nil { + return "", errors.Wrapf(err, "failed to generate textual coverage report: %s", string(txtOutput)) + } + + // Generate the HTML coverage report + htmlFilePath := filepath.Join(c.CoverageDir, "coverage.html") + // #nosec G204 + htmlCommand := exec.Command("go", "tool", "cover", "-html="+filepath.Join(c.MergedDir, "cov.txt"), "-o="+htmlFilePath) + htmlCommand.Dir = c.ChainlinkDir + if htmlOutput, err := htmlCommand.CombinedOutput(); err != nil { + return "", errors.Wrapf(err, "failed to generate HTML coverage report: %s", string(htmlOutput)) + } + + return htmlFilePath, nil +} + +func (c *NodeCoverageHelper) SaveMergedCoveragePercentage() (string, error) { + filePath := filepath.Join(c.CoverageDir, "percentage.txt") + + // Calculate coverage percentage from the merged data + percentCmd := exec.Command("go", "tool", "covdata", "percent", "-i=.") + percentCmd.Dir = c.MergedDir // Ensure the command runs in the directory with the merged data + output, err := percentCmd.CombinedOutput() + if err != nil { + return "", fmt.Errorf("failed to get merged coverage percentage report: %w, output: %s", err, string(output)) + } + + // Save the cmd output to a file + if err := os.WriteFile(filePath, output, 0600); err != nil { + return "", errors.Wrap(err, "failed to write coverage percentage to file") + } + + return filePath, nil +} + +func (c *NodeCoverageHelper) mergeCoverage() error { + if err := os.MkdirAll(c.MergedDir, 0755); err != nil { + return fmt.Errorf("failed to create merged directory: %w", err) + } + + // Merge the coverage data from all chainlink nodes + dirInput := strings.Join(c.NodeCoverageDirs, ",") + // #nosec G204 + mergeCmd := exec.Command("go", "tool", "covdata", "merge", "-o", c.MergedDir, "-i="+dirInput) + mergeCmd.Dir = filepath.Dir(c.MergedDir) + output, err := mergeCmd.CombinedOutput() + if err != nil { + return fmt.Errorf("error executing merge command: %w, output: %s", err, string(output)) + } + + // Remove the coverage dirs after merging + for _, dir := range c.NodeCoverageDirs { + if err := os.RemoveAll(dir); err != nil { + return fmt.Errorf("failed to remove directory %s: %w", dir, err) + } + } + c.NodeCoverageDirs = []string{} // Reset the coverage paths after merging + + return nil +} + +func (c *NodeCoverageHelper) copyCoverageFromNodes(ctx context.Context) error { + var wg sync.WaitGroup + errorsChan := make(chan error, len(c.Nodes)) + + for i, node := range c.Nodes { + wg.Add(1) + go func(n tc.Container, id int) { + defer wg.Done() + finalDestPath := filepath.Join(c.CoverageDir, fmt.Sprintf("node_%d", id)) + if err := os.MkdirAll(finalDestPath, 0755); err != nil { + errorsChan <- fmt.Errorf("failed to create directory for node %d: %w", id, err) + return + } + err := copyFolderFromContainerUsingDockerCP(ctx, n.GetContainerID(), c.GoCoverSrcDir, finalDestPath) + if err != nil { + errorsChan <- fmt.Errorf("failed to copy folder from container for node %d: %w", id, err) + return + } + finalDestPath = filepath.Join(finalDestPath, "go-coverage") // Assuming path structure /var/tmp/go-coverage/TestName/node_X/go-coverage + c.NodeCoverageDirs = append(c.NodeCoverageDirs, finalDestPath) + }(node, i) + } + + wg.Wait() + close(errorsChan) + + for err := range errorsChan { + if err != nil { + return err + } + } + + return nil +} +func copyFolderFromContainerUsingDockerCP(ctx context.Context, containerID, srcPath, destPath string) error { + source := fmt.Sprintf("%s:%s", containerID, srcPath) + cmd := exec.CommandContext(ctx, "docker", "cp", source, destPath) + if output, err := cmd.CombinedOutput(); err != nil { + return errors.Wrapf(err, "docker cp command failed: %s, output: %s", cmd, string(output)) + } + return nil +} diff --git a/integration-tests/docker/test_env/cl_node.go b/integration-tests/docker/test_env/cl_node.go index 09da97b40f3..7eee9231b17 100644 --- a/integration-tests/docker/test_env/cl_node.go +++ b/integration-tests/docker/test_env/cl_node.go @@ -339,6 +339,14 @@ func (n *ClNode) containerStartOrRestart(restartDb bool) error { return fmt.Errorf("%s err: %w", ErrStartCLNodeContainer, err) } + // retries can change the container name which affects urls used later + // so update to use the name that actually started + n.ContainerName, err = container.Name(context.Background()) + if err != nil { + return err + } + n.ContainerName = strings.Replace(n.ContainerName, "/", "", -1) + clEndpoint, err := test_env.GetEndpoint(testcontext.Get(n.t), container, "http") if err != nil { return err diff --git a/integration-tests/docker/test_env/cl_node_cluster.go b/integration-tests/docker/test_env/cl_node_cluster.go index 08122b5744d..679e5393811 100644 --- a/integration-tests/docker/test_env/cl_node_cluster.go +++ b/integration-tests/docker/test_env/cl_node_cluster.go @@ -1,9 +1,16 @@ package test_env import ( + "context" "fmt" + "os" + "os/exec" + "path/filepath" + "sync" + "time" "github.com/ethereum/go-ethereum/common" + "github.com/pkg/errors" "golang.org/x/sync/errgroup" "github.com/smartcontractkit/chainlink/integration-tests/client" @@ -36,6 +43,25 @@ func (c *ClCluster) Start() error { return eg.Wait() } +func (c *ClCluster) Stop() error { + eg := &errgroup.Group{} + nodes := c.Nodes + timeout := time.Minute * 1 + + for i := 0; i < len(nodes); i++ { + nodeIndex := i + eg.Go(func() error { + err := nodes[nodeIndex].Container.Stop(context.Background(), &timeout) + if err != nil { + return err + } + return nil + }) + } + + return eg.Wait() +} + func (c *ClCluster) NodeAPIs() []*client.ChainlinkClient { clients := make([]*client.ChainlinkClient, 0) for _, c := range c.Nodes { @@ -68,3 +94,46 @@ func (c *ClCluster) NodeCSAKeys() ([]string, error) { } return keys, nil } + +func (c *ClCluster) CopyFolderFromNodes(ctx context.Context, srcPath, destPath string) error { + var wg sync.WaitGroup + errors := make(chan error, len(c.Nodes)) + + for i, node := range c.Nodes { + wg.Add(1) + go func(n *ClNode, id int) { + defer wg.Done() + // Create a unique subdirectory for each node based on an identifier + finalDestPath := filepath.Join(destPath, fmt.Sprintf("node_%d", id)) + if err := os.MkdirAll(finalDestPath, 0755); err != nil { + errors <- fmt.Errorf("failed to create directory for node %d: %w", id, err) + return + } + err := copyFolderFromContainerUsingDockerCP(ctx, n.Container.GetContainerID(), srcPath, finalDestPath) + if err != nil { + errors <- fmt.Errorf("failed to copy folder for node %d: %w", id, err) + return + } + }(node, i) + } + + wg.Wait() + close(errors) + + for err := range errors { + if err != nil { + return err + } + } + + return nil +} + +func copyFolderFromContainerUsingDockerCP(ctx context.Context, containerID, srcPath, destPath string) error { + source := fmt.Sprintf("%s:%s", containerID, srcPath) + cmd := exec.CommandContext(ctx, "docker", "cp", source, destPath) + if output, err := cmd.CombinedOutput(); err != nil { + return errors.Wrapf(err, "docker cp command failed: %s, output: %s", cmd, string(output)) + } + return nil +} diff --git a/integration-tests/docker/test_env/test_env.go b/integration-tests/docker/test_env/test_env.go index d54f51eeea1..fc0ba355556 100644 --- a/integration-tests/docker/test_env/test_env.go +++ b/integration-tests/docker/test_env/test_env.go @@ -1,9 +1,14 @@ package test_env import ( + "context" "encoding/json" "fmt" "math/big" + "os" + "path/filepath" + "runtime" + "strings" "testing" "github.com/ethereum/go-ethereum/accounts/keystore" @@ -23,6 +28,7 @@ import ( actions_seth "github.com/smartcontractkit/chainlink/integration-tests/actions/seth" "github.com/smartcontractkit/chainlink/integration-tests/client" "github.com/smartcontractkit/chainlink/integration-tests/contracts" + d "github.com/smartcontractkit/chainlink/integration-tests/docker" core_testconfig "github.com/smartcontractkit/chainlink/integration-tests/testconfig" ) @@ -198,8 +204,12 @@ func (te *CLClusterTestEnv) Terminate() error { return nil } +type CleanupOpts struct { + TestName string +} + // Cleanup cleans the environment up after it's done being used, mainly for returning funds when on live networks and logs. -func (te *CLClusterTestEnv) Cleanup() error { +func (te *CLClusterTestEnv) Cleanup(opts CleanupOpts) error { te.l.Info().Msg("Cleaning up test environment") runIdErr := runid.RemoveLocalRunId(te.TestConfig.GetLoggingConfig().RunId) @@ -228,6 +238,11 @@ func (te *CLClusterTestEnv) Cleanup() error { } } + err := te.handleNodeCoverageReports(opts.TestName) + if err != nil { + te.l.Error().Err(err).Msg("Error handling node coverage reports") + } + // close EVMClient connections for _, evmClient := range te.evmClients { err := evmClient.Close() @@ -241,6 +256,85 @@ func (te *CLClusterTestEnv) Cleanup() error { return nil } +// handleNodeCoverageReports handles the coverage reports for the chainlink nodes +func (te *CLClusterTestEnv) handleNodeCoverageReports(testName string) error { + testName = strings.ReplaceAll(testName, "/", "_") + showHTMLCoverageReport := te.TestConfig.GetLoggingConfig().ShowHTMLCoverageReport != nil && *te.TestConfig.GetLoggingConfig().ShowHTMLCoverageReport + isCI := os.Getenv("CI") != "" + + te.l.Info(). + Bool("showCoverageReportFlag", showHTMLCoverageReport). + Bool("isCI", isCI). + Bool("show", showHTMLCoverageReport || isCI). + Msg("Checking if coverage report should be shown") + + var covHelper *d.NodeCoverageHelper + + if showHTMLCoverageReport || isCI { + // Stop all nodes in the chainlink cluster. + // This is needed to get go coverage profile from the node containers https://go.dev/doc/build-cover#FAQ + err := te.ClCluster.Stop() + if err != nil { + return err + } + + clDir, err := getChainlinkDir() + if err != nil { + return err + } + + var coverageRootDir string + if os.Getenv("GO_COVERAGE_DEST_DIR") != "" { + coverageRootDir = filepath.Join(os.Getenv("GO_COVERAGE_DEST_DIR"), testName) + } else { + coverageRootDir = filepath.Join(clDir, ".covdata", testName) + } + + var containers []tc.Container + for _, node := range te.ClCluster.Nodes { + containers = append(containers, node.Container) + } + + covHelper, err = d.NewNodeCoverageHelper(context.Background(), containers, clDir, coverageRootDir) + if err != nil { + return err + } + } + + // Show html coverage report when flag is set (local runs) + if showHTMLCoverageReport { + path, err := covHelper.SaveMergedHTMLReport() + if err != nil { + return err + } + te.l.Info().Str("testName", testName).Str("filePath", path).Msg("Chainlink node coverage html report saved") + } + + // Save percentage coverage report when running in CI + if isCI { + // Save coverage percentage to a file to show in the CI + path, err := covHelper.SaveMergedCoveragePercentage() + if err != nil { + te.l.Error().Err(err).Str("testName", testName).Msg("Failed to save coverage percentage for test") + } else { + te.l.Info().Str("testName", testName).Str("filePath", path).Msg("Chainlink node coverage percentage report saved") + } + } + + return nil +} + +// getChainlinkDir returns the path to the chainlink directory +func getChainlinkDir() (string, error) { + _, filename, _, ok := runtime.Caller(1) + if !ok { + return "", fmt.Errorf("cannot determine the path of the calling file") + } + dir := filepath.Dir(filename) + chainlinkDir := filepath.Clean(filepath.Join(dir, "../../..")) + return chainlinkDir, nil +} + func (te *CLClusterTestEnv) logWhetherAllContainersAreRunning() { for _, node := range te.ClCluster.Nodes { if node.Container == nil { diff --git a/integration-tests/docker/test_env/test_env_builder.go b/integration-tests/docker/test_env/test_env_builder.go index b9406bf16aa..c2aa07c8fa9 100644 --- a/integration-tests/docker/test_env/test_env_builder.go +++ b/integration-tests/docker/test_env/test_env_builder.go @@ -258,7 +258,8 @@ func (b *CLTestEnvBuilder) Build() (*CLClusterTestEnv, error) { switch b.cleanUpType { case CleanUpTypeStandard: b.t.Cleanup(func() { - if err := b.te.Cleanup(); err != nil { + // Cleanup test environment + if err := b.te.Cleanup(CleanupOpts{TestName: b.t.Name()}); err != nil { b.l.Error().Err(err).Msg("Error cleaning up test environment") } }) diff --git a/integration-tests/go.mod b/integration-tests/go.mod index e0c50d14bc5..327e5e69d94 100644 --- a/integration-tests/go.mod +++ b/integration-tests/go.mod @@ -22,13 +22,14 @@ require ( github.com/rs/zerolog v1.30.0 github.com/scylladb/go-reflectx v1.0.1 github.com/segmentio/ksuid v1.0.4 + github.com/shopspring/decimal v1.3.1 github.com/slack-go/slack v0.12.2 github.com/smartcontractkit/chainlink-automation v1.0.3 - github.com/smartcontractkit/chainlink-common v0.1.7-0.20240419105123-fc5d616c7d2e - github.com/smartcontractkit/chainlink-testing-framework v1.28.3 + github.com/smartcontractkit/chainlink-common v0.1.7-0.20240419205832-845fa69af8d9 + github.com/smartcontractkit/chainlink-testing-framework v1.28.4 github.com/smartcontractkit/chainlink-vrf v0.0.0-20240222010609-cd67d123c772 github.com/smartcontractkit/chainlink/v2 v2.0.0-00010101000000-000000000000 - github.com/smartcontractkit/libocr v0.0.0-20240326191951-2bbe9382d052 + github.com/smartcontractkit/libocr v0.0.0-20240419185742-fd3cab206b2c github.com/smartcontractkit/seth v0.1.6 github.com/smartcontractkit/wasp v0.4.5 github.com/spf13/cobra v1.8.0 @@ -94,7 +95,6 @@ require ( github.com/aws/aws-sdk-go v1.45.25 // indirect github.com/aws/constructs-go/constructs/v10 v10.1.255 // indirect github.com/aws/jsii-runtime-go v1.75.0 // indirect - github.com/aybabtme/rgbterm v0.0.0-20170906152045-cc83f3b3ce59 // indirect github.com/bahlo/generic-list-go v0.2.0 // indirect github.com/benbjohnson/clock v1.3.5 // indirect github.com/beorn7/perks v1.0.1 // indirect @@ -160,7 +160,7 @@ require ( github.com/docker/go-units v0.5.0 // indirect github.com/dominikbraun/graph v0.23.0 // indirect github.com/dustin/go-humanize v1.0.1 // indirect - github.com/dvsekhvalnov/jose2go v1.5.0 // indirect + github.com/dvsekhvalnov/jose2go v1.7.0 // indirect github.com/edsrzf/mmap-go v1.1.0 // indirect github.com/emicklei/go-restful/v3 v3.10.2 // indirect github.com/esote/minmaxheap v1.0.0 // indirect @@ -176,8 +176,8 @@ require ( github.com/fvbommel/sortorder v1.0.2 // indirect github.com/fxamacker/cbor/v2 v2.5.0 // indirect github.com/gabriel-vasile/mimetype v1.4.2 // indirect - github.com/gagliardetto/binary v0.7.1 // indirect - github.com/gagliardetto/solana-go v1.4.1-0.20220428092759-5250b4abbb27 // indirect + github.com/gagliardetto/binary v0.7.7 // indirect + github.com/gagliardetto/solana-go v1.8.4 // indirect github.com/gagliardetto/treeout v0.1.4 // indirect github.com/gballet/go-libpcsclite v0.0.0-20191108122812-4678299bea08 // indirect github.com/gballet/go-verkle v0.1.1-0.20231031103413-a67434b50f46 // indirect @@ -373,15 +373,14 @@ require ( github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 // indirect github.com/sercand/kuberesolver/v5 v5.1.1 // indirect github.com/shirou/gopsutil v3.21.11+incompatible // indirect - github.com/shirou/gopsutil/v3 v3.23.12 // indirect + github.com/shirou/gopsutil/v3 v3.24.3 // indirect github.com/shoenig/go-m1cpu v0.1.6 // indirect - github.com/shopspring/decimal v1.3.1 // indirect github.com/sirupsen/logrus v1.9.3 // indirect github.com/smartcontractkit/chain-selectors v1.0.10 // indirect github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240419131812-73d148593d92 // indirect github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240220203239-09be0ea34540 // indirect - github.com/smartcontractkit/chainlink-feeds v0.0.0-20240119021347-3c541a78cdb8 // indirect - github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240216142700-c5869534c19e // indirect + github.com/smartcontractkit/chainlink-feeds v0.0.0-20240422130241-13c17a91b2ab // indirect + github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240422172640-59d47c73ba58 // indirect github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240325075535-0f7eb05ee595 // indirect github.com/smartcontractkit/tdh2/go/ocr2/decryptionplugin v0.0.0-20230906073235-9e478e5e19f1 // indirect github.com/smartcontractkit/tdh2/go/tdh2 v0.0.0-20230906073235-9e478e5e19f1 // indirect @@ -394,6 +393,7 @@ require ( github.com/spf13/pflag v1.0.5 // indirect github.com/spf13/viper v1.15.0 // indirect github.com/status-im/keycard-go v0.2.0 // indirect + github.com/streamingfast/logging v0.0.0-20220405224725-2755dab2ce75 // indirect github.com/stretchr/objx v0.5.2 // indirect github.com/subosito/gotenv v1.4.2 // indirect github.com/supranational/blst v0.3.11 // indirect @@ -418,7 +418,7 @@ require ( github.com/wk8/go-ordered-map/v2 v2.1.8 // indirect github.com/x448/float16 v0.8.4 // indirect github.com/xlab/treeprint v1.1.0 // indirect - github.com/yusufpapurcu/wmi v1.2.3 // indirect + github.com/yusufpapurcu/wmi v1.2.4 // indirect github.com/zondax/hid v0.9.1 // indirect github.com/zondax/ledger-go v0.14.1 // indirect go.dedis.ch/fixbuf v1.0.3 // indirect @@ -426,7 +426,7 @@ require ( go.etcd.io/etcd/api/v3 v3.5.7 // indirect go.etcd.io/etcd/client/pkg/v3 v3.5.7 // indirect go.etcd.io/etcd/client/v3 v3.5.7 // indirect - go.mongodb.org/mongo-driver v1.12.0 // indirect + go.mongodb.org/mongo-driver v1.15.0 // indirect go.opencensus.io v0.24.0 // indirect go.opentelemetry.io/collector/pdata v1.0.0-rcv0016 // indirect go.opentelemetry.io/collector/semconv v0.87.0 // indirect @@ -446,13 +446,13 @@ require ( go.uber.org/ratelimit v0.3.0 // indirect go4.org/netipx v0.0.0-20230125063823-8449b0a6169f // indirect golang.org/x/arch v0.7.0 // indirect - golang.org/x/crypto v0.21.0 // indirect + golang.org/x/crypto v0.22.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/net v0.24.0 // indirect golang.org/x/oauth2 v0.17.0 // indirect - golang.org/x/sys v0.18.0 // indirect - golang.org/x/term v0.18.0 // indirect + golang.org/x/sys v0.19.0 // indirect + golang.org/x/term v0.19.0 // indirect golang.org/x/time v0.5.0 // indirect golang.org/x/tools v0.18.0 // indirect gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect diff --git a/integration-tests/go.sum b/integration-tests/go.sum index af600c8b550..577ae3f2a0d 100644 --- a/integration-tests/go.sum +++ b/integration-tests/go.sum @@ -216,13 +216,12 @@ github.com/aws/constructs-go/constructs/v10 v10.1.255 h1:5hARfEmhBqHSTQf/C3QLA3s github.com/aws/constructs-go/constructs/v10 v10.1.255/go.mod h1:DCdBSjN04Ck2pajCacTD4RKFqSA7Utya8d62XreYctI= github.com/aws/jsii-runtime-go v1.75.0 h1:NhpUfyiL7/wsRuUekFsz8FFBCYLfPD/l61kKg9kL/a4= github.com/aws/jsii-runtime-go v1.75.0/go.mod h1:TKCyrtM0pygEPo4rDZzbMSDNCDNTSYSN6/mGyHI6O3I= -github.com/aybabtme/rgbterm v0.0.0-20170906152045-cc83f3b3ce59 h1:WWB576BN5zNSZc/M9d/10pqEx5VHNhaQ/yOVAkmj5Yo= -github.com/aybabtme/rgbterm v0.0.0-20170906152045-cc83f3b3ce59/go.mod h1:q/89r3U2H7sSsE2t6Kca0lfwTK8JdoNGS/yzM/4iH5I= github.com/aymerick/raymond v2.0.3-0.20180322193309-b565731e1464+incompatible/go.mod h1:osfaiScAUVup+UC9Nfq76eWqDhXlp+4UYaA8uhTBO6g= github.com/bahlo/generic-list-go v0.2.0 h1:5sz/EEAK+ls5wF+NeqDpk5+iNdMDXrh3z3nPnH1Wvgk= github.com/bahlo/generic-list-go v0.2.0/go.mod h1:2KvAjgMlE5NNynlg/5iLrrCCZ2+5xWbdbCW3pNTGyYg= github.com/barkimedes/go-deepcopy v0.0.0-20220514131651-17c30cfc62df h1:GSoSVRLoBaFpOOds6QyY1L8AX7uoY+Ln3BHc22W40X0= github.com/barkimedes/go-deepcopy v0.0.0-20220514131651-17c30cfc62df/go.mod h1:hiVxq5OP2bUGBRNS3Z/bt/reCLFNbdcST6gISi1fiOM= +github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/benbjohnson/clock v1.3.5 h1:VvXlSJBzZpA/zum6Sj74hxwYI2DIxRWuNIoXAzHZz5o= github.com/benbjohnson/clock v1.3.5/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= @@ -458,8 +457,8 @@ github.com/dominikbraun/graph v0.23.0/go.mod h1:yOjYyogZLY1LSG9E33JWZJiq5k83Qy2C github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= -github.com/dvsekhvalnov/jose2go v1.5.0 h1:3j8ya4Z4kMCwT5nXIKFSV84YS+HdqSSO0VsTQxaLAeM= -github.com/dvsekhvalnov/jose2go v1.5.0/go.mod h1:QsHjhyTlD/lAVqn/NSbVZmSCGeDehTB/mPZadG+mhXU= +github.com/dvsekhvalnov/jose2go v1.7.0 h1:bnQc8+GMnidJZA8zc6lLEAb4xNrIqHwO+9TzqvtQZPo= +github.com/dvsekhvalnov/jose2go v1.7.0/go.mod h1:QsHjhyTlD/lAVqn/NSbVZmSCGeDehTB/mPZadG+mhXU= github.com/edsrzf/mmap-go v1.1.0 h1:6EUwBLQ/Mcr1EYLE4Tn1VdW1A4ckqCQWZBw8Hr0kjpQ= github.com/edsrzf/mmap-go v1.1.0/go.mod h1:19H/e8pUPLicwkyNgOykDXkJ9F0MHE+Z52B8EIth78Q= github.com/eknkc/amber v0.0.0-20171010120322-cdade1c07385/go.mod h1:0vRUJqYpeSZifjYj7uP3BG/gKcuzL9xWVV/Y+cK33KM= @@ -528,13 +527,12 @@ github.com/fxamacker/cbor/v2 v2.5.0 h1:oHsG0V/Q6E/wqTS2O1Cozzsy69nqCiguo5Q1a1ADi github.com/fxamacker/cbor/v2 v2.5.0/go.mod h1:TA1xS00nchWmaBnEIxPSE5oHLuJBAVvqrtAnWBwBCVo= github.com/gabriel-vasile/mimetype v1.4.2 h1:w5qFW6JKBz9Y393Y4q372O9A7cUSequkh1Q7OhCmWKU= github.com/gabriel-vasile/mimetype v1.4.2/go.mod h1:zApsH/mKG4w07erKIaJPFiX0Tsq9BFQgN3qGY5GnNgA= -github.com/gagliardetto/binary v0.6.1/go.mod h1:aOfYkc20U0deHaHn/LVZXiqlkDbFAX0FpTlDhsXa0S0= -github.com/gagliardetto/binary v0.7.1 h1:6ggDQ26vR+4xEvl/S13NcdLK3MUCi4oSy73pS9aI1cI= -github.com/gagliardetto/binary v0.7.1/go.mod h1:aOfYkc20U0deHaHn/LVZXiqlkDbFAX0FpTlDhsXa0S0= +github.com/gagliardetto/binary v0.7.7 h1:QZpT38+sgoPg+TIQjH94sLbl/vX+nlIRA37pEyOsjfY= +github.com/gagliardetto/binary v0.7.7/go.mod h1:mUuay5LL8wFVnIlecHakSZMvcdqfs+CsotR5n77kyjM= github.com/gagliardetto/gofuzz v1.2.2 h1:XL/8qDMzcgvR4+CyRQW9UGdwPRPMHVJfqQ/uMvSUuQw= github.com/gagliardetto/gofuzz v1.2.2/go.mod h1:bkH/3hYLZrMLbfYWA0pWzXmi5TTRZnu4pMGZBkqMKvY= -github.com/gagliardetto/solana-go v1.4.1-0.20220428092759-5250b4abbb27 h1:q2IztKyRQUxJ6abXRsawaBtvDFvM+szj4jDqV4od1gs= -github.com/gagliardetto/solana-go v1.4.1-0.20220428092759-5250b4abbb27/go.mod h1:NFuoDwHPvw858ZMHUJr6bkhN8qHt4x6e+U3EYHxAwNY= +github.com/gagliardetto/solana-go v1.8.4 h1:vmD/JmTlonyXGy39bAo0inMhmbdAwV7rXZtLDMZeodE= +github.com/gagliardetto/solana-go v1.8.4/go.mod h1:i+7aAyNDTHG0jK8GZIBSI4OVvDqkt2Qx+LklYclRNG8= github.com/gagliardetto/treeout v0.1.4 h1:ozeYerrLCmCubo1TcIjFiOWTTGteOOHND1twdFpgwaw= github.com/gagliardetto/treeout v0.1.4/go.mod h1:loUefvXTrlRG5rYmJmExNryyBRh8f89VZhmMOyCyqok= github.com/gavv/httpexpect v2.0.0+incompatible/go.mod h1:x+9tiU1YnrOvnB725RkpoLv1M62hOWzwo5OXotisrKc= @@ -1495,8 +1493,8 @@ github.com/sethvargo/go-retry v0.2.4 h1:T+jHEQy/zKJf5s95UkguisicE0zuF9y7+/vgz08O github.com/sethvargo/go-retry v0.2.4/go.mod h1:1afjQuvh7s4gflMObvjLPaWgluLLyhA1wmVZ6KLpICw= github.com/shirou/gopsutil v3.21.11+incompatible h1:+1+c1VGhc88SSonWP6foOcLhvnKlUeu/erjjvaPEYiI= github.com/shirou/gopsutil v3.21.11+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= -github.com/shirou/gopsutil/v3 v3.23.12 h1:z90NtUkp3bMtmICZKpC4+WaknU1eXtp5vtbQ11DgpE4= -github.com/shirou/gopsutil/v3 v3.23.12/go.mod h1:1FrWgea594Jp7qmjHUUPlJDTPgcsb9mGnXDxavtikzM= +github.com/shirou/gopsutil/v3 v3.24.3 h1:eoUGJSmdfLzJ3mxIhmOAhgKEKgQkeOwKpz1NbhVnuPE= +github.com/shirou/gopsutil/v3 v3.24.3/go.mod h1:JpND7O217xa72ewWz9zN2eIIkPWsDN/3pl0H8Qt0uwg= github.com/shoenig/go-m1cpu v0.1.6 h1:nxdKQNcEB6vzgA2E2bvzKIYRuNj7XNJ4S/aRSwKzFtM= github.com/shoenig/go-m1cpu v0.1.6/go.mod h1:1JJMcUBvfNwpq05QDQVAnx3gUHr9IYF7GNg9SUEw2VQ= github.com/shoenig/test v0.6.4 h1:kVTaSd7WLz5WZ2IaoM0RSzRsUD+m8wRR+5qvntpn4LU= @@ -1519,28 +1517,28 @@ github.com/smartcontractkit/chain-selectors v1.0.10 h1:t9kJeE6B6G+hKD0GYR4kGJSCq github.com/smartcontractkit/chain-selectors v1.0.10/go.mod h1:d4Hi+E1zqjy9HqMkjBE5q1vcG9VGgxf5VxiRHfzi2kE= github.com/smartcontractkit/chainlink-automation v1.0.3 h1:h/ijT0NiyV06VxYVgcNfsE3+8OEzT3Q0Z9au0z1BPWs= github.com/smartcontractkit/chainlink-automation v1.0.3/go.mod h1:RjboV0Qd7YP+To+OrzHGXaxUxoSONveCoAK2TQ1INLU= -github.com/smartcontractkit/chainlink-common v0.1.7-0.20240419105123-fc5d616c7d2e h1:nHs5mFOR7FPII20GrCGIPywDW43MhEUlD7DqHnTgu6Q= -github.com/smartcontractkit/chainlink-common v0.1.7-0.20240419105123-fc5d616c7d2e/go.mod h1:GTDBbovHUSAUk+fuGIySF2A/whhdtHGaWmU61BoERks= +github.com/smartcontractkit/chainlink-common v0.1.7-0.20240419205832-845fa69af8d9 h1:elDIBChe7ByPNvCyrSjMLTPKrgY+sKgzzlWe2p3wokY= +github.com/smartcontractkit/chainlink-common v0.1.7-0.20240419205832-845fa69af8d9/go.mod h1:GTDBbovHUSAUk+fuGIySF2A/whhdtHGaWmU61BoERks= github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240419131812-73d148593d92 h1:MvaNzuaQh1vX4CAYLM8qFd99cf0ZF1JNwtDZtLU7WvU= github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240419131812-73d148593d92/go.mod h1:uATrrJ8IsuBkOBJ46USuf73gz9gZy5k5bzGE5/ji/rc= github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240220203239-09be0ea34540 h1:xFSv8561jsLtF6gYZr/zW2z5qUUAkcFkApin2mnbYTo= github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240220203239-09be0ea34540/go.mod h1:sjAmX8K2kbQhvDarZE1ZZgDgmHJ50s0BBc/66vKY2ek= -github.com/smartcontractkit/chainlink-feeds v0.0.0-20240119021347-3c541a78cdb8 h1:1BcjXuviSAKttOX7BZoVHRZZGfxqoA2+AL8tykmkdoc= -github.com/smartcontractkit/chainlink-feeds v0.0.0-20240119021347-3c541a78cdb8/go.mod h1:vy1L7NybTy2F/Yv7BOh+oZBa1MACD6gzd1+DkcSkfp8= -github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240216142700-c5869534c19e h1:k8HS3GsAFZnxXIW3141VsQP2+EL1XrTtOi/HDt7sdBE= -github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240216142700-c5869534c19e/go.mod h1:JiykN+8W5TA4UD2ClrzQCVvcH3NcyLEVv7RwY0busrw= +github.com/smartcontractkit/chainlink-feeds v0.0.0-20240422130241-13c17a91b2ab h1:Ct1oUlyn03HDUVdFHJqtRGRUujMqdoMzvf/Cjhe30Ag= +github.com/smartcontractkit/chainlink-feeds v0.0.0-20240422130241-13c17a91b2ab/go.mod h1:RPUY7r8GxgzXxS1ijtU1P/fpJomOXztXgUbEziNmbCA= +github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240422172640-59d47c73ba58 h1:jc4ab5QrKZfkICyxJysCt7mSExuSPbePjgZsnJR3nRQ= +github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240422172640-59d47c73ba58/go.mod h1:oV5gIuSKrPEcjQ6uB6smBsm5kXHxyydVLNyAs4V9CoQ= github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240325075535-0f7eb05ee595 h1:y6ks0HsSOhPUueOmTcoxDQ50RCS1XINlRDTemZyHjFw= github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240325075535-0f7eb05ee595/go.mod h1:vV6WfnVIbK5Q1JsIru4YcTG0T1uRpLJm6t2BgCnCSsg= -github.com/smartcontractkit/chainlink-testing-framework v1.28.3 h1:rZ622PUSE9jJvI2g1SNNcMJedXyMzq9XJ8SbV2j9TvA= -github.com/smartcontractkit/chainlink-testing-framework v1.28.3/go.mod h1:jN+HgXbriq6fKRlIqLw9F3I81aYImV6kBJkIfz0mdIA= +github.com/smartcontractkit/chainlink-testing-framework v1.28.4 h1:/OOPH76VFQlG5HEXrXgBVDv1fjuasQzMV1EyeaaXWzM= +github.com/smartcontractkit/chainlink-testing-framework v1.28.4/go.mod h1:jN+HgXbriq6fKRlIqLw9F3I81aYImV6kBJkIfz0mdIA= github.com/smartcontractkit/chainlink-vrf v0.0.0-20240222010609-cd67d123c772 h1:LQmRsrzzaYYN3wEU1l5tWiccznhvbyGnu2N+wHSXZAo= github.com/smartcontractkit/chainlink-vrf v0.0.0-20240222010609-cd67d123c772/go.mod h1:Kn1Hape05UzFZ7bOUnm3GVsHzP0TNrVmpfXYNHdqGGs= github.com/smartcontractkit/go-plugin v0.0.0-20240208201424-b3b91517de16 h1:TFe+FvzxClblt6qRfqEhUfa4kFQx5UobuoFGO2W4mMo= github.com/smartcontractkit/go-plugin v0.0.0-20240208201424-b3b91517de16/go.mod h1:lBS5MtSSBZk0SHc66KACcjjlU6WzEVP/8pwz68aMkCI= github.com/smartcontractkit/grpc-proxy v0.0.0-20230731113816-f1be6620749f h1:hgJif132UCdjo8u43i7iPN1/MFnu49hv7lFGFftCHKU= github.com/smartcontractkit/grpc-proxy v0.0.0-20230731113816-f1be6620749f/go.mod h1:MvMXoufZAtqExNexqi4cjrNYE9MefKddKylxjS+//n0= -github.com/smartcontractkit/libocr v0.0.0-20240326191951-2bbe9382d052 h1:1WFjrrVrWoQ9UpVMh7Mx4jDpzhmo1h8hFUKd9awIhIU= -github.com/smartcontractkit/libocr v0.0.0-20240326191951-2bbe9382d052/go.mod h1:SJEZCHgMCAzzBvo9vMV2DQ9onfEcIJCYSViyP4JI6c4= +github.com/smartcontractkit/libocr v0.0.0-20240419185742-fd3cab206b2c h1:lIyMbTaF2H0Q71vkwZHX/Ew4KF2BxiKhqEXwF8rn+KI= +github.com/smartcontractkit/libocr v0.0.0-20240419185742-fd3cab206b2c/go.mod h1:fb1ZDVXACvu4frX3APHZaEBp0xi1DIm34DcA0CwTsZM= github.com/smartcontractkit/seth v0.1.6 h1:exU96KiKM/gxvp7OR8KkOXnTgbtFNepdhMBvyobFKCw= github.com/smartcontractkit/seth v0.1.6/go.mod h1:2TMOZQ8WTAw7rR1YBbXpnad6VmT/+xDd/nXLmB7Eero= github.com/smartcontractkit/tdh2/go/ocr2/decryptionplugin v0.0.0-20230906073235-9e478e5e19f1 h1:yiKnypAqP8l0OX0P3klzZ7SCcBUxy5KqTAKZmQOvSQE= @@ -1587,6 +1585,8 @@ github.com/spf13/viper v1.15.0/go.mod h1:fFcTBJxvhhzSJiZy8n+PeW6t8l+KeT/uTARa0jH github.com/status-im/keycard-go v0.2.0 h1:QDLFswOQu1r5jsycloeQh3bVU8n/NatHHaZobtDnDzA= github.com/status-im/keycard-go v0.2.0/go.mod h1:wlp8ZLbsmrF6g6WjugPAx+IzoLrkdf9+mHxBEeo3Hbg= github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= +github.com/streamingfast/logging v0.0.0-20220405224725-2755dab2ce75 h1:ZqpS7rAhhKD7S7DnrpEdrnW1/gZcv82ytpMviovkli4= +github.com/streamingfast/logging v0.0.0-20220405224725-2755dab2ce75/go.mod h1:VlduQ80JcGJSargkRU4Sg9Xo63wZD/l8A5NC/Uo1/uU= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= @@ -1691,10 +1691,8 @@ github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcY github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI= github.com/xdg-go/scram v1.0.2/go.mod h1:1WAq6h33pAW+iRreB34OORO2Nf7qel3VV3fjBj+hCSs= github.com/xdg-go/scram v1.1.1/go.mod h1:RaEWvsqvNKKvBPvcKeFjrG2cJqOkHTiyTpzz23ni57g= -github.com/xdg-go/scram v1.1.2/go.mod h1:RT/sEzTbU5y00aCK8UOx6R7YryM0iF1N2MOmC3kKLN4= github.com/xdg-go/stringprep v1.0.2/go.mod h1:8F9zXuvzgwmyT5DUm4GUfZGDdT3W+LCvS6+da4O5kxM= github.com/xdg-go/stringprep v1.0.3/go.mod h1:W3f5j4i+9rC0kuIEJL0ky1VpHXQU3ocBgklLGvcBnW8= -github.com/xdg-go/stringprep v1.0.4/go.mod h1:mPGuuIYwz7CmR2bT9j4GbQqutWS1zV24gijq1dTyGkM= github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= @@ -1717,8 +1715,8 @@ github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1 github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= github.com/yuin/gopher-lua v1.1.0 h1:BojcDhfyDWgU2f2TOzYK/g5p2gxMrku8oupLDqlnSqE= github.com/yuin/gopher-lua v1.1.0/go.mod h1:GBR0iDaNXjAgGg9zfCvksxSRnQx76gclCIb7kdAd1Pw= -github.com/yusufpapurcu/wmi v1.2.3 h1:E1ctvB7uKFMOJw3fdOW32DwGE9I7t++CRUEMKvFoFiw= -github.com/yusufpapurcu/wmi v1.2.3/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= +github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0= +github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= github.com/zenazn/goji v0.9.0/go.mod h1:7S9M489iMyHBNxwZnk9/EHS098H4/F6TATF2mIxtB1Q= github.com/zondax/hid v0.9.1 h1:gQe66rtmyZ8VeGFcOpbuH3r7erYtNEAezCAYu8LdkJo= github.com/zondax/hid v0.9.1/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= @@ -1746,8 +1744,9 @@ go.etcd.io/etcd/client/v3 v3.5.7/go.mod h1:sOWmj9DZUMyAngS7QQwCyAXXAL6WhgTOPLNS/ go.mongodb.org/mongo-driver v1.7.3/go.mod h1:NqaYOwnXWr5Pm7AOpO5QFxKJ503nbMse/R79oO62zWg= go.mongodb.org/mongo-driver v1.7.5/go.mod h1:VXEWRZ6URJIkUq2SCAyapmhH0ZLRBP+FT4xhp5Zvxng= go.mongodb.org/mongo-driver v1.10.0/go.mod h1:wsihk0Kdgv8Kqu1Anit4sfK+22vSFbUrAVEYRhCXrA8= -go.mongodb.org/mongo-driver v1.12.0 h1:aPx33jmn/rQuJXPQLZQ8NtfPQG8CaqgLThFtqRb0PiE= -go.mongodb.org/mongo-driver v1.12.0/go.mod h1:AZkxhPnFJUoH7kZlFkVKucV20K387miPfm7oimrSmK0= +go.mongodb.org/mongo-driver v1.11.0/go.mod h1:s7p5vEtfbeR1gYi6pnj3c3/urpbLv2T5Sfd6Rp2HBB8= +go.mongodb.org/mongo-driver v1.15.0 h1:rJCKC8eEliewXjZGf0ddURtl7tTVy1TK3bfl0gkUSLc= +go.mongodb.org/mongo-driver v1.15.0/go.mod h1:Vzb0Mk/pa7e6cWw85R4F/endUC3u0U9jGcNU603k65c= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.1/go.mod h1:Ap50jQcDJrx6rB6VgeeFPtuPIf3wMRvRfrfYDO6+BmA= @@ -1797,6 +1796,7 @@ go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE= go.uber.org/atomic v1.11.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= +go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= @@ -1814,6 +1814,7 @@ go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= go.uber.org/zap v1.14.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= go.uber.org/zap v1.16.0/go.mod h1:MA8QOfq0BHJwdXa996Y4dYkAqRKB8/1K1QMMZVaNZjQ= +go.uber.org/zap v1.21.0/go.mod h1:wjWOCqI0f2ZZrJF/UufIOkiC8ii6tm1iqIsLo76RfJw= go.uber.org/zap v1.26.0 h1:sI7k6L95XOKS281NhVKOFCUNIvv9e0w4BF8N3u+tCRo= go.uber.org/zap v1.26.0/go.mod h1:dtElttAiwGvoJ/vj4IwHBS/gXsEu/pZ50mUIRWuG0so= go4.org/netipx v0.0.0-20230125063823-8449b0a6169f h1:ketMxHg+vWm3yccyYiq+uK8D3fRmna2Fcj+awpQp84s= @@ -1843,17 +1844,17 @@ golang.org/x/crypto v0.0.0-20201203163018-be400aefbc4c/go.mod h1:jdWPYTVW3xRLrWP golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= -golang.org/x/crypto v0.0.0-20210513164829-c07d793c2f9a/go.mod h1:P+XmwS30IXTQdn5tA2iutPOUgjI07+tq3H3K9MVA1s8= golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20220214200702-86341886e292/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.3.0/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc= -golang.org/x/crypto v0.21.0 h1:X31++rzVUdKhX5sWmSOFZxx8UW/ldWx55cbf08iNAMA= -golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs= +golang.org/x/crypto v0.22.0 h1:g1v0xeRhjcugydODzvb3mEM9SQ0HGp9s/nh3COQ/C30= +golang.org/x/crypto v0.22.0/go.mod h1:vr6Su+7cTlO45qkww3VDJlzDn0ctJvRgYbC2NvXHt+M= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -1947,7 +1948,6 @@ golang.org/x/net v0.0.0-20210410081132-afb366fc7cd1/go.mod h1:9tjilg8BloeKEkVJvy golang.org/x/net v0.0.0-20210421230115-4e50805a0758/go.mod h1:72T/g9IO56b78aLF+1Kcs5dz7/ng1VjMUvfKvpfy+jM= golang.org/x/net v0.0.0-20210423184538-5f58ad60dda6/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= -golang.org/x/net v0.0.0-20210510120150-4163338589ed/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211008194852-3b03d305991f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= @@ -1960,8 +1960,8 @@ golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= -golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4= -golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= +golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= +golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -2064,7 +2064,6 @@ golang.org/x/sys v0.0.0-20210420072515-93ed5bcd2bfe/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210616045830-e2b7044e8c71/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -2092,9 +2091,9 @@ golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= +golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20201210144234-2321bbc49cbf/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= @@ -2104,8 +2103,8 @@ golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= golang.org/x/term v0.12.0/go.mod h1:owVbMEjm3cBLCHdkQu9b1opXd4ETQWc3BhuQGKgXgvU= -golang.org/x/term v0.18.0 h1:FcHjZXDMxI8mM3nwhX9HlKop4C0YQvCVCdwYl2wOtE8= -golang.org/x/term v0.18.0/go.mod h1:ILwASektA3OnRv7amZ1xhE/KTR+u50pbXfZ03+6Nx58= +golang.org/x/term v0.19.0 h1:+ThwsDv+tYfnJFhF4L8jITxu1tdTWRTZpdsWgEgjL6Q= +golang.org/x/term v0.19.0/go.mod h1:2CuTdWZ7KHSQwUzKva0cbMg6q2DMI3Mmxp+gKJbskEk= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -2180,7 +2179,6 @@ golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWc golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200601175630-2caf76543d99/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= @@ -2196,6 +2194,7 @@ golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4f golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= golang.org/x/tools v0.18.0 h1:k8NLag8AGHnn+PHbl7g43CtqZAwG60vZkLqgyZgIHgQ= diff --git a/integration-tests/load/go.mod b/integration-tests/load/go.mod index da76545c616..eaf0332af63 100644 --- a/integration-tests/load/go.mod +++ b/integration-tests/load/go.mod @@ -16,11 +16,11 @@ require ( github.com/rs/zerolog v1.30.0 github.com/slack-go/slack v0.12.2 github.com/smartcontractkit/chainlink-automation v1.0.3 - github.com/smartcontractkit/chainlink-common v0.1.7-0.20240419105123-fc5d616c7d2e - github.com/smartcontractkit/chainlink-testing-framework v1.28.3 + github.com/smartcontractkit/chainlink-common v0.1.7-0.20240419205832-845fa69af8d9 + github.com/smartcontractkit/chainlink-testing-framework v1.28.4 github.com/smartcontractkit/chainlink/integration-tests v0.0.0-20240214231432-4ad5eb95178c github.com/smartcontractkit/chainlink/v2 v2.9.0-beta0.0.20240216210048-da02459ddad8 - github.com/smartcontractkit/libocr v0.0.0-20240326191951-2bbe9382d052 + github.com/smartcontractkit/libocr v0.0.0-20240419185742-fd3cab206b2c github.com/smartcontractkit/seth v0.1.6 github.com/smartcontractkit/tdh2/go/tdh2 v0.0.0-20230906073235-9e478e5e19f1 github.com/smartcontractkit/wasp v0.4.6 @@ -72,7 +72,6 @@ require ( github.com/aws/aws-sdk-go v1.45.25 // indirect github.com/aws/constructs-go/constructs/v10 v10.1.255 // indirect github.com/aws/jsii-runtime-go v1.75.0 // indirect - github.com/aybabtme/rgbterm v0.0.0-20170906152045-cc83f3b3ce59 // indirect github.com/bahlo/generic-list-go v0.2.0 // indirect github.com/barkimedes/go-deepcopy v0.0.0-20220514131651-17c30cfc62df // indirect github.com/benbjohnson/clock v1.3.5 // indirect @@ -138,7 +137,7 @@ require ( github.com/docker/go-units v0.5.0 // indirect github.com/dominikbraun/graph v0.23.0 // indirect github.com/dustin/go-humanize v1.0.1 // indirect - github.com/dvsekhvalnov/jose2go v1.5.0 // indirect + github.com/dvsekhvalnov/jose2go v1.7.0 // indirect github.com/edsrzf/mmap-go v1.1.0 // indirect github.com/emicklei/go-restful/v3 v3.10.2 // indirect github.com/esote/minmaxheap v1.0.0 // indirect @@ -154,8 +153,8 @@ require ( github.com/fvbommel/sortorder v1.0.2 // indirect github.com/fxamacker/cbor/v2 v2.5.0 // indirect github.com/gabriel-vasile/mimetype v1.4.2 // indirect - github.com/gagliardetto/binary v0.7.1 // indirect - github.com/gagliardetto/solana-go v1.4.1-0.20220428092759-5250b4abbb27 // indirect + github.com/gagliardetto/binary v0.7.7 // indirect + github.com/gagliardetto/solana-go v1.8.4 // indirect github.com/gagliardetto/treeout v0.1.4 // indirect github.com/gballet/go-libpcsclite v0.0.0-20191108122812-4678299bea08 // indirect github.com/gballet/go-verkle v0.1.1-0.20231031103413-a67434b50f46 // indirect @@ -362,15 +361,15 @@ require ( github.com/segmentio/ksuid v1.0.4 // indirect github.com/sercand/kuberesolver/v5 v5.1.1 // indirect github.com/shirou/gopsutil v3.21.11+incompatible // indirect - github.com/shirou/gopsutil/v3 v3.23.12 // indirect + github.com/shirou/gopsutil/v3 v3.24.3 // indirect github.com/shoenig/go-m1cpu v0.1.6 // indirect github.com/shopspring/decimal v1.3.1 // indirect github.com/sirupsen/logrus v1.9.3 // indirect github.com/smartcontractkit/chain-selectors v1.0.10 // indirect github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240419131812-73d148593d92 // indirect github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240220203239-09be0ea34540 // indirect - github.com/smartcontractkit/chainlink-feeds v0.0.0-20240119021347-3c541a78cdb8 // indirect - github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240216142700-c5869534c19e // indirect + github.com/smartcontractkit/chainlink-feeds v0.0.0-20240422130241-13c17a91b2ab // indirect + github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240422172640-59d47c73ba58 // indirect github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240325075535-0f7eb05ee595 // indirect github.com/smartcontractkit/chainlink-testing-framework/grafana v0.0.0-20240227164431-18a7065e23ea // indirect github.com/smartcontractkit/chainlink-vrf v0.0.0-20240222010609-cd67d123c772 // indirect @@ -385,6 +384,7 @@ require ( github.com/spf13/pflag v1.0.5 // indirect github.com/spf13/viper v1.15.0 // indirect github.com/status-im/keycard-go v0.2.0 // indirect + github.com/streamingfast/logging v0.0.0-20220405224725-2755dab2ce75 // indirect github.com/stretchr/objx v0.5.2 // indirect github.com/subosito/gotenv v1.4.2 // indirect github.com/supranational/blst v0.3.11 // indirect @@ -412,7 +412,7 @@ require ( github.com/wk8/go-ordered-map/v2 v2.1.8 // indirect github.com/x448/float16 v0.8.4 // indirect github.com/xlab/treeprint v1.1.0 // indirect - github.com/yusufpapurcu/wmi v1.2.3 // indirect + github.com/yusufpapurcu/wmi v1.2.4 // indirect github.com/zondax/hid v0.9.1 // indirect github.com/zondax/ledger-go v0.14.1 // indirect go.dedis.ch/fixbuf v1.0.3 // indirect @@ -421,7 +421,7 @@ require ( go.etcd.io/etcd/api/v3 v3.5.7 // indirect go.etcd.io/etcd/client/pkg/v3 v3.5.7 // indirect go.etcd.io/etcd/client/v3 v3.5.7 // indirect - go.mongodb.org/mongo-driver v1.12.0 // indirect + go.mongodb.org/mongo-driver v1.15.0 // indirect go.opencensus.io v0.24.0 // indirect go.opentelemetry.io/collector/pdata v1.0.0-rcv0016 // indirect go.opentelemetry.io/collector/semconv v0.87.0 // indirect @@ -441,14 +441,14 @@ require ( go.uber.org/zap v1.26.0 // indirect go4.org/netipx v0.0.0-20230125063823-8449b0a6169f // indirect golang.org/x/arch v0.7.0 // indirect - golang.org/x/crypto v0.21.0 // indirect + golang.org/x/crypto v0.22.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/net v0.24.0 // indirect golang.org/x/oauth2 v0.17.0 // indirect golang.org/x/sync v0.6.0 // indirect - golang.org/x/sys v0.18.0 // indirect - golang.org/x/term v0.18.0 // indirect + golang.org/x/sys v0.19.0 // indirect + golang.org/x/term v0.19.0 // indirect golang.org/x/text v0.14.0 // indirect golang.org/x/time v0.5.0 // indirect golang.org/x/tools v0.18.0 // indirect diff --git a/integration-tests/load/go.sum b/integration-tests/load/go.sum index cdb5a488d37..631336409b3 100644 --- a/integration-tests/load/go.sum +++ b/integration-tests/load/go.sum @@ -216,13 +216,12 @@ github.com/aws/constructs-go/constructs/v10 v10.1.255 h1:5hARfEmhBqHSTQf/C3QLA3s github.com/aws/constructs-go/constructs/v10 v10.1.255/go.mod h1:DCdBSjN04Ck2pajCacTD4RKFqSA7Utya8d62XreYctI= github.com/aws/jsii-runtime-go v1.75.0 h1:NhpUfyiL7/wsRuUekFsz8FFBCYLfPD/l61kKg9kL/a4= github.com/aws/jsii-runtime-go v1.75.0/go.mod h1:TKCyrtM0pygEPo4rDZzbMSDNCDNTSYSN6/mGyHI6O3I= -github.com/aybabtme/rgbterm v0.0.0-20170906152045-cc83f3b3ce59 h1:WWB576BN5zNSZc/M9d/10pqEx5VHNhaQ/yOVAkmj5Yo= -github.com/aybabtme/rgbterm v0.0.0-20170906152045-cc83f3b3ce59/go.mod h1:q/89r3U2H7sSsE2t6Kca0lfwTK8JdoNGS/yzM/4iH5I= github.com/aymerick/raymond v2.0.3-0.20180322193309-b565731e1464+incompatible/go.mod h1:osfaiScAUVup+UC9Nfq76eWqDhXlp+4UYaA8uhTBO6g= github.com/bahlo/generic-list-go v0.2.0 h1:5sz/EEAK+ls5wF+NeqDpk5+iNdMDXrh3z3nPnH1Wvgk= github.com/bahlo/generic-list-go v0.2.0/go.mod h1:2KvAjgMlE5NNynlg/5iLrrCCZ2+5xWbdbCW3pNTGyYg= github.com/barkimedes/go-deepcopy v0.0.0-20220514131651-17c30cfc62df h1:GSoSVRLoBaFpOOds6QyY1L8AX7uoY+Ln3BHc22W40X0= github.com/barkimedes/go-deepcopy v0.0.0-20220514131651-17c30cfc62df/go.mod h1:hiVxq5OP2bUGBRNS3Z/bt/reCLFNbdcST6gISi1fiOM= +github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/benbjohnson/clock v1.3.5 h1:VvXlSJBzZpA/zum6Sj74hxwYI2DIxRWuNIoXAzHZz5o= github.com/benbjohnson/clock v1.3.5/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= @@ -448,8 +447,8 @@ github.com/dominikbraun/graph v0.23.0/go.mod h1:yOjYyogZLY1LSG9E33JWZJiq5k83Qy2C github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= -github.com/dvsekhvalnov/jose2go v1.5.0 h1:3j8ya4Z4kMCwT5nXIKFSV84YS+HdqSSO0VsTQxaLAeM= -github.com/dvsekhvalnov/jose2go v1.5.0/go.mod h1:QsHjhyTlD/lAVqn/NSbVZmSCGeDehTB/mPZadG+mhXU= +github.com/dvsekhvalnov/jose2go v1.7.0 h1:bnQc8+GMnidJZA8zc6lLEAb4xNrIqHwO+9TzqvtQZPo= +github.com/dvsekhvalnov/jose2go v1.7.0/go.mod h1:QsHjhyTlD/lAVqn/NSbVZmSCGeDehTB/mPZadG+mhXU= github.com/edsrzf/mmap-go v1.1.0 h1:6EUwBLQ/Mcr1EYLE4Tn1VdW1A4ckqCQWZBw8Hr0kjpQ= github.com/edsrzf/mmap-go v1.1.0/go.mod h1:19H/e8pUPLicwkyNgOykDXkJ9F0MHE+Z52B8EIth78Q= github.com/eknkc/amber v0.0.0-20171010120322-cdade1c07385/go.mod h1:0vRUJqYpeSZifjYj7uP3BG/gKcuzL9xWVV/Y+cK33KM= @@ -518,13 +517,12 @@ github.com/fxamacker/cbor/v2 v2.5.0 h1:oHsG0V/Q6E/wqTS2O1Cozzsy69nqCiguo5Q1a1ADi github.com/fxamacker/cbor/v2 v2.5.0/go.mod h1:TA1xS00nchWmaBnEIxPSE5oHLuJBAVvqrtAnWBwBCVo= github.com/gabriel-vasile/mimetype v1.4.2 h1:w5qFW6JKBz9Y393Y4q372O9A7cUSequkh1Q7OhCmWKU= github.com/gabriel-vasile/mimetype v1.4.2/go.mod h1:zApsH/mKG4w07erKIaJPFiX0Tsq9BFQgN3qGY5GnNgA= -github.com/gagliardetto/binary v0.6.1/go.mod h1:aOfYkc20U0deHaHn/LVZXiqlkDbFAX0FpTlDhsXa0S0= -github.com/gagliardetto/binary v0.7.1 h1:6ggDQ26vR+4xEvl/S13NcdLK3MUCi4oSy73pS9aI1cI= -github.com/gagliardetto/binary v0.7.1/go.mod h1:aOfYkc20U0deHaHn/LVZXiqlkDbFAX0FpTlDhsXa0S0= +github.com/gagliardetto/binary v0.7.7 h1:QZpT38+sgoPg+TIQjH94sLbl/vX+nlIRA37pEyOsjfY= +github.com/gagliardetto/binary v0.7.7/go.mod h1:mUuay5LL8wFVnIlecHakSZMvcdqfs+CsotR5n77kyjM= github.com/gagliardetto/gofuzz v1.2.2 h1:XL/8qDMzcgvR4+CyRQW9UGdwPRPMHVJfqQ/uMvSUuQw= github.com/gagliardetto/gofuzz v1.2.2/go.mod h1:bkH/3hYLZrMLbfYWA0pWzXmi5TTRZnu4pMGZBkqMKvY= -github.com/gagliardetto/solana-go v1.4.1-0.20220428092759-5250b4abbb27 h1:q2IztKyRQUxJ6abXRsawaBtvDFvM+szj4jDqV4od1gs= -github.com/gagliardetto/solana-go v1.4.1-0.20220428092759-5250b4abbb27/go.mod h1:NFuoDwHPvw858ZMHUJr6bkhN8qHt4x6e+U3EYHxAwNY= +github.com/gagliardetto/solana-go v1.8.4 h1:vmD/JmTlonyXGy39bAo0inMhmbdAwV7rXZtLDMZeodE= +github.com/gagliardetto/solana-go v1.8.4/go.mod h1:i+7aAyNDTHG0jK8GZIBSI4OVvDqkt2Qx+LklYclRNG8= github.com/gagliardetto/treeout v0.1.4 h1:ozeYerrLCmCubo1TcIjFiOWTTGteOOHND1twdFpgwaw= github.com/gagliardetto/treeout v0.1.4/go.mod h1:loUefvXTrlRG5rYmJmExNryyBRh8f89VZhmMOyCyqok= github.com/gavv/httpexpect v2.0.0+incompatible/go.mod h1:x+9tiU1YnrOvnB725RkpoLv1M62hOWzwo5OXotisrKc= @@ -1478,8 +1476,8 @@ github.com/sethvargo/go-retry v0.2.4 h1:T+jHEQy/zKJf5s95UkguisicE0zuF9y7+/vgz08O github.com/sethvargo/go-retry v0.2.4/go.mod h1:1afjQuvh7s4gflMObvjLPaWgluLLyhA1wmVZ6KLpICw= github.com/shirou/gopsutil v3.21.11+incompatible h1:+1+c1VGhc88SSonWP6foOcLhvnKlUeu/erjjvaPEYiI= github.com/shirou/gopsutil v3.21.11+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= -github.com/shirou/gopsutil/v3 v3.23.12 h1:z90NtUkp3bMtmICZKpC4+WaknU1eXtp5vtbQ11DgpE4= -github.com/shirou/gopsutil/v3 v3.23.12/go.mod h1:1FrWgea594Jp7qmjHUUPlJDTPgcsb9mGnXDxavtikzM= +github.com/shirou/gopsutil/v3 v3.24.3 h1:eoUGJSmdfLzJ3mxIhmOAhgKEKgQkeOwKpz1NbhVnuPE= +github.com/shirou/gopsutil/v3 v3.24.3/go.mod h1:JpND7O217xa72ewWz9zN2eIIkPWsDN/3pl0H8Qt0uwg= github.com/shoenig/go-m1cpu v0.1.6 h1:nxdKQNcEB6vzgA2E2bvzKIYRuNj7XNJ4S/aRSwKzFtM= github.com/shoenig/go-m1cpu v0.1.6/go.mod h1:1JJMcUBvfNwpq05QDQVAnx3gUHr9IYF7GNg9SUEw2VQ= github.com/shoenig/test v0.6.4 h1:kVTaSd7WLz5WZ2IaoM0RSzRsUD+m8wRR+5qvntpn4LU= @@ -1502,20 +1500,20 @@ github.com/smartcontractkit/chain-selectors v1.0.10 h1:t9kJeE6B6G+hKD0GYR4kGJSCq github.com/smartcontractkit/chain-selectors v1.0.10/go.mod h1:d4Hi+E1zqjy9HqMkjBE5q1vcG9VGgxf5VxiRHfzi2kE= github.com/smartcontractkit/chainlink-automation v1.0.3 h1:h/ijT0NiyV06VxYVgcNfsE3+8OEzT3Q0Z9au0z1BPWs= github.com/smartcontractkit/chainlink-automation v1.0.3/go.mod h1:RjboV0Qd7YP+To+OrzHGXaxUxoSONveCoAK2TQ1INLU= -github.com/smartcontractkit/chainlink-common v0.1.7-0.20240419105123-fc5d616c7d2e h1:nHs5mFOR7FPII20GrCGIPywDW43MhEUlD7DqHnTgu6Q= -github.com/smartcontractkit/chainlink-common v0.1.7-0.20240419105123-fc5d616c7d2e/go.mod h1:GTDBbovHUSAUk+fuGIySF2A/whhdtHGaWmU61BoERks= +github.com/smartcontractkit/chainlink-common v0.1.7-0.20240419205832-845fa69af8d9 h1:elDIBChe7ByPNvCyrSjMLTPKrgY+sKgzzlWe2p3wokY= +github.com/smartcontractkit/chainlink-common v0.1.7-0.20240419205832-845fa69af8d9/go.mod h1:GTDBbovHUSAUk+fuGIySF2A/whhdtHGaWmU61BoERks= github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240419131812-73d148593d92 h1:MvaNzuaQh1vX4CAYLM8qFd99cf0ZF1JNwtDZtLU7WvU= github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240419131812-73d148593d92/go.mod h1:uATrrJ8IsuBkOBJ46USuf73gz9gZy5k5bzGE5/ji/rc= github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240220203239-09be0ea34540 h1:xFSv8561jsLtF6gYZr/zW2z5qUUAkcFkApin2mnbYTo= github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240220203239-09be0ea34540/go.mod h1:sjAmX8K2kbQhvDarZE1ZZgDgmHJ50s0BBc/66vKY2ek= -github.com/smartcontractkit/chainlink-feeds v0.0.0-20240119021347-3c541a78cdb8 h1:1BcjXuviSAKttOX7BZoVHRZZGfxqoA2+AL8tykmkdoc= -github.com/smartcontractkit/chainlink-feeds v0.0.0-20240119021347-3c541a78cdb8/go.mod h1:vy1L7NybTy2F/Yv7BOh+oZBa1MACD6gzd1+DkcSkfp8= -github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240216142700-c5869534c19e h1:k8HS3GsAFZnxXIW3141VsQP2+EL1XrTtOi/HDt7sdBE= -github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240216142700-c5869534c19e/go.mod h1:JiykN+8W5TA4UD2ClrzQCVvcH3NcyLEVv7RwY0busrw= +github.com/smartcontractkit/chainlink-feeds v0.0.0-20240422130241-13c17a91b2ab h1:Ct1oUlyn03HDUVdFHJqtRGRUujMqdoMzvf/Cjhe30Ag= +github.com/smartcontractkit/chainlink-feeds v0.0.0-20240422130241-13c17a91b2ab/go.mod h1:RPUY7r8GxgzXxS1ijtU1P/fpJomOXztXgUbEziNmbCA= +github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240422172640-59d47c73ba58 h1:jc4ab5QrKZfkICyxJysCt7mSExuSPbePjgZsnJR3nRQ= +github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240422172640-59d47c73ba58/go.mod h1:oV5gIuSKrPEcjQ6uB6smBsm5kXHxyydVLNyAs4V9CoQ= github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240325075535-0f7eb05ee595 h1:y6ks0HsSOhPUueOmTcoxDQ50RCS1XINlRDTemZyHjFw= github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240325075535-0f7eb05ee595/go.mod h1:vV6WfnVIbK5Q1JsIru4YcTG0T1uRpLJm6t2BgCnCSsg= -github.com/smartcontractkit/chainlink-testing-framework v1.28.3 h1:rZ622PUSE9jJvI2g1SNNcMJedXyMzq9XJ8SbV2j9TvA= -github.com/smartcontractkit/chainlink-testing-framework v1.28.3/go.mod h1:jN+HgXbriq6fKRlIqLw9F3I81aYImV6kBJkIfz0mdIA= +github.com/smartcontractkit/chainlink-testing-framework v1.28.4 h1:/OOPH76VFQlG5HEXrXgBVDv1fjuasQzMV1EyeaaXWzM= +github.com/smartcontractkit/chainlink-testing-framework v1.28.4/go.mod h1:jN+HgXbriq6fKRlIqLw9F3I81aYImV6kBJkIfz0mdIA= github.com/smartcontractkit/chainlink-testing-framework/grafana v0.0.0-20240227164431-18a7065e23ea h1:ZdLmNAfKRjH8AYUvjiiDGUgiWQfq/7iNpxyTkvjx/ko= github.com/smartcontractkit/chainlink-testing-framework/grafana v0.0.0-20240227164431-18a7065e23ea/go.mod h1:gCKC9w6XpNk6jm+XIk2psrkkfxhi421N9NSiFceXW88= github.com/smartcontractkit/chainlink-vrf v0.0.0-20240222010609-cd67d123c772 h1:LQmRsrzzaYYN3wEU1l5tWiccznhvbyGnu2N+wHSXZAo= @@ -1524,8 +1522,8 @@ github.com/smartcontractkit/go-plugin v0.0.0-20231003134350-e49dad63b306 h1:ko88 github.com/smartcontractkit/go-plugin v0.0.0-20231003134350-e49dad63b306/go.mod h1:w1sAEES3g3PuV/RzUrgow20W2uErMly84hhD3um1WL4= github.com/smartcontractkit/grpc-proxy v0.0.0-20230731113816-f1be6620749f h1:hgJif132UCdjo8u43i7iPN1/MFnu49hv7lFGFftCHKU= github.com/smartcontractkit/grpc-proxy v0.0.0-20230731113816-f1be6620749f/go.mod h1:MvMXoufZAtqExNexqi4cjrNYE9MefKddKylxjS+//n0= -github.com/smartcontractkit/libocr v0.0.0-20240326191951-2bbe9382d052 h1:1WFjrrVrWoQ9UpVMh7Mx4jDpzhmo1h8hFUKd9awIhIU= -github.com/smartcontractkit/libocr v0.0.0-20240326191951-2bbe9382d052/go.mod h1:SJEZCHgMCAzzBvo9vMV2DQ9onfEcIJCYSViyP4JI6c4= +github.com/smartcontractkit/libocr v0.0.0-20240419185742-fd3cab206b2c h1:lIyMbTaF2H0Q71vkwZHX/Ew4KF2BxiKhqEXwF8rn+KI= +github.com/smartcontractkit/libocr v0.0.0-20240419185742-fd3cab206b2c/go.mod h1:fb1ZDVXACvu4frX3APHZaEBp0xi1DIm34DcA0CwTsZM= github.com/smartcontractkit/seth v0.1.6 h1:exU96KiKM/gxvp7OR8KkOXnTgbtFNepdhMBvyobFKCw= github.com/smartcontractkit/seth v0.1.6/go.mod h1:2TMOZQ8WTAw7rR1YBbXpnad6VmT/+xDd/nXLmB7Eero= github.com/smartcontractkit/tdh2/go/ocr2/decryptionplugin v0.0.0-20230906073235-9e478e5e19f1 h1:yiKnypAqP8l0OX0P3klzZ7SCcBUxy5KqTAKZmQOvSQE= @@ -1572,6 +1570,8 @@ github.com/spf13/viper v1.15.0/go.mod h1:fFcTBJxvhhzSJiZy8n+PeW6t8l+KeT/uTARa0jH github.com/status-im/keycard-go v0.2.0 h1:QDLFswOQu1r5jsycloeQh3bVU8n/NatHHaZobtDnDzA= github.com/status-im/keycard-go v0.2.0/go.mod h1:wlp8ZLbsmrF6g6WjugPAx+IzoLrkdf9+mHxBEeo3Hbg= github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= +github.com/streamingfast/logging v0.0.0-20220405224725-2755dab2ce75 h1:ZqpS7rAhhKD7S7DnrpEdrnW1/gZcv82ytpMviovkli4= +github.com/streamingfast/logging v0.0.0-20220405224725-2755dab2ce75/go.mod h1:VlduQ80JcGJSargkRU4Sg9Xo63wZD/l8A5NC/Uo1/uU= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= @@ -1676,10 +1676,8 @@ github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcY github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI= github.com/xdg-go/scram v1.0.2/go.mod h1:1WAq6h33pAW+iRreB34OORO2Nf7qel3VV3fjBj+hCSs= github.com/xdg-go/scram v1.1.1/go.mod h1:RaEWvsqvNKKvBPvcKeFjrG2cJqOkHTiyTpzz23ni57g= -github.com/xdg-go/scram v1.1.2/go.mod h1:RT/sEzTbU5y00aCK8UOx6R7YryM0iF1N2MOmC3kKLN4= github.com/xdg-go/stringprep v1.0.2/go.mod h1:8F9zXuvzgwmyT5DUm4GUfZGDdT3W+LCvS6+da4O5kxM= github.com/xdg-go/stringprep v1.0.3/go.mod h1:W3f5j4i+9rC0kuIEJL0ky1VpHXQU3ocBgklLGvcBnW8= -github.com/xdg-go/stringprep v1.0.4/go.mod h1:mPGuuIYwz7CmR2bT9j4GbQqutWS1zV24gijq1dTyGkM= github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= @@ -1702,8 +1700,8 @@ github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1 github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= github.com/yuin/gopher-lua v1.1.0 h1:BojcDhfyDWgU2f2TOzYK/g5p2gxMrku8oupLDqlnSqE= github.com/yuin/gopher-lua v1.1.0/go.mod h1:GBR0iDaNXjAgGg9zfCvksxSRnQx76gclCIb7kdAd1Pw= -github.com/yusufpapurcu/wmi v1.2.3 h1:E1ctvB7uKFMOJw3fdOW32DwGE9I7t++CRUEMKvFoFiw= -github.com/yusufpapurcu/wmi v1.2.3/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= +github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0= +github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= github.com/zenazn/goji v0.9.0/go.mod h1:7S9M489iMyHBNxwZnk9/EHS098H4/F6TATF2mIxtB1Q= github.com/zondax/hid v0.9.1 h1:gQe66rtmyZ8VeGFcOpbuH3r7erYtNEAezCAYu8LdkJo= github.com/zondax/hid v0.9.1/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= @@ -1731,8 +1729,9 @@ go.etcd.io/etcd/client/v3 v3.5.7/go.mod h1:sOWmj9DZUMyAngS7QQwCyAXXAL6WhgTOPLNS/ go.mongodb.org/mongo-driver v1.7.3/go.mod h1:NqaYOwnXWr5Pm7AOpO5QFxKJ503nbMse/R79oO62zWg= go.mongodb.org/mongo-driver v1.7.5/go.mod h1:VXEWRZ6URJIkUq2SCAyapmhH0ZLRBP+FT4xhp5Zvxng= go.mongodb.org/mongo-driver v1.10.0/go.mod h1:wsihk0Kdgv8Kqu1Anit4sfK+22vSFbUrAVEYRhCXrA8= -go.mongodb.org/mongo-driver v1.12.0 h1:aPx33jmn/rQuJXPQLZQ8NtfPQG8CaqgLThFtqRb0PiE= -go.mongodb.org/mongo-driver v1.12.0/go.mod h1:AZkxhPnFJUoH7kZlFkVKucV20K387miPfm7oimrSmK0= +go.mongodb.org/mongo-driver v1.11.0/go.mod h1:s7p5vEtfbeR1gYi6pnj3c3/urpbLv2T5Sfd6Rp2HBB8= +go.mongodb.org/mongo-driver v1.15.0 h1:rJCKC8eEliewXjZGf0ddURtl7tTVy1TK3bfl0gkUSLc= +go.mongodb.org/mongo-driver v1.15.0/go.mod h1:Vzb0Mk/pa7e6cWw85R4F/endUC3u0U9jGcNU603k65c= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.1/go.mod h1:Ap50jQcDJrx6rB6VgeeFPtuPIf3wMRvRfrfYDO6+BmA= @@ -1782,6 +1781,7 @@ go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE= go.uber.org/atomic v1.11.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= +go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= @@ -1799,6 +1799,7 @@ go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= go.uber.org/zap v1.14.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= go.uber.org/zap v1.16.0/go.mod h1:MA8QOfq0BHJwdXa996Y4dYkAqRKB8/1K1QMMZVaNZjQ= +go.uber.org/zap v1.21.0/go.mod h1:wjWOCqI0f2ZZrJF/UufIOkiC8ii6tm1iqIsLo76RfJw= go.uber.org/zap v1.26.0 h1:sI7k6L95XOKS281NhVKOFCUNIvv9e0w4BF8N3u+tCRo= go.uber.org/zap v1.26.0/go.mod h1:dtElttAiwGvoJ/vj4IwHBS/gXsEu/pZ50mUIRWuG0so= go4.org/netipx v0.0.0-20230125063823-8449b0a6169f h1:ketMxHg+vWm3yccyYiq+uK8D3fRmna2Fcj+awpQp84s= @@ -1828,18 +1829,18 @@ golang.org/x/crypto v0.0.0-20201203163018-be400aefbc4c/go.mod h1:jdWPYTVW3xRLrWP golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= -golang.org/x/crypto v0.0.0-20210513164829-c07d793c2f9a/go.mod h1:P+XmwS30IXTQdn5tA2iutPOUgjI07+tq3H3K9MVA1s8= golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20220214200702-86341886e292/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.3.0/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc= golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= -golang.org/x/crypto v0.21.0 h1:X31++rzVUdKhX5sWmSOFZxx8UW/ldWx55cbf08iNAMA= -golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs= +golang.org/x/crypto v0.22.0 h1:g1v0xeRhjcugydODzvb3mEM9SQ0HGp9s/nh3COQ/C30= +golang.org/x/crypto v0.22.0/go.mod h1:vr6Su+7cTlO45qkww3VDJlzDn0ctJvRgYbC2NvXHt+M= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -1933,7 +1934,6 @@ golang.org/x/net v0.0.0-20210410081132-afb366fc7cd1/go.mod h1:9tjilg8BloeKEkVJvy golang.org/x/net v0.0.0-20210421230115-4e50805a0758/go.mod h1:72T/g9IO56b78aLF+1Kcs5dz7/ng1VjMUvfKvpfy+jM= golang.org/x/net v0.0.0-20210423184538-5f58ad60dda6/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= -golang.org/x/net v0.0.0-20210510120150-4163338589ed/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211008194852-3b03d305991f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= @@ -1946,8 +1946,8 @@ golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= -golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4= -golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= +golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= +golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -2049,7 +2049,6 @@ golang.org/x/sys v0.0.0-20210420072515-93ed5bcd2bfe/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210616045830-e2b7044e8c71/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -2077,9 +2076,9 @@ golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= +golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20201210144234-2321bbc49cbf/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= @@ -2090,8 +2089,8 @@ golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= golang.org/x/term v0.12.0/go.mod h1:owVbMEjm3cBLCHdkQu9b1opXd4ETQWc3BhuQGKgXgvU= golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= -golang.org/x/term v0.18.0 h1:FcHjZXDMxI8mM3nwhX9HlKop4C0YQvCVCdwYl2wOtE8= -golang.org/x/term v0.18.0/go.mod h1:ILwASektA3OnRv7amZ1xhE/KTR+u50pbXfZ03+6Nx58= +golang.org/x/term v0.19.0 h1:+ThwsDv+tYfnJFhF4L8jITxu1tdTWRTZpdsWgEgjL6Q= +golang.org/x/term v0.19.0/go.mod h1:2CuTdWZ7KHSQwUzKva0cbMg6q2DMI3Mmxp+gKJbskEk= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -2167,7 +2166,6 @@ golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWc golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200601175630-2caf76543d99/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= @@ -2183,6 +2181,7 @@ golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4f golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= golang.org/x/tools v0.18.0 h1:k8NLag8AGHnn+PHbl7g43CtqZAwG60vZkLqgyZgIHgQ= diff --git a/integration-tests/load/ocr/README.md b/integration-tests/load/ocr/README.md index 61951ba700f..e63828a7d93 100644 --- a/integration-tests/load/ocr/README.md +++ b/integration-tests/load/ocr/README.md @@ -13,7 +13,7 @@ sudo kubefwd svc -n cl-cluster Change environment connection configuration [here](../../../charts/chainlink-cluster/connect.toml) -If you haven't changed anything in [devspace.yaml](../../../charts/chainlink-cluster/devspace.yaml) then default connection configuration will work +If you haven't changed anything in [devspace.yaml](../../crib/devspace.yaml) then default connection configuration will work ## Usage diff --git a/integration-tests/load/vrfv2/vrfv2_test.go b/integration-tests/load/vrfv2/vrfv2_test.go index e420d66ec8c..ca41dd40ea9 100644 --- a/integration-tests/load/vrfv2/vrfv2_test.go +++ b/integration-tests/load/vrfv2/vrfv2_test.go @@ -86,7 +86,7 @@ func TestVRFV2Performance(t *testing.T) { } } if !*vrfv2Config.General.UseExistingEnv { - if err := testEnv.Cleanup(); err != nil { + if err := testEnv.Cleanup(test_env.CleanupOpts{}); err != nil { l.Error().Err(err).Msg("Error cleaning up test environment") } } @@ -230,7 +230,7 @@ func TestVRFV2BHSPerformance(t *testing.T) { } } if !*vrfv2Config.General.UseExistingEnv { - if err := testEnv.Cleanup(); err != nil { + if err := testEnv.Cleanup(test_env.CleanupOpts{}); err != nil { l.Error().Err(err).Msg("Error cleaning up test environment") } } diff --git a/integration-tests/load/vrfv2plus/vrfv2plus_test.go b/integration-tests/load/vrfv2plus/vrfv2plus_test.go index d461b4cde20..e24b2ff17d8 100644 --- a/integration-tests/load/vrfv2plus/vrfv2plus_test.go +++ b/integration-tests/load/vrfv2plus/vrfv2plus_test.go @@ -86,7 +86,7 @@ func TestVRFV2PlusPerformance(t *testing.T) { } } if !*testConfig.VRFv2Plus.General.UseExistingEnv { - if err := testEnv.Cleanup(); err != nil { + if err := testEnv.Cleanup(test_env.CleanupOpts{}); err != nil { l.Error().Err(err).Msg("Error cleaning up test environment") } } @@ -229,7 +229,7 @@ func TestVRFV2PlusBHSPerformance(t *testing.T) { } } if !*testConfig.VRFv2Plus.General.UseExistingEnv { - if err := testEnv.Cleanup(); err != nil { + if err := testEnv.Cleanup(test_env.CleanupOpts{}); err != nil { l.Error().Err(err).Msg("Error cleaning up test environment") } } diff --git a/integration-tests/scripts/show_coverage.go b/integration-tests/scripts/show_coverage.go new file mode 100644 index 00000000000..0491ec744a2 --- /dev/null +++ b/integration-tests/scripts/show_coverage.go @@ -0,0 +1,78 @@ +package main + +import ( + "fmt" + "os" + "os/exec" + "path/filepath" + "strings" +) + +// main manages the process of combining coverage data for all tests +func main() { + // Check if the user has provided an argument + if len(os.Args) < 2 { + fmt.Println("Usage: go run script.go ") + os.Exit(1) + } + + // First argument after the program name is the search pattern + searchPattern := os.Args[1] + + // Glob pattern to find all 'merged' directories in artifact folders + dirs, err := filepath.Glob(searchPattern) + if err != nil { + fmt.Printf("Failed to find directories: %v\n", err) + os.Exit(1) + } + + if len(dirs) == 0 { + fmt.Println("No directories found.") + return + } + + fmt.Printf("Found directories with test coverage data: %v\n", dirs) + + // Join the directory paths for input + dirInput := strings.Join(dirs, ",") + + // Ensure the merged directory exists + mergedDir := filepath.Join(".covdata", "merged") + if err := os.MkdirAll(mergedDir, 0755); err != nil { + fmt.Printf("Failed to create merged directory %s: %v\n", mergedDir, err) + os.Exit(1) + } + + // Merge the coverage data from all chainlink nodes + mergeCmd := exec.Command("go", "tool", "covdata", "merge", "-o", mergedDir, "-i="+dirInput) + fmt.Printf("Merging coverage data for all tests:\n%s\n", mergeCmd.String()) + output, err := mergeCmd.CombinedOutput() + if err != nil { + fmt.Printf("Error executing merge command: %v, output: %s\n", err, output) + os.Exit(1) + } + + // Calculate coverage percentage in the merged directory + coverageCmd := exec.Command("go", "tool", "covdata", "percent", "-i=.") + coverageCmd.Dir = mergedDir + fmt.Printf("Calculate total coverage for on all tests: %s\n", coverageCmd.String()) + coverageOutput, err := coverageCmd.CombinedOutput() + if err != nil { + fmt.Printf("Error calculating coverage percentage: %v\n", err) + os.Exit(1) + } + + // Save the coverage percentage to a file + filePath, err := filepath.Abs(filepath.Join(mergedDir, "percentage.txt")) + if err != nil { + fmt.Printf("Error obtaining absolute path: %s\n", err) + os.Exit(1) + } + if err := os.WriteFile(filePath, coverageOutput, 0600); err != nil { + fmt.Printf("Failed to write coverage percentage to file: %v\n", err) + os.Exit(1) + } + fmt.Printf("Total coverage for all tests saved to %s\n", filePath) + + fmt.Printf("Total coverage for all tests:\n%s\n", string(coverageOutput)) +} diff --git a/integration-tests/smoke/vrfv2_test.go b/integration-tests/smoke/vrfv2_test.go index be29ba45182..62c5dc84fe6 100644 --- a/integration-tests/smoke/vrfv2_test.go +++ b/integration-tests/smoke/vrfv2_test.go @@ -63,7 +63,7 @@ func TestVRFv2Basic(t *testing.T) { } } if !*vrfv2Config.General.UseExistingEnv { - if err := testEnv.Cleanup(); err != nil { + if err := testEnv.Cleanup(test_env.CleanupOpts{}); err != nil { l.Error().Err(err).Msg("Error cleaning up test environment") } } @@ -556,7 +556,7 @@ func TestVRFv2MultipleSendingKeys(t *testing.T) { } } if !*vrfv2Config.General.UseExistingEnv { - if err := testEnv.Cleanup(); err != nil { + if err := testEnv.Cleanup(test_env.CleanupOpts{}); err != nil { l.Error().Err(err).Msg("Error cleaning up test environment") } } @@ -664,7 +664,7 @@ func TestVRFOwner(t *testing.T) { } } if !*vrfv2Config.General.UseExistingEnv { - if err := testEnv.Cleanup(); err != nil { + if err := testEnv.Cleanup(test_env.CleanupOpts{}); err != nil { l.Error().Err(err).Msg("Error cleaning up test environment") } } @@ -772,7 +772,7 @@ func TestVRFOwner(t *testing.T) { require.Equal(t, *configCopy.VRFv2.General.MinimumConfirmations, coordinatorConfig.MinimumRequestConfirmations) require.Equal(t, *configCopy.VRFv2.General.FulfillmentFlatFeeLinkPPMTier1, coordinatorFeeConfig.FulfillmentFlatFeeLinkPPMTier1) require.Equal(t, *configCopy.VRFv2.General.ReqsForTier2, coordinatorFeeConfig.ReqsForTier2.Int64()) - require.Equal(t, *configCopy.VRFv2.General.FallbackWeiPerUnitLink, coordinatorFallbackWeiPerUnitLinkConfig.Int64()) + require.Equal(t, *configCopy.VRFv2.General.FallbackWeiPerUnitLink, coordinatorFallbackWeiPerUnitLinkConfig.String()) }) } @@ -807,7 +807,7 @@ func TestVRFV2WithBHS(t *testing.T) { } } if !*vrfv2Config.General.UseExistingEnv { - if err := testEnv.Cleanup(); err != nil { + if err := testEnv.Cleanup(test_env.CleanupOpts{}); err != nil { l.Error().Err(err).Msg("Error cleaning up test environment") } } diff --git a/integration-tests/smoke/vrfv2plus_test.go b/integration-tests/smoke/vrfv2plus_test.go index 20871a12b77..c535e77ef62 100644 --- a/integration-tests/smoke/vrfv2plus_test.go +++ b/integration-tests/smoke/vrfv2plus_test.go @@ -64,7 +64,7 @@ func TestVRFv2Plus(t *testing.T) { } } if !*vrfv2PlusConfig.General.UseExistingEnv { - if err := env.Cleanup(); err != nil { + if err := env.Cleanup(test_env.CleanupOpts{}); err != nil { l.Error().Err(err).Msg("Error cleaning up test environment") } } @@ -105,9 +105,6 @@ func TestVRFv2Plus(t *testing.T) { subBalanceBeforeRequest := subscription.Balance - jobRunsBeforeTest, err := nodeTypeToNodeMap[vrfcommon.VRF].CLNode.API.MustReadRunsByJob(nodeTypeToNodeMap[vrfcommon.VRF].Job.Data.ID) - require.NoError(t, err, "error reading job runs") - // test and assert randomWordsFulfilledEvent, err := vrfv2plus.RequestRandomnessAndWaitForFulfillment( consumers[0], @@ -130,10 +127,6 @@ func TestVRFv2Plus(t *testing.T) { subBalanceAfterRequest := subscription.Balance require.Equal(t, expectedSubBalanceJuels, subBalanceAfterRequest) - jobRuns, err := nodeTypeToNodeMap[vrfcommon.VRF].CLNode.API.MustReadRunsByJob(nodeTypeToNodeMap[vrfcommon.VRF].Job.Data.ID) - require.NoError(t, err, "error reading job runs") - require.Equal(t, len(jobRunsBeforeTest.Data)+1, len(jobRuns.Data)) - status, err := consumers[0].GetRequestStatus(testcontext.Get(t), randomWordsFulfilledEvent.RequestId) require.NoError(t, err, "error getting rand request status") require.True(t, status.Fulfilled) @@ -169,9 +162,6 @@ func TestVRFv2Plus(t *testing.T) { subNativeTokenBalanceBeforeRequest := subscription.NativeBalance - jobRunsBeforeTest, err := nodeTypeToNodeMap[vrfcommon.VRF].CLNode.API.MustReadRunsByJob(nodeTypeToNodeMap[vrfcommon.VRF].Job.Data.ID) - require.NoError(t, err, "error reading job runs") - // test and assert randomWordsFulfilledEvent, err := vrfv2plus.RequestRandomnessAndWaitForFulfillment( consumers[0], @@ -192,10 +182,6 @@ func TestVRFv2Plus(t *testing.T) { subBalanceAfterRequest := subscription.NativeBalance require.Equal(t, expectedSubBalanceWei, subBalanceAfterRequest) - jobRuns, err := nodeTypeToNodeMap[vrfcommon.VRF].CLNode.API.MustReadRunsByJob(nodeTypeToNodeMap[vrfcommon.VRF].Job.Data.ID) - require.NoError(t, err, "error reading job runs") - require.Equal(t, len(jobRunsBeforeTest.Data)+1, len(jobRuns.Data)) - status, err := consumers[0].GetRequestStatus(testcontext.Get(t), randomWordsFulfilledEvent.RequestId) require.NoError(t, err, "error getting rand request status") require.True(t, status.Fulfilled) @@ -207,6 +193,45 @@ func TestVRFv2Plus(t *testing.T) { require.Equal(t, 1, w.Cmp(big.NewInt(0)), "Expected the VRF job give an answer bigger than 0") } }) + t.Run("CL Node VRF Job Runs", func(t *testing.T) { + configCopy := config.MustCopy().(tc.TestConfig) + var isNativeBilling = false + consumers, subIDsForRequestRandomness, err := vrfv2plus.SetupNewConsumersAndSubs( + env, + chainID, + vrfContracts.CoordinatorV2Plus, + configCopy, + vrfContracts.LinkToken, + 1, + 1, + l, + ) + require.NoError(t, err, "error setting up new consumers and subs") + subIDForRequestRandomness := subIDsForRequestRandomness[0] + subscription, err := vrfContracts.CoordinatorV2Plus.GetSubscription(testcontext.Get(t), subIDForRequestRandomness) + require.NoError(t, err, "error getting subscription information") + vrfcommon.LogSubDetails(l, subscription, subIDForRequestRandomness.String(), vrfContracts.CoordinatorV2Plus) + subIDsForCancellingAfterTest = append(subIDsForCancellingAfterTest, subIDsForRequestRandomness...) + + jobRunsBeforeTest, err := nodeTypeToNodeMap[vrfcommon.VRF].CLNode.API.MustReadRunsByJob(nodeTypeToNodeMap[vrfcommon.VRF].Job.Data.ID) + require.NoError(t, err, "error reading job runs") + + // test and assert + _, err = vrfv2plus.RequestRandomnessAndWaitForFulfillment( + consumers[0], + vrfContracts.CoordinatorV2Plus, + vrfKey, + subIDForRequestRandomness, + isNativeBilling, + configCopy.VRFv2Plus.General, + l, + ) + require.NoError(t, err, "error requesting randomness and waiting for fulfilment") + + jobRuns, err := nodeTypeToNodeMap[vrfcommon.VRF].CLNode.API.MustReadRunsByJob(nodeTypeToNodeMap[vrfcommon.VRF].Job.Data.ID) + require.NoError(t, err, "error reading job runs") + require.Equal(t, len(jobRunsBeforeTest.Data)+1, len(jobRuns.Data)) + }) t.Run("Direct Funding (VRFV2PlusWrapper)", func(t *testing.T) { configCopy := config.MustCopy().(tc.TestConfig) wrapperContracts, wrapperSubID, err := vrfv2plus.SetupVRFV2PlusWrapperEnvironment( @@ -694,7 +719,7 @@ func TestVRFv2PlusMultipleSendingKeys(t *testing.T) { } } if !*vrfv2PlusConfig.General.UseExistingEnv { - if err := env.Cleanup(); err != nil { + if err := env.Cleanup(test_env.CleanupOpts{}); err != nil { l.Error().Err(err).Msg("Error cleaning up test environment") } } @@ -801,7 +826,7 @@ func TestVRFv2PlusMigration(t *testing.T) { } } if !*vrfv2PlusConfig.General.UseExistingEnv { - if err := env.Cleanup(); err != nil { + if err := env.Cleanup(test_env.CleanupOpts{}); err != nil { l.Error().Err(err).Msg("Error cleaning up test environment") } } @@ -1224,7 +1249,7 @@ func TestVRFV2PlusWithBHS(t *testing.T) { } } if !*vrfv2PlusConfig.General.UseExistingEnv { - if err := env.Cleanup(); err != nil { + if err := env.Cleanup(test_env.CleanupOpts{}); err != nil { l.Error().Err(err).Msg("Error cleaning up test environment") } } @@ -1445,7 +1470,7 @@ func TestVRFV2PlusWithBHF(t *testing.T) { } } if !*vrfv2PlusConfig.General.UseExistingEnv { - if err := env.Cleanup(); err != nil { + if err := env.Cleanup(test_env.CleanupOpts{}); err != nil { l.Error().Err(err).Msg("Error cleaning up test environment") } } @@ -1593,7 +1618,7 @@ func TestVRFv2PlusReplayAfterTimeout(t *testing.T) { } } if !*vrfv2PlusConfig.General.UseExistingEnv { - if err := env.Cleanup(); err != nil { + if err := env.Cleanup(test_env.CleanupOpts{}); err != nil { l.Error().Err(err).Msg("Error cleaning up test environment") } } @@ -1792,7 +1817,7 @@ func TestVRFv2PlusPendingBlockSimulationAndZeroConfirmationDelays(t *testing.T) } } if !*vrfv2PlusConfig.General.UseExistingEnv { - if err := env.Cleanup(); err != nil { + if err := env.Cleanup(test_env.CleanupOpts{}); err != nil { l.Error().Err(err).Msg("Error cleaning up test environment") } } diff --git a/integration-tests/testconfig/common/vrf/common.go b/integration-tests/testconfig/common/vrf/common.go index 0f0893f687c..a5b4078f429 100644 --- a/integration-tests/testconfig/common/vrf/common.go +++ b/integration-tests/testconfig/common/vrf/common.go @@ -142,7 +142,7 @@ type General struct { NumberOfWords *uint32 `toml:"number_of_words"` // Number of words to request CallbackGasLimit *uint32 `toml:"callback_gas_limit"` // Gas limit for the callback MaxGasLimitCoordinatorConfig *uint32 `toml:"max_gas_limit_coordinator_config"` // Max gas limit for the VRF Coordinator config - FallbackWeiPerUnitLink *int64 `toml:"fallback_wei_per_unit_link"` // Fallback wei per unit LINK for the VRF Coordinator config + FallbackWeiPerUnitLink *string `toml:"fallback_wei_per_unit_link"` // Fallback wei per unit LINK for the VRF Coordinator config StalenessSeconds *uint32 `toml:"staleness_seconds"` // Staleness in seconds for the VRF Coordinator config GasAfterPaymentCalculation *uint32 `toml:"gas_after_payment_calculation"` // Gas after payment calculation for the VRF Coordinator @@ -156,11 +156,9 @@ type General struct { WaitFor256BlocksTimeout *blockchain.StrDuration `toml:"wait_for_256_blocks_timeout"` // How long to wait for 256 blocks to be mined // Wrapper Config - WrapperGasOverhead *uint32 `toml:"wrapped_gas_overhead"` - CoordinatorGasOverhead *uint32 `toml:"coordinator_gas_overhead"` - CoordinatorGasOverheadPerWord *uint16 `toml:"coordinator_gas_overhead_per_word"` - WrapperPremiumPercentage *uint8 `toml:"wrapper_premium_percentage"` - WrapperMaxNumberOfWords *uint8 `toml:"wrapper_max_number_of_words"` + WrapperGasOverhead *uint32 `toml:"wrapped_gas_overhead"` + WrapperMaxNumberOfWords *uint8 `toml:"wrapper_max_number_of_words"` + WrapperConsumerFundingAmountNativeToken *float64 `toml:"wrapper_consumer_funding_amount_native_token"` WrapperConsumerFundingAmountLink *int64 `toml:"wrapper_consumer_funding_amount_link"` @@ -214,8 +212,8 @@ func (c *General) Validate() error { if c.MaxGasLimitCoordinatorConfig == nil || *c.MaxGasLimitCoordinatorConfig == 0 { return errors.New("max_gas_limit_coordinator_config must be set to a positive value") } - if c.FallbackWeiPerUnitLink == nil || *c.FallbackWeiPerUnitLink == 0 { - return errors.New("fallback_wei_per_unit_link must be set to a positive value") + if c.FallbackWeiPerUnitLink == nil { + return errors.New("fallback_wei_per_unit_link must be set") } if c.StalenessSeconds == nil || *c.StalenessSeconds == 0 { return errors.New("staleness_seconds must be set to a positive value") @@ -246,12 +244,6 @@ func (c *General) Validate() error { if c.WrapperGasOverhead == nil { return errors.New("wrapped_gas_overhead must be set to a non-negative value") } - if c.CoordinatorGasOverhead == nil || *c.CoordinatorGasOverhead == 0 { - return errors.New("coordinator_gas_overhead must be set to a non-negative value") - } - if c.WrapperPremiumPercentage == nil || *c.WrapperPremiumPercentage == 0 { - return errors.New("wrapper_premium_percentage must be set to a positive value") - } if c.WrapperMaxNumberOfWords == nil || *c.WrapperMaxNumberOfWords == 0 { return errors.New("wrapper_max_number_of_words must be set to a positive value") } diff --git a/integration-tests/testconfig/vrfv2/config.go b/integration-tests/testconfig/vrfv2/config.go index dcfd959880b..76d54a45d5b 100644 --- a/integration-tests/testconfig/vrfv2/config.go +++ b/integration-tests/testconfig/vrfv2/config.go @@ -72,6 +72,8 @@ type General struct { ReqsForTier3 *int64 `toml:"reqs_for_tier_3"` ReqsForTier4 *int64 `toml:"reqs_for_tier_4"` ReqsForTier5 *int64 `toml:"reqs_for_tier_5"` + CoordinatorGasOverhead *uint32 `toml:"coordinator_gas_overhead"` + WrapperPremiumPercentage *uint8 `toml:"wrapper_premium_percentage"` } func (c *General) Validate() error { @@ -107,6 +109,11 @@ func (c *General) Validate() error { if c.ReqsForTier5 == nil || *c.ReqsForTier5 < 0 { return errors.New("reqs_for_tier_5 must be set to a non-negative value") } - + if c.CoordinatorGasOverhead == nil || *c.CoordinatorGasOverhead == 0 { + return errors.New("coordinator_gas_overhead must be set to a non-negative value") + } + if c.WrapperPremiumPercentage == nil || *c.WrapperPremiumPercentage == 0 { + return errors.New("wrapper_premium_percentage must be set to a positive value") + } return nil } diff --git a/integration-tests/testconfig/vrfv2/example.toml b/integration-tests/testconfig/vrfv2/example.toml index 53d0888f6d4..8a8139b92d4 100644 --- a/integration-tests/testconfig/vrfv2/example.toml +++ b/integration-tests/testconfig/vrfv2/example.toml @@ -84,7 +84,7 @@ subscription_funding_amount_link = 5.0 number_of_words = 3 callback_gas_limit = 1000000 max_gas_limit_coordinator_config = 2500000 -fallback_wei_per_unit_link = 60000000000000000 +fallback_wei_per_unit_link = "60000000000000000" staleness_seconds = 86400 gas_after_payment_calculation = 33825 fulfilment_flat_fee_link_ppm_tier_1 = 500 diff --git a/integration-tests/testconfig/vrfv2/vrfv2.toml b/integration-tests/testconfig/vrfv2/vrfv2.toml index 6d92e2fd6b0..012352f49b8 100644 --- a/integration-tests/testconfig/vrfv2/vrfv2.toml +++ b/integration-tests/testconfig/vrfv2/vrfv2.toml @@ -16,7 +16,7 @@ minimum_confirmations = 3 number_of_words = 3 callback_gas_limit = 1000000 max_gas_limit_coordinator_config = 2500000 -fallback_wei_per_unit_link = 60000000000000000 +fallback_wei_per_unit_link = "60000000000000000" staleness_seconds = 86400 gas_after_payment_calculation = 33825 fulfilment_flat_fee_link_ppm_tier_1 = 500 diff --git a/integration-tests/testconfig/vrfv2plus/config.go b/integration-tests/testconfig/vrfv2plus/config.go index b87bef6a836..eb5ba061984 100644 --- a/integration-tests/testconfig/vrfv2plus/config.go +++ b/integration-tests/testconfig/vrfv2plus/config.go @@ -45,10 +45,16 @@ type General struct { SubscriptionFundingAmountNative *float64 `toml:"subscription_funding_amount_native"` // Amount of LINK to fund the subscription with SubscriptionRefundingAmountNative *float64 `toml:"subscription_refunding_amount_native"` // Amount of LINK to fund the subscription with FulfillmentFlatFeeNativePPM *uint32 `toml:"fulfillment_flat_fee_native_ppm"` // Flat fee in ppm for native currency for the VRF Coordinator config - FulfillmentFlatFeeLinkPPM *uint32 `toml:"fulfillment_flat_fee_link_ppm"` // Flat fee in ppm for LINK for the VRF Coordinator config FulfillmentFlatFeeLinkDiscountPPM *uint32 `toml:"fulfillment_flat_fee_link_discount_ppm"` // Flat fee discount in ppm for LINK for the VRF Coordinator config NativePremiumPercentage *uint8 `toml:"native_premium_percentage"` // Native Premium Percentage LinkPremiumPercentage *uint8 `toml:"link_premium_percentage"` // LINK Premium Percentage + + //Wrapper config + CoordinatorGasOverheadPerWord *uint16 `toml:"coordinator_gas_overhead_per_word"` + CoordinatorGasOverheadNative *uint32 `toml:"coordinator_gas_overhead_native"` + CoordinatorGasOverheadLink *uint32 `toml:"coordinator_gas_overhead_link"` + CoordinatorNativePremiumPercentage *uint8 `toml:"coordinator_native_premium_percentage"` + CoordinatorLinkPremiumPercentage *uint8 `toml:"coordinator_link_premium_percentage"` } func (c *General) Validate() error { @@ -67,9 +73,6 @@ func (c *General) Validate() error { if c.FulfillmentFlatFeeNativePPM == nil { return errors.New("fulfillment_flat_fee_native_ppm must not be nil") } - if c.FulfillmentFlatFeeLinkPPM == nil { - return errors.New("fulfillment_flat_fee_link_ppm must not be nil") - } if c.FulfillmentFlatFeeLinkDiscountPPM == nil { return errors.New("fulfillment_flat_fee_link_discount_ppm must not be nil") } @@ -79,6 +82,21 @@ func (c *General) Validate() error { if c.LinkPremiumPercentage == nil { return errors.New("link_premium_percentage must not be nil") } + if c.CoordinatorGasOverheadPerWord == nil { + return errors.New("coordinator_gas_overhead_per_word must not be nil") + } + if c.CoordinatorGasOverheadNative == nil || *c.CoordinatorGasOverheadNative == 0 { + return errors.New("coordinator_gas_overhead_native must be set to a non-negative value") + } + if c.CoordinatorGasOverheadLink == nil || *c.CoordinatorGasOverheadLink == 0 { + return errors.New("coordinator_gas_overhead_link must be set to a non-negative value") + } + if c.CoordinatorNativePremiumPercentage == nil { + return errors.New("coordinator_native_premium_percentage must not be nil") + } + if c.CoordinatorLinkPremiumPercentage == nil { + return errors.New("coordinator_link_premium_percentage must not be nil") + } return nil } diff --git a/integration-tests/testconfig/vrfv2plus/example.toml b/integration-tests/testconfig/vrfv2plus/example.toml index a0db80bdc2f..76fe23a2e70 100644 --- a/integration-tests/testconfig/vrfv2plus/example.toml +++ b/integration-tests/testconfig/vrfv2plus/example.toml @@ -85,7 +85,7 @@ subscription_funding_amount_link = 5.0 number_of_words = 3 callback_gas_limit = 1000000 max_gas_limit_coordinator_config = 2500000 -fallback_wei_per_unit_link = 60000000000000000 +fallback_wei_per_unit_link = "60000000000000000" staleness_seconds = 86400 gas_after_payment_calculation = 33825 fulfilment_flat_fee_link_ppm_tier_1 = 500 @@ -102,14 +102,14 @@ randomness_request_count_per_request = 1 randomness_request_count_per_request_deviation = 0 random_words_fulfilled_event_timeout = "2m" wrapped_gas_overhead = 50000 -coordinator_gas_overhead = 52000 +coordinator_gas_overhead_native = 52000 +coordinator_gas_overhead_link = 74000 coordinator_gas_overhead_per_word = 440 wrapper_premium_percentage = 25 wrapper_max_number_of_words = 10 wrapper_consumer_funding_amount_native_token = 1.0 wrapper_consumer_funding_amount_link = 10 subscription_funding_amount_native=1 -fulfillment_flat_fee_link_ppm=500 fulfillment_flat_fee_native_ppm=500 fulfillment_flat_fee_link_discount_ppm=100 native_premium_percentage=1 diff --git a/integration-tests/testconfig/vrfv2plus/vrfv2plus.toml b/integration-tests/testconfig/vrfv2plus/vrfv2plus.toml index 111d3c4cf71..902ca3a2966 100644 --- a/integration-tests/testconfig/vrfv2plus/vrfv2plus.toml +++ b/integration-tests/testconfig/vrfv2plus/vrfv2plus.toml @@ -20,7 +20,7 @@ subscription_billing_type = "LINK_AND_NATIVE" number_of_words = 3 callback_gas_limit = 1000000 max_gas_limit_coordinator_config = 2500000 -fallback_wei_per_unit_link = 60000000000000000 +fallback_wei_per_unit_link = "60000000000000000" staleness_seconds = 86400 gas_after_payment_calculation = 33825 number_of_sub_to_create = 1 @@ -29,18 +29,21 @@ randomness_request_count_per_request = 1 randomness_request_count_per_request_deviation = 0 random_words_fulfilled_event_timeout = "2m" wait_for_256_blocks_timeout = "10m" + +fulfillment_flat_fee_native_ppm=0 +fulfillment_flat_fee_link_discount_ppm=0 +native_premium_percentage=24 +link_premium_percentage=20 + wrapped_gas_overhead = 50000 -coordinator_gas_overhead = 52000 +coordinator_gas_overhead_native = 52000 +coordinator_gas_overhead_link = 74000 coordinator_gas_overhead_per_word = 440 -wrapper_premium_percentage = 25 wrapper_max_number_of_words = 10 wrapper_consumer_funding_amount_native_token = 1.0 wrapper_consumer_funding_amount_link = 10 -fulfillment_flat_fee_link_ppm=500 -fulfillment_flat_fee_native_ppm=500 -fulfillment_flat_fee_link_discount_ppm=100 -native_premium_percentage=1 -link_premium_percentage=1 +coordinator_native_premium_percentage=24 +coordinator_link_premium_percentage=20 # VRF Job config vrf_job_forwarding_allowed = false diff --git a/plugins/medianpoc/data_source.go b/plugins/medianpoc/data_source.go index 060dddc2938..3bb6e51593e 100644 --- a/plugins/medianpoc/data_source.go +++ b/plugins/medianpoc/data_source.go @@ -11,13 +11,13 @@ import ( ocrtypes "github.com/smartcontractkit/libocr/offchainreporting2plus/types" "github.com/smartcontractkit/chainlink-common/pkg/logger" - "github.com/smartcontractkit/chainlink-common/pkg/types" + "github.com/smartcontractkit/chainlink-common/pkg/types/core" "github.com/smartcontractkit/chainlink/v2/core/bridges" "github.com/smartcontractkit/chainlink/v2/core/utils" ) type DataSource struct { - pipelineRunner types.PipelineRunnerService + pipelineRunner core.PipelineRunnerService spec string lggr logger.Logger @@ -32,13 +32,13 @@ func (d *DataSource) Observe(ctx context.Context, reportTimestamp ocrtypes.Repor } // NOTE: job metadata is automatically attached by the pipeline runner service - vars := types.Vars{ + vars := core.Vars{ Vars: map[string]interface{}{ "jobRun": md, }, } - results, err := d.pipelineRunner.ExecuteRun(ctx, d.spec, vars, types.Options{}) + results, err := d.pipelineRunner.ExecuteRun(ctx, d.spec, vars, core.Options{}) if err != nil { return nil, err } @@ -77,3 +77,9 @@ func (d *DataSource) updateAnswer(latestAnswer *big.Int) { UpdatedAt: big.NewInt(time.Now().Unix()), } } + +type ZeroDataSource struct{} + +func (d *ZeroDataSource) Observe(ctx context.Context, reportTimestamp ocrtypes.ReportTimestamp) (*big.Int, error) { + return new(big.Int), nil +} diff --git a/plugins/medianpoc/data_source_test.go b/plugins/medianpoc/data_source_test.go index e9d95b01b02..6680ad0e79c 100644 --- a/plugins/medianpoc/data_source_test.go +++ b/plugins/medianpoc/data_source_test.go @@ -15,18 +15,18 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/logger" - "github.com/smartcontractkit/chainlink-common/pkg/types" + "github.com/smartcontractkit/chainlink-common/pkg/types/core" ) type mockPipelineRunner struct { - results types.TaskResults + results core.TaskResults err error spec string - vars types.Vars - options types.Options + vars core.Vars + options core.Options } -func (m *mockPipelineRunner) ExecuteRun(ctx context.Context, spec string, vars types.Vars, options types.Options) (types.TaskResults, error) { +func (m *mockPipelineRunner) ExecuteRun(ctx context.Context, spec string, vars core.Vars, options core.Options) (core.TaskResults, error) { m.spec = spec m.vars = vars m.options = options @@ -37,9 +37,9 @@ func TestDataSource(t *testing.T) { lggr := logger.TestLogger(t) expect := jsonserializable.JSONSerializable{Val: int64(3), Valid: true} pr := &mockPipelineRunner{ - results: types.TaskResults{ + results: core.TaskResults{ { - TaskValue: types.TaskValue{ + TaskValue: core.TaskValue{ Value: expect, Error: nil, IsTerminal: true, @@ -47,7 +47,7 @@ func TestDataSource(t *testing.T) { Index: 2, }, { - TaskValue: types.TaskValue{ + TaskValue: core.TaskValue{ Value: jsonserializable.JSONSerializable{Val: int64(4), Valid: true}, Error: nil, IsTerminal: false, @@ -73,9 +73,9 @@ func TestDataSource(t *testing.T) { func TestDataSource_ResultErrors(t *testing.T) { lggr := logger.TestLogger(t) pr := &mockPipelineRunner{ - results: types.TaskResults{ + results: core.TaskResults{ { - TaskValue: types.TaskValue{ + TaskValue: core.TaskValue{ Error: errors.New("something went wrong"), IsTerminal: true, }, @@ -98,9 +98,9 @@ func TestDataSource_ResultNotAnInt(t *testing.T) { expect := jsonserializable.JSONSerializable{Val: "string-result", Valid: true} pr := &mockPipelineRunner{ - results: types.TaskResults{ + results: core.TaskResults{ { - TaskValue: types.TaskValue{ + TaskValue: core.TaskValue{ Value: expect, IsTerminal: true, }, diff --git a/plugins/medianpoc/plugin.go b/plugins/medianpoc/plugin.go index 76fb4651260..b937361b9ec 100644 --- a/plugins/medianpoc/plugin.go +++ b/plugins/medianpoc/plugin.go @@ -13,6 +13,7 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/loop/reportingplugins" "github.com/smartcontractkit/chainlink-common/pkg/services" "github.com/smartcontractkit/chainlink-common/pkg/types" + "github.com/smartcontractkit/chainlink-common/pkg/types/core" ) func NewPlugin(lggr logger.Logger) *Plugin { @@ -29,7 +30,7 @@ type Plugin struct { reportingplugins.MedianProviderServer } -func (p *Plugin) NewValidationService(ctx context.Context) (types.ValidationService, error) { +func (p *Plugin) NewValidationService(ctx context.Context) (core.ValidationService, error) { s := &reportingPluginValidationService{lggr: p.Logger} p.SubService(s) return s, nil @@ -59,12 +60,12 @@ func (j jsonConfig) getPipeline(key string) (string, error) { func (p *Plugin) NewReportingPluginFactory( ctx context.Context, - config types.ReportingPluginServiceConfig, + config core.ReportingPluginServiceConfig, provider types.MedianProvider, - pipelineRunner types.PipelineRunnerService, - telemetry types.TelemetryClient, - errorLog types.ErrorLog, - keyValueStore types.KeyValueStore, + pipelineRunner core.PipelineRunnerService, + telemetry core.TelemetryClient, + errorLog core.ErrorLog, + keyValueStore core.KeyValueStore, ) (types.ReportingPluginFactory, error) { f, err := p.newFactory(ctx, config, provider, pipelineRunner, telemetry, errorLog) if err != nil { @@ -75,7 +76,7 @@ func (p *Plugin) NewReportingPluginFactory( return s, nil } -func (p *Plugin) newFactory(ctx context.Context, config types.ReportingPluginServiceConfig, provider types.MedianProvider, pipelineRunner types.PipelineRunnerService, telemetry types.TelemetryClient, errorLog types.ErrorLog) (*median.NumericalMedianFactory, error) { +func (p *Plugin) newFactory(ctx context.Context, config core.ReportingPluginServiceConfig, provider types.MedianProvider, pipelineRunner core.PipelineRunnerService, telemetry core.TelemetryClient, errorLog core.ErrorLog) (*median.NumericalMedianFactory, error) { jc := &jsonConfig{} err := json.Unmarshal([]byte(config.PluginConfig), jc) if err != nil { @@ -102,9 +103,11 @@ func (p *Plugin) newFactory(ctx context.Context, config types.ReportingPluginSer lggr: p.Logger, } factory := &median.NumericalMedianFactory{ - ContractTransmitter: provider.MedianContract(), - DataSource: ds, - JuelsPerFeeCoinDataSource: jds, + ContractTransmitter: provider.MedianContract(), + DataSource: ds, + JuelsPerFeeCoinDataSource: jds, + GasPriceSubunitsDataSource: &ZeroDataSource{}, + IncludeGasPriceSubunitsInObservation: false, Logger: logger.NewOCRWrapper( p.Logger, true, diff --git a/plugins/medianpoc/plugin_test.go b/plugins/medianpoc/plugin_test.go index d4470eef70a..673c1fabc7d 100644 --- a/plugins/medianpoc/plugin_test.go +++ b/plugins/medianpoc/plugin_test.go @@ -11,13 +11,14 @@ import ( ocrtypes "github.com/smartcontractkit/libocr/offchainreporting2plus/types" "github.com/smartcontractkit/chainlink-common/pkg/types" + "github.com/smartcontractkit/chainlink-common/pkg/types/core" "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" "github.com/smartcontractkit/chainlink/v2/core/logger" ) type mockErrorLog struct { - types.ErrorLog + core.ErrorLog } type mockOffchainConfigDigester struct { @@ -86,7 +87,7 @@ func TestNewPlugin(t *testing.T) { defaultSpec := "default-spec" juelsPerFeeCoinSpec := "jpfc-spec" - config := types.ReportingPluginServiceConfig{ + config := core.ReportingPluginServiceConfig{ PluginConfig: fmt.Sprintf( `{"pipelines": [{"name": "__DEFAULT_PIPELINE__", "spec": "%s"},{"name": "juelsPerFeeCoinPipeline", "spec": "%s"}]}`, defaultSpec,